Gui: add View3DPy.hasClippingPlane()

This commit is contained in:
Zheng, Lei
2019-08-24 10:19:54 +08:00
committed by wmayer
parent 7128cf7989
commit 0bc6722943
2 changed files with 10 additions and 0 deletions

View File

@@ -191,6 +191,8 @@ void View3DInventorPy::init_type()
"beforeEditing: whether to insert the clipping node before or after editing root node\n"
"noManip: whether to create a manipulator\n"
"pla: clipping plane placement");
add_varargs_method("hasClippingPlane",&View3DInventorPy::hasClippingPlane,
"hasClippingPlane(): check whether ths clipping plane is active");
}
View3DInventorPy::View3DInventorPy(View3DInventor *vi)
@@ -2549,3 +2551,10 @@ Py::Object View3DInventorPy::toggleClippingPlane(const Py::Tuple& args, const Py
PyObject_IsTrue(noManip),pla);
return Py::None();
}
Py::Object View3DInventorPy::hasClippingPlane(const Py::Tuple& args)
{
if (!PyArg_ParseTuple(args.ptr(), ""))
throw Py::Exception();
return Py::Boolean(_view->getViewer()->hasClippingPlane());
}

View File

@@ -131,6 +131,7 @@ public:
Py::Object redraw(const Py::Tuple&);
Py::Object setName(const Py::Tuple&);
Py::Object toggleClippingPlane(const Py::Tuple& args, const Py::Dict &);
Py::Object hasClippingPlane(const Py::Tuple& args);
View3DInventor* getView3DIventorPtr() {return _view;}