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

Method _detach

dm_control/mjcf/element.py:918–925  ·  view source on GitHub ↗

Detaches a model with the specified namescope.

(self, other_namescope)

Source from the content-addressed store, hash-verified

916 other._alias_attributes_dict(self._attributes) # pylint: disable=protected-access
917
918 def _detach(self, other_namescope):
919 """Detaches a model with the specified namescope."""
920 attached_element = self._attachments.get(other_namescope)
921 if attached_element:
922 attached_element._restore_attributes_dict() # pylint: disable=protected-access
923 del self._attachments[other_namescope]
924 for child in self._children:
925 child._detach(other_namescope) # pylint: disable=protected-access
926
927 def _check_conflicting_attributes(self, other, copying):
928 for attribute_name, other_attribute in other.get_attributes().items():

Callers 2

_detachMethod · 0.45
detachMethod · 0.45

Calls 2

getMethod · 0.45

Tested by

no test coverage detected