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

Method detach

dm_control/mjcf/element.py:1254–1261  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1252 return self.worldbody.attach(other)
1253
1254 def detach(self):
1255 parent_model = self.parent_model
1256 if not parent_model:
1257 raise RuntimeError(
1258 'Cannot `detach` a model that is not attached to some other model.')
1259 else:
1260 parent_model._detach(self.namescope) # pylint: disable=protected-access
1261 self.namescope.parent = None
1262
1263 def include_copy(self, other, override_attributes=False):
1264 other_copier = copier.Copier(other)

Callers 1

testDetachMethod · 0.45

Calls 1

_detachMethod · 0.45

Tested by 1

testDetachMethod · 0.36