py3: ported ReverseEngineering to python3
This commit is contained in:
parent
125fd78fa3
commit
1558e920db
|
@ -735,6 +735,12 @@ Mesh.show(m)
|
|||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return (new Module)->module().ptr();
|
||||
}
|
||||
|
||||
} // namespace Reen
|
||||
|
||||
|
||||
|
@ -748,9 +754,10 @@ PyMODINIT_FUNC initReverseEngineering()
|
|||
}
|
||||
catch(const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
|
||||
new Reen::Module();
|
||||
PyObject* mod = Reen::initModule();
|
||||
Base::Console().Log("Loading ReverseEngineering module... done\n");
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
|
|
|
@ -57,18 +57,24 @@ public:
|
|||
|
||||
private:
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return (new Module)->module().ptr();
|
||||
}
|
||||
|
||||
} // namespace ReverseEngineeringGui
|
||||
|
||||
|
||||
/* Python entry */
|
||||
PyMODINIT_FUNC initReverseEngineeringGui()
|
||||
PyMOD_INIT_FUNC(ReverseEngineeringGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
|
||||
new ReverseEngineeringGui::Module();
|
||||
PyObject* mod = ReverseEngineeringGui::initModule();
|
||||
Base::Console().Log("Loading GUI of ReverseEngineering module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
|
@ -77,4 +83,5 @@ PyMODINIT_FUNC initReverseEngineeringGui()
|
|||
|
||||
// add resources and reloads the translators
|
||||
loadReverseEngineeringResource();
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user