Fixed MjSpec introspection with visual.rgba and visual.headlight. Added access to MjSpec.visual.global_.
This commit is contained in:
@@ -236,6 +236,8 @@ PYBIND11_MODULE(_specs, m) {
|
||||
py::class_<raw::MjOption> mjOption(m, "MjOption");
|
||||
py::class_<raw::MjStatistic> mjStatistic(m, "MjStatistic");
|
||||
py::class_<raw::MjVisual> mjVisual(m, "MjVisual");
|
||||
py::class_<raw::MjVisualHeadlight> mjVisualHeadlight(m, "MjVisualHeadlight");
|
||||
py::class_<raw::MjVisualRgba> mjVisualRgba(m, "MjVisualRgba");
|
||||
py::class_<raw::MjsCompiler> mjsCompiler(m, "MjsCompiler");
|
||||
DefineArray<char>(m, "MjCharVec");
|
||||
DefineArray<std::string>(m, "MjStringVec");
|
||||
@@ -979,6 +981,13 @@ PYBIND11_MODULE(_specs, m) {
|
||||
});
|
||||
mjsPlugin.def("delete",
|
||||
[](raw::MjsPlugin& self) { mjs_delete(self.element); });
|
||||
// ============================= MJVISUAL ====================================
|
||||
mjVisual.def_property(
|
||||
"global_",
|
||||
[](raw::MjVisual& self) -> raw::MjVisualGlobal& { return self.global; },
|
||||
[](raw::MjVisual& self, raw::MjVisualGlobal& value) {
|
||||
self.global = value;
|
||||
});
|
||||
|
||||
#include "specs.cc.inc"
|
||||
} // PYBIND11_MODULE // NOLINT
|
||||
|
||||
Reference in New Issue
Block a user