Raise error when binding to a removed element.

PiperOrigin-RevId: 774462737
Change-Id: I820c0e1c010ae9fbf6d9667c3364d4b65bf21002
This commit is contained in:
Alessio Quaglino
2025-06-22 10:14:40 -07:00
committed by Copybara-Service
parent 419cdf1ff3
commit a00bfa819c
9 changed files with 19 additions and 77 deletions
+1 -3
View File
@@ -76,8 +76,6 @@ MJAPI int mj_copyBack(mjSpec* s, const mjModel* m);
MJAPI mjsElement* mjs_attach(mjsElement* parent, const mjsElement* child,
const char* prefix, const char* suffix);
// Detach but not delete object corresponding to the given element, return 0 on success.
MJAPI int mjs_detach(mjSpec* s, mjsElement* element);
//---------------------------------- Add tree elements ---------------------------------------------
@@ -105,7 +103,7 @@ MJAPI mjsLight* mjs_addLight(mjsBody* body, const mjsDefault* def);
// Add frame to body.
MJAPI mjsFrame* mjs_addFrame(mjsBody* body, mjsFrame* parentframe);
// Delete object corresponding to the given element, return 0 on success.
// Detach but not delete object corresponding to the given element, return 0 on success.
MJAPI int mjs_delete(mjSpec* s, mjsElement* element);