py3: ported PartDesign to python3
This commit is contained in:
@@ -97,11 +97,11 @@ PyObject* initModule()
|
||||
|
||||
|
||||
/* Python entry */
|
||||
PyMODINIT_FUNC initPartDesignGui()
|
||||
PyMOD_INIT_FUNC(PartDesignGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -110,10 +110,10 @@ PyMODINIT_FUNC initPartDesignGui()
|
||||
}
|
||||
catch(const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
|
||||
(void)PartDesignGui::initModule();
|
||||
PyObject* mod = PartDesignGui::initModule();
|
||||
Base::Console().Log("Loading GUI of PartDesign module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
@@ -154,4 +154,6 @@ PyMODINIT_FUNC initPartDesignGui()
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadPartDesignResource();
|
||||
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user