Add mjs_attachFrameToSite.

This is required in preparation of changing the spec.attach behavior in the Python bindings.

PiperOrigin-RevId: 730810198
Change-Id: I095808f0afe62b5bbd27201ed5c75804e0e9c4bf
This commit is contained in:
Alessio Quaglino
2025-02-25 03:20:06 -08:00
committed by Copybara-Service
parent 6b11f2b88e
commit ce82b63155
7 changed files with 147 additions and 0 deletions
+4
View File
@@ -1426,6 +1426,10 @@ MJAPI mjsFrame* mjs_attachFrame(mjsBody* parent, const mjsFrame* child,
MJAPI mjsBody* mjs_attachToSite(mjsSite* parent, const mjsBody* child,
const char* prefix, const char* suffix);
// Attach child frame to a parent site, return the attached frame if success or NULL otherwise.
MJAPI mjsFrame* mjs_attachFrameToSite(mjsSite* parent, const mjsFrame* child,
const char* prefix, const char* suffix);
// Detach body from mjSpec, remove all references and delete the body, return 0 on success.
MJAPI int mjs_detachBody(mjSpec* s, mjsBody* b);