Adaption of FreeCAD to QuarterWidget
-removes all soqtviewer references -create a quarter adaptor class which implements missing functionality -adopts freecad code to make use of SoRenderManager and changed View3DInventorViewer interface
This commit is contained in:
@@ -102,6 +102,8 @@
|
||||
|
||||
#include "Language/Translator.h"
|
||||
#include "TaskView/TaskDialogPython.h"
|
||||
#include <Gui/Quarter/Quarter.h>
|
||||
#include "View3DViewerPy.h"
|
||||
#include "GuiInitScript.h"
|
||||
|
||||
|
||||
@@ -300,14 +302,6 @@ FreeCADGui_getSoDBVersion(PyObject * /*self*/, PyObject *args)
|
||||
return PyString_FromString(SoDB::getVersion());
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
FreeCADGui_getSoQtVersion(PyObject * /*self*/, PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
return PyString_FromString(SoQt::getVersionString());
|
||||
}
|
||||
|
||||
struct PyMethodDef FreeCADGui_methods[] = {
|
||||
{"subgraphFromObject",FreeCADGui_subgraphFromObject,METH_VARARGS,
|
||||
"subgraphFromObject(object) -> Node\n\n"
|
||||
@@ -316,10 +310,6 @@ struct PyMethodDef FreeCADGui_methods[] = {
|
||||
"getSoDBVersion() -> String\n\n"
|
||||
"Return a text string containing the name\n"
|
||||
"of the Coin library and version information"},
|
||||
{"getSoQtVersion",FreeCADGui_getSoQtVersion,METH_VARARGS,
|
||||
"getSoQtVersion() -> String\n\n"
|
||||
"Return a text string containing the name\n"
|
||||
"of the SoQt library and version information"},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
@@ -450,12 +440,11 @@ Application::~Application()
|
||||
BitmapFactoryInst::destruct();
|
||||
|
||||
#if 0
|
||||
// we must run the garbage collector before shutting down the SoDB or SoQt
|
||||
// we must run the garbage collector before shutting down the SoDB
|
||||
// subsystem because we may reference some class objects of them in Python
|
||||
Base::Interpreter().cleanupSWIG("SoBase *");
|
||||
// finish also Inventor subsystem
|
||||
SoFCDB::finish();
|
||||
SoQt::done();
|
||||
|
||||
#if (COIN_MAJOR_VERSION >= 2) && (COIN_MINOR_VERSION >= 4)
|
||||
SoDB::finish();
|
||||
@@ -1440,10 +1429,6 @@ void messageHandlerCoin(const SoError * error, void * userdata)
|
||||
}
|
||||
}
|
||||
|
||||
void messageHandlerSoQt(const SbString errmsg, SoQt::FatalErrors errcode, void *userdata)
|
||||
{
|
||||
Base::Console().Error( errmsg.getString() );
|
||||
}
|
||||
#endif
|
||||
|
||||
// To fix bug #0000345 move Q_INIT_RESOURCE() outside initApplication()
|
||||
@@ -1673,7 +1658,7 @@ void Application::runApplication(void)
|
||||
|
||||
// init the Inventor subsystem
|
||||
SoDB::init();
|
||||
SoQt::init(&mw);
|
||||
SIM::Coin3D::Quarter::Quarter::init();
|
||||
SoFCDB::init();
|
||||
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
@@ -1775,7 +1760,6 @@ void Application::runApplication(void)
|
||||
|
||||
#ifdef FC_DEBUG // redirect Coin messages to FreeCAD
|
||||
SoDebugError::setHandlerCallback( messageHandlerCoin, 0 );
|
||||
SoQt::setFatalErrorHandler( messageHandlerSoQt, 0 );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user