Add mjs_findKeyframe.

PiperOrigin-RevId: 649036650
Change-Id: If514d5c333dd6084af9509324fd658c72576d7b5
This commit is contained in:
Alessio Quaglino
2024-07-03 05:16:44 -07:00
committed by Copybara-Service
parent 8f16b72f44
commit 9107d3b507
7 changed files with 53 additions and 0 deletions
+6
View File
@@ -144,6 +144,12 @@ PYBIND11_MODULE(_specs, m) {
return mjs_findFrame(self.ptr, name.c_str());
},
py::return_value_policy::reference_internal);
mjSpec.def(
"find_keyframe",
[](MjSpec& self, std::string& name) -> raw::MjsKey* {
return mjs_findKeyframe(self.ptr, name.c_str());
},
py::return_value_policy::reference_internal);
mjSpec.def(
"find_default",
[](MjSpec& self, std::string& classname) -> raw::MjsDefault* {