diff --git a/python/mujoco/experimental/studio/native_viewer.cc b/python/mujoco/experimental/studio/native_viewer.cc index e4379862..71d6cf51 100644 --- a/python/mujoco/experimental/studio/native_viewer.cc +++ b/python/mujoco/experimental/studio/native_viewer.cc @@ -176,6 +176,7 @@ class Viewer { }; PYBIND11_MODULE(native_viewer_cc, m) { + pybind11::module_::import("mujoco._structs"); pybind11::class_(m, "Viewer") .def(pybind11::init()) .def("InitRenderer", &Viewer::InitRenderer) diff --git a/python/mujoco/experimental/studio/parser.cc b/python/mujoco/experimental/studio/parser.cc index c1e191ce..28f76baa 100644 --- a/python/mujoco/experimental/studio/parser.cc +++ b/python/mujoco/experimental/studio/parser.cc @@ -41,6 +41,7 @@ py::object Parse(std::string_view filepath) { } // namespace mujoco::python PYBIND11_MODULE(parser, m) { + pybind11::module_::import("mujoco._structs"); m.def("parse", &mujoco::python::Parse, pybind11::return_value_policy::take_ownership); } diff --git a/python/mujoco/experimental/studio/renderer.cc b/python/mujoco/experimental/studio/renderer.cc index b121e1e9..c7f695d3 100644 --- a/python/mujoco/experimental/studio/renderer.cc +++ b/python/mujoco/experimental/studio/renderer.cc @@ -69,6 +69,7 @@ class Renderer { } // namespace mujoco::python PYBIND11_MODULE(renderer, m) { + pybind11::module_::import("mujoco._structs"); pybind11::class_(m, "Renderer") .def(pybind11::init()) .def("Init", &mujoco::python::Renderer::Init) diff --git a/python/mujoco/experimental/studio/sim.cc b/python/mujoco/experimental/studio/sim.cc index c694abaa..890b328b 100644 --- a/python/mujoco/experimental/studio/sim.cc +++ b/python/mujoco/experimental/studio/sim.cc @@ -24,6 +24,7 @@ namespace py = pybind11; using StepControl = mujoco::platform::StepControl; PYBIND11_MODULE(sim, m) { + py::module_::import("mujoco._structs"); m.doc() = "MuJoCo platform simulation bindings for Link."; py::enum_(m, "StepStatus") diff --git a/python/mujoco/experimental/studio/ux.cc b/python/mujoco/experimental/studio/ux.cc index 8827a70f..86754719 100644 --- a/python/mujoco/experimental/studio/ux.cc +++ b/python/mujoco/experimental/studio/ux.cc @@ -57,6 +57,7 @@ struct RenderFlags { }; PYBIND11_MODULE(ux, m) { + py::module_::import("mujoco._structs"); py::class_(m, "RenderFlags") .def(py::init<>()) .def_readwrite("flags", &RenderFlags::flags);