MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / _on_reload

Method _on_reload

dm_control/viewer/application.py:220–231  ·  view source on GitHub ↗

Perform initialization related to Physics reload. Reset the components that depend on a specific Physics class instance. Args: zoom_to_scene: Should the camera zoom to show the entire scene after the reload is complete.

(self, zoom_to_scene=False)

Source from the content-addressed store, hash-verified

218 self._input_map.bind(status_view_toggle, _STATUS)
219
220 def _on_reload(self, zoom_to_scene=False):
221 """Perform initialization related to Physics reload.
222
223 Reset the components that depend on a specific Physics class instance.
224
225 Args:
226 zoom_to_scene: Should the camera zoom to show the entire scene after the
227 reload is complete.
228 """
229 self._deferred_reload_request = ReloadParams(zoom_to_scene)
230 self._viewer.deinitialize()
231 self._status.set_camera(None)
232
233 def _perform_deferred_reload(self, params):
234 """Performs the deferred part of initialization related to Physics reload.

Calls 3

ReloadParamsClass · 0.85
deinitializeMethod · 0.80
set_cameraMethod · 0.80