Expose MjSpec raw pointer via _address

This commit is contained in:
Yuxuan Jiang
2025-02-26 10:25:55 +08:00
parent d1d61925da
commit 2039629457
2 changed files with 13 additions and 0 deletions
+3
View File
@@ -393,6 +393,9 @@ PYBIND11_MODULE(_specs, m) {
mjSpec.def("copy", [](const MjSpec& self) -> MjSpec {
return MjSpec(self);
});
mjSpec.def_property_readonly("_address", [](const MjSpec& self) {
return reinterpret_cast<uintptr_t>(self.ptr);
});
mjSpec.def_property(
"copy_during_attach",
[](MjSpec& self) {