+ remove method View3DInventor::dumpSelection

This commit is contained in:
wmayer
2015-08-26 18:58:59 +02:00
parent 56ed425680
commit 9fbe818ad0
5 changed files with 0 additions and 55 deletions

View File

@@ -411,10 +411,6 @@ PyObject* Application::sExport(PyObject * /*self*/, PyObject *args,PyObject * /*
return 0;
}
else {
QString cmd = QString::fromLatin1(
"Gui.getDocument(\"%1\").mdiViewsOfType('Gui::View3DInventor')[0].dumpSelection(\"%2\")"
).arg(QLatin1String(doc->getName())).arg(fi.absoluteFilePath());
Base::Interpreter().runString(cmd.toUtf8());
}
}
else if (ext == QLatin1String("pdf")) {

View File

@@ -881,33 +881,6 @@ void View3DInventor::dump(const char* filename)
_viewer->dumpToFile(_viewer->getSceneGraph(), filename, false);
}
void View3DInventor::dumpSelection(const char* filename)
{
if (!_pcDocument)
return;
SoSeparator* sep = new SoSeparator();
sep->ref();
std::vector<Gui::SelectionObject> sel = Selection().getSelectionEx();
for (std::vector<Gui::SelectionObject>::iterator it = sel.begin(); it != sel.end(); ++it) {
App::DocumentObject* obj = it->getObject();
Gui::ViewProvider* vp = _pcDocument->getViewProvider(obj);
if (vp)
sep->addChild(vp->getRoot());
}
SoGetPrimitiveCountAction action;
action.setCanApproximate(true);
action.apply(sep);
if ( action.getTriangleCount() > 100000 || action.getPointCount() > 30000 || action.getLineCount() > 10000 )
_viewer->dumpToFile(sep, filename, true);
else
_viewer->dumpToFile(sep, filename, false);
sep->unref();
}
void View3DInventor::windowStateChanged(MDIView* view)
{
bool canStartTimer = false;

View File

@@ -113,7 +113,6 @@ public Q_SLOTS:
void restoreOverrideCursor();
void dump(const char* filename);
void dumpSelection(const char* filename);
protected Q_SLOTS:
void stopAnimating();

View File

@@ -98,7 +98,6 @@ 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()");
@@ -1001,27 +1000,6 @@ 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;

View File

@@ -65,7 +65,6 @@ public:
Py::Object setAnimationEnabled(const Py::Tuple&);
Py::Object isAnimationEnabled(const Py::Tuple&);
Py::Object dump(const Py::Tuple&);
Py::Object dumpSelection(const Py::Tuple&);
Py::Object dumpNode(const Py::Tuple&);
Py::Object setStereoType(const Py::Tuple&);
Py::Object getStereoType(const Py::Tuple&);