Skip to content

Commit

Permalink
FEM: Move module loading to InitGui.py
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF committed Oct 22, 2015
1 parent 60c8180 commit 4fb15f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/Mod/Fem/Gui/AppFemGui.cpp
Expand Up @@ -75,26 +75,6 @@ void FemGuiExport initFemGui()
return;
}

try {
Base::Interpreter().loadModule("FemCommands");

Base::Interpreter().loadModule("_CommandMechanicalShowResult");
Base::Interpreter().loadModule("_CommandQuickAnalysis");
Base::Interpreter().loadModule("_CommandPurgeFemResults");
Base::Interpreter().loadModule("_CommandMechanicalJobControl");
Base::Interpreter().loadModule("_CommandFemFromShape");
Base::Interpreter().loadModule("_CommandNewMechanicalAnalysis");

Base::Interpreter().loadModule("MechanicalAnalysis");
Base::Interpreter().loadModule("MechanicalMaterial");
Base::Interpreter().loadModule("FemBeamSection");
Base::Interpreter().loadModule("FemShellThickness");
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
}

(void) Py_InitModule("FemGui", FemGui_Import_methods); /* mod name, table ptr */
Base::Console().Log("Loading GUI of Fem module... done\n");

Expand Down
13 changes: 13 additions & 0 deletions src/Mod/Fem/InitGui.py
Expand Up @@ -41,6 +41,19 @@ def Initialize(self):
# load the module
import Fem
import FemGui

import _CommandMechanicalShowResult
import _CommandQuickAnalysis
import _CommandPurgeFemResults
import _CommandMechanicalJobControl
import _CommandFemFromShape
import _CommandNewMechanicalAnalysis

import MechanicalAnalysis
import MechanicalMaterial
import FemBeamSection
import FemShellThickness

import subprocess
from platform import system
ccx_path = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem").GetString("ccxBinaryPath")
Expand Down

0 comments on commit 4fb15f2

Please sign in to comment.