Skip to content
Snippets Groups Projects
Commit 865fea2a authored by Marco Biasini's avatar Marco Biasini
Browse files

some more exports for gfx-related stuff

parent c0581093
Branches
Tags
No related merge requests found
......@@ -17,12 +17,20 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//------------------------------------------------------------------------------
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
using namespace boost::python;
#include <ost/export_helper/vector.hh>
#include <ost/gfx/gfx_node.hh>
using namespace ost;
using namespace ost::gfx;
const GfxNodeVector& (GfxNode::*get_children)() const=&GfxNode::GetChildren;
void export_GfxNode()
{
void (GfxNode::* node_add1)(GfxObjP) = &GfxNode::Add;
......@@ -31,6 +39,10 @@ void export_GfxNode()
void (GfxNode::* node_rem2)(GfxNodeP) = &GfxNode::Remove;
void (GfxNode::* node_rem3)(const String&) = &GfxNode::Remove;
class_<GfxNodeVector>("GfxNodeList", init<>())
.def(vector_indexing_suite<GfxNodeVector, true>())
.def(ost::VectorAdditions<GfxNodeVector>())
;
class_<GfxNode, GfxNodeP,
boost::noncopyable>("GfxNode", init<const String&>())
.def("GetName",&GfxNode::GetName)
......@@ -43,5 +55,8 @@ void export_GfxNode()
.add_property("name", &GfxNode::GetName)
.def("Remove",node_rem2)
.def("Remove",node_rem3)
.add_property("parent", &GfxNode::GetParent)
.add_property("children", make_function(get_children,
return_value_policy<copy_const_reference>()))
;
}
......@@ -182,6 +182,7 @@ void export_Scene()
.def("StopOffscreenMode",&Scene::StopOffscreenMode)
.def("SetShadingMode",&Scene::SetShadingMode)
.def("SetBeacon",&Scene::SetBeacon)
.add_property("root_node", &Scene::GetRootNode)
.def("SetBeaconOff",&Scene::SetBeaconOff)
.def("__getitem__",scene_getitem)
;
......
......@@ -250,9 +250,5 @@ void export_Tool()
.def("GetQObject",&get_py_qobject<ToolOptionsWin>)
.add_property("qobject", &get_py_qobject<ToolOptionsWin>)
;
class_<gfx::NodePtrList>("NodePtrList", init<>())
.def(vector_indexing_suite<gfx::NodePtrList, true >())
;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment