diff --git a/src/Gui/StartupProcess.cpp b/src/Gui/StartupProcess.cpp index 0e9b23e327..9c5e7e571b 100644 --- a/src/Gui/StartupProcess.cpp +++ b/src/Gui/StartupProcess.cpp @@ -451,9 +451,6 @@ void StartupPostProcess::showMainWindow() void StartupPostProcess::activateWorkbench() { - // Always activate the material workbench - guiApp.activateWorkbench("MaterialWorkbench"); - // Activate the correct workbench std::string start = App::Application::Config()["StartWorkbench"]; Base::Console().Log("Init: Activating default workbench %s\n", start.c_str()); diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index cce743971c..62b29c7b0e 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -200,6 +200,14 @@ PyObject* Part::PartExceptionOCCDimensionError; PyMOD_INIT_FUNC(Part) { + // load dependent module + try { + Base::Interpreter().runString("import Materials"); + } + catch(const Base::Exception& e) { + PyErr_SetString(PyExc_ImportError, e.what()); + PyMOD_Return(nullptr); + } Base::Console().Log("Module: Part\n"); // This is highly experimental and we should keep an eye on it diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 9de0d18578..a224a3806d 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -123,6 +123,7 @@ PyMOD_INIT_FUNC(PartGui) // load needed modules try { Base::Interpreter().runString("import Part"); + Base::Interpreter().runString("import MatGui"); } catch(const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what());