Replace mjs_detachBody and mjs_detachDefault with mjs_detach.

In a follow-up, mjs_detach will be changed to only remove without deleting an element.

PiperOrigin-RevId: 773637351
Change-Id: I9ee4d3584ba88ccc225591337cf036bab806e25c
This commit is contained in:
Alessio Quaglino
2025-06-20 04:11:14 -07:00
committed by Copybara-Service
parent 4ce6293217
commit 0488d9f4eb
15 changed files with 177 additions and 179 deletions
+2 -2
View File
@@ -2000,7 +2000,7 @@
"\n",
"# Delete all key frames to avoid name conflicts\n",
"while humanoid.keys:\n",
" humanoid.keys[-1].delete()\n",
" humanoid.delete(keys[-1])\n",
"\n",
"# Create a grid of humanoids by attaching humanoid to spec multiple times\n",
"for i in range(4):\n",
@@ -2335,7 +2335,7 @@
"fly = mj.MjSpec.from_file(fly_file)\n",
"# Remove lights from fly so they are not duplicated in line-up\n",
"for light in fly.lights:\n",
" light.delete()\n",
" fly.delete(light)\n",
"\n",
"small_fly = scale_spec(fly, 1.25)\n",
"large_fly = scale_spec(fly, 2)\n",