Add plugin tests for mjSpec.
Fixes #1903. PiperOrigin-RevId: 663352920 Change-Id: I3a9e17aec5694e49c20b542f4b0a4402f88a2f17
This commit is contained in:
committed by
Copybara-Service
parent
64575f399b
commit
e0e134ca63
@@ -1017,9 +1017,12 @@ PYBIND11_MODULE(_specs, m) {
|
||||
mjsTuple.def("delete", [](raw::MjsTuple& self) { mjs_delete(self.element); });
|
||||
|
||||
// ============================= MJSPLUGIN ===================================
|
||||
mjsPlugin.def_property_readonly("id", [](raw::MjsPlugin& self) -> int {
|
||||
return mjs_getId(self.instance);
|
||||
});
|
||||
mjsPlugin.def_property(
|
||||
"id",
|
||||
[](raw::MjsPlugin& self) -> int { return mjs_getId(self.instance); },
|
||||
[](raw::MjsPlugin& self, raw::MjsPlugin* other) {
|
||||
self.instance = other->instance;
|
||||
});
|
||||
mjsPlugin.def("delete",
|
||||
[](raw::MjsPlugin& self) { mjs_delete(self.instance); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user