+ for VRML and OpenInventor export only selection, fix whitespaces
This commit is contained in:
@@ -98,6 +98,7 @@ void View3DInventorPy::init_type()
|
||||
add_varargs_method("setAnimationEnabled",&View3DInventorPy::setAnimationEnabled,"setAnimationEnabled()");
|
||||
add_varargs_method("isAnimationEnabled",&View3DInventorPy::isAnimationEnabled,"isAnimationEnabled()");
|
||||
add_varargs_method("dump",&View3DInventorPy::dump,"dump()");
|
||||
add_varargs_method("dumpSelection",&View3DInventorPy::dumpSelection,"dumpSelection()");
|
||||
add_varargs_method("dumpNode",&View3DInventorPy::dumpNode,"dumpNode(node)");
|
||||
add_varargs_method("setStereoType",&View3DInventorPy::setStereoType,"setStereoType()");
|
||||
add_varargs_method("getStereoType",&View3DInventorPy::getStereoType,"getStereoType()");
|
||||
@@ -993,6 +994,27 @@ Py::Object View3DInventorPy::dump(const Py::Tuple& args)
|
||||
}
|
||||
}
|
||||
|
||||
Py::Object View3DInventorPy::dumpSelection(const Py::Tuple& args)
|
||||
{
|
||||
char* filename;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "s", &filename))
|
||||
throw Py::Exception();
|
||||
|
||||
try {
|
||||
_view->dumpSelection(filename);
|
||||
return Py::None();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::Exception(e.what());
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
throw Py::Exception(e.what());
|
||||
}
|
||||
catch(...) {
|
||||
throw Py::Exception("Unknown C++ exception");
|
||||
}
|
||||
}
|
||||
|
||||
Py::Object View3DInventorPy::dumpNode(const Py::Tuple& args)
|
||||
{
|
||||
PyObject* object;
|
||||
|
||||
Reference in New Issue
Block a user