python - visibility and transparency of csg objects

This commit is contained in:
Matthias Hochsteer 2015-08-31 17:48:05 -04:00 committed by Matthias Hochsteger
parent 21bb5c61c3
commit d167f1261a

View File

@ -356,6 +356,7 @@ DLL_HEADER void ExportCSG()
} }
delete bcname; delete bcname;
} }
return tlonr;
}), }),
(bp::arg("self"), bp::arg("solid"), bp::arg("bcmod")=bp::list()) (bp::arg("self"), bp::arg("solid"), bp::arg("bcmod")=bp::list())
@ -381,6 +382,35 @@ DLL_HEADER void ExportCSG()
}), }),
(bp::arg("self"), bp::arg("solid1"), bp::arg("solid2"), bp::arg("reflevels")=2) (bp::arg("self"), bp::arg("solid1"), bp::arg("solid2"), bp::arg("reflevels")=2)
) )
.def("GetTransparent", FunctionPointer
([] (CSGeometry & self, int tlonr)
{
return self.GetTopLevelObject(tlonr)->GetTransparent();
}),
(bp::arg("self"), bp::arg("tlonr"))
)
.def("SetTransparent", FunctionPointer
([] (CSGeometry & self, int tlonr, bool transparent)
{
self.GetTopLevelObject(tlonr)->SetTransparent(transparent);
}),
(bp::arg("self"), bp::arg("tlonr"), bp::arg("transparent"))
)
.def("GetVisible", FunctionPointer
([] (CSGeometry & self, int tlonr)
{
return self.GetTopLevelObject(tlonr)->GetVisible();
}),
(bp::arg("self"), bp::arg("tlonr"))
)
.def("SetVisible", FunctionPointer
([] (CSGeometry & self, int tlonr, bool visible)
{
self.GetTopLevelObject(tlonr)->SetVisible(visible);
}),
(bp::arg("self"), bp::arg("tlonr"), bp::arg("visible"))
)
.add_property ("ntlo", &CSGeometry::GetNTopLevelObjects) .add_property ("ntlo", &CSGeometry::GetNTopLevelObjects)
; ;