Add mjs_getCompiler C API and compiler property to Python spec elements.

PiperOrigin-RevId: 881488083
Change-Id: I3aa1c0562bf2fd27057b8056048e3156fc1b067c
This commit is contained in:
Sam Haves
2026-03-10 09:56:50 -07:00
committed by Copybara-Service
parent d6aac2041e
commit 6890e133c0
9 changed files with 96 additions and 0 deletions
+6
View File
@@ -1074,6 +1074,12 @@ mjSpec* mjs_getSpec(mjsElement* element) {
mjsCompiler* mjs_getCompiler(mjsElement* element) {
return static_cast<mjCBase*>(element)->compiler;
}
// find spec (model asset) by name
mjSpec* mjs_findSpec(mjSpec* s, const char* name) {
mjCModel* model = static_cast<mjCModel*>(s->element);