From 71bbc7829d18a83cd50ea101ba23a0e48d83df66 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 14 Jun 2012 22:26:37 +1200 Subject: [PATCH] python binding bugfix --- src/libpython/render.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()))