Rename detach_default and detach_body to delete in the mjSpec bindings.
PiperOrigin-RevId: 773674361 Change-Id: I3977060e19e9ff0afc65ad91693c017958576b78
This commit is contained in:
committed by
Copybara-Service
parent
e23b39fbfa
commit
a2acd2d4ed
+4
-5
@@ -603,11 +603,10 @@ Lists of all elements in a spec can be accessed using named properties, using th
|
||||
|
||||
Element removal
|
||||
^^^^^^^^^^^^^^^
|
||||
For elements that can have children (bodies and defaults), the methods ``spec.detach_body(body)`` and
|
||||
``spec.detach_default(def)`` remove, respectively, ``body`` and ``def`` from the spec, together with all of their
|
||||
children. When detaching body subtrees, all elements which reference elements in the subtree, will also be removed. For
|
||||
all other elements, the method ``delete()`` removes the corresponding element from the spec, e.g.
|
||||
``spec.delete(spec.geom('my_geom'))`` will remove the geom named "my_geom" and all of the elements that reference it.
|
||||
The method ``delete()`` removes the corresponding element from the spec, e.g. ``spec.delete(spec.geom('my_geom'))`` will
|
||||
remove the geom named "my_geom" and all of the elements that reference it. For elements that can have children (bodies
|
||||
and defaults), ``delete`` removes also all of their children. When detaching body subtrees, all elements which reference
|
||||
elements in the subtree, will also be removed.
|
||||
|
||||
Tree traversal
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user