Add mjs_getCompiler C API and compiler property to Python spec elements.
PiperOrigin-RevId: 881488083 Change-Id: I3aa1c0562bf2fd27057b8056048e3156fc1b067c
This commit is contained in:
committed by
Copybara-Service
parent
d6aac2041e
commit
6890e133c0
@@ -9668,6 +9668,14 @@ std::optional<MjsElement> mjs_firstElement_wrapper(MjSpec& s, mjtObj type) {
|
||||
return MjsElement(result);
|
||||
}
|
||||
|
||||
std::optional<MjsCompiler> mjs_getCompiler_wrapper(MjsElement& element) {
|
||||
mjsCompiler* result = mjs_getCompiler(element.get());
|
||||
if (result == nullptr) {
|
||||
return std::nullopt;
|
||||
}
|
||||
return MjsCompiler(result);
|
||||
}
|
||||
|
||||
std::optional<MjsDefault> mjs_getDefault_wrapper(MjsElement& element) {
|
||||
mjsDefault* result = mjs_getDefault(element.get());
|
||||
if (result == nullptr) {
|
||||
@@ -13191,6 +13199,7 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
||||
function("mjs_findSpec", &mjs_findSpec_wrapper);
|
||||
function("mjs_firstChild", &mjs_firstChild_wrapper);
|
||||
function("mjs_firstElement", &mjs_firstElement_wrapper);
|
||||
function("mjs_getCompiler", &mjs_getCompiler_wrapper);
|
||||
function("mjs_getDefault", &mjs_getDefault_wrapper);
|
||||
function("mjs_getError", &mjs_getError_wrapper);
|
||||
function("mjs_getFrame", &mjs_getFrame_wrapper);
|
||||
|
||||
Reference in New Issue
Block a user