diff --git a/src/libpython/render.cpp b/src/libpython/render.cpp index 9c82f4f2..d1acf9e3 100644 --- a/src/libpython/render.cpp +++ b/src/libpython/render.cpp @@ -6,6 +6,13 @@ using namespace mitsuba; +ref loadScene(const fs::path &filename, const StringMap ¶ms) { + SceneHandler::ParameterMap pmap; + for (StringMap::const_iterator it = params.begin(); it != params.end(); ++it) + pmap[it->first]=it->second; + return SceneHandler::loadScene(filename, pmap); +} + void export_render() { bp::object renderModule( bp::handle<>(bp::borrowed(PyImport_AddModule("mitsuba.render")))); @@ -35,7 +42,7 @@ void export_render() { .def("destinationExists", &Scene::destinationExists); bp::class_("SceneHandler", bp::no_init) - .def("loadScene", &SceneHandler::loadScene, BP_RETURN_VALUE) + .def("loadScene", &loadScene, BP_RETURN_VALUE) .staticmethod("loadScene"); BP_CLASS(RenderJob, Thread, (bp::init()))