#include #include #include #include #include "held_ptr.hpp" using namespace boost::python; namespace { dict getEffectMap(osgFX::Registry& self) { dict map; osgFX::Registry::EffectMap emap = self.getEffectMap(); for (osgFX::Registry::EffectMap::iterator i=emap.begin(); i!=emap.end(); ++i) { osg::ref_ptr ref((osgFX::Effect *) i->second.get()); map[i->first] = ref; } return map; } } namespace PyOSG { void init_Registry() { class_, bases, boost::noncopyable > effect("Registry", no_init); effect .def("instance", &osgFX::Registry::instance, return_value_policy()) .staticmethod("instance") .def("getEffectMap", &getEffectMap); ; } }