FEM: preparation for moveing objects
This commit is contained in:
@@ -319,6 +319,10 @@ INSTALL(FILES ${FemObjectsScripts_SRCS} DESTINATION Mod/Fem/femobjects)
|
||||
|
||||
|
||||
# Python Gui packages and modules
|
||||
SET(FemGuiViewObjects_SRCS
|
||||
femviewprovider/__init__.py
|
||||
)
|
||||
|
||||
SET(FemGuiScripts_SRCS
|
||||
femguiobjects/__init__.py
|
||||
femguiobjects/_ViewProviderFemConstraintBodyHeatSource.py
|
||||
@@ -350,6 +354,7 @@ SET(FemGuiUtils_SRCS
|
||||
)
|
||||
|
||||
SET(FemAllGuiScripts
|
||||
${FemGuiViewObjects_SRCS}
|
||||
${FemGuiScripts_SRCS}
|
||||
${FemGuiUtils_SRCS}
|
||||
)
|
||||
@@ -361,6 +366,7 @@ if(BUILD_GUI)
|
||||
fc_copy_sources(FemGuiScriptsTarget "${CMAKE_BINARY_DIR}/Mod/Fem" ${FemAllGuiScripts})
|
||||
|
||||
# install Python packages (for make install)
|
||||
INSTALL(FILES ${FemGuiScripts_SRCS} DESTINATION Mod/Fem/femguiobjects)
|
||||
INSTALL(FILES ${FemGuiViewObjects_SRCS} DESTINATION Mod/Fem/femviewprovider/)
|
||||
INSTALL(FILES ${FemGuiScripts_SRCS} DESTINATION Mod/Fem/femguiobjects/)
|
||||
INSTALL(FILES ${FemGuiUtils_SRCS} DESTINATION Mod/Fem/femguiutils/)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
@@ -36,9 +36,12 @@ import FreeCAD
|
||||
class FemMigrateApp(object):
|
||||
|
||||
def find_module(self, fullname, path):
|
||||
if fullname == "PyObjects":
|
||||
|
||||
if fullname == "femobjects":
|
||||
return self
|
||||
|
||||
if fullname == "PyObjects":
|
||||
return self
|
||||
if fullname == "PyObjects._FemConstraintBodyHeatSource":
|
||||
return self
|
||||
if fullname == "PyObjects._FemConstraintElectrostaticPotential":
|
||||
@@ -130,9 +133,12 @@ class FemMigrateApp(object):
|
||||
return self.load_module(module)
|
||||
|
||||
def load_module(self, module):
|
||||
|
||||
if module.__name__ == "femobjects":
|
||||
module.__path__ = "femobjects"
|
||||
|
||||
if module.__name__ == "PyObjects":
|
||||
module.__path__ = "PyObjects"
|
||||
|
||||
if module.__name__ == "PyObjects._FemConstraintBodyHeatSource":
|
||||
import femobjects._FemConstraintBodyHeatSource
|
||||
module.Proxy = femobjects._FemConstraintBodyHeatSource.Proxy
|
||||
@@ -273,6 +279,10 @@ class FemMigrateApp(object):
|
||||
possible entries in the old files:
|
||||
(the class name in the old file does not matter, we ever only had one class per module)
|
||||
|
||||
fourth big moving
|
||||
renaming class and module names in femobjects
|
||||
TODO add link to commit before the first commit
|
||||
|
||||
third big moving
|
||||
from PyObjects to femobjects, following the parent commit
|
||||
https://github.com/berndhahnebach/FreeCAD_bhb/tree/07ae0e56c4/src/Mod/Fem/PyObjects
|
||||
|
||||
@@ -34,9 +34,12 @@ __url__ = "http://www.freecadweb.org"
|
||||
class FemMigrateGui(object):
|
||||
|
||||
def find_module(self, fullname, path):
|
||||
if fullname == "PyGui":
|
||||
|
||||
if fullname == "femguiobjects":
|
||||
return self
|
||||
|
||||
if fullname == "PyGui":
|
||||
return self
|
||||
if fullname == "PyGui._ViewProviderFemConstraintBodyHeatSource":
|
||||
return self
|
||||
if fullname == "PyGui._ViewProviderFemConstraintElectrostaticPotential":
|
||||
@@ -118,9 +121,12 @@ class FemMigrateGui(object):
|
||||
return self.load_module(module)
|
||||
|
||||
def load_module(self, module):
|
||||
|
||||
if module.__name__ == "femguiobjects":
|
||||
module.__path__ = "femguiobjects"
|
||||
|
||||
if module.__name__ == "PyGui":
|
||||
module.__path__ = "PyGui"
|
||||
|
||||
if module.__name__ == "PyGui._ViewProviderFemConstraintBodyHeatSource":
|
||||
import femguiobjects._ViewProviderFemConstraintBodyHeatSource
|
||||
module.ViewProxy = femguiobjects._ViewProviderFemConstraintBodyHeatSource.ViewProxy
|
||||
@@ -237,6 +243,10 @@ class FemMigrateGui(object):
|
||||
possible entries in the old files:
|
||||
(the class name in the old file does not matter, we ever only had one class per module)
|
||||
|
||||
fourth big moving
|
||||
renaming class and module names in femobjects
|
||||
TODO add link to commit before the first commit
|
||||
|
||||
third big moving
|
||||
from PyGui to femguiobjects, following the parent commit
|
||||
https://github.com/berndhahnebach/FreeCAD_bhb/tree/07ae0e56c4/src/Mod/Fem/PyGui
|
||||
@@ -295,6 +305,4 @@ module="FemBeamSection"
|
||||
module="FemShellThickness"
|
||||
module="MechanicalAnalysis"
|
||||
module="MechanicalMaterial"
|
||||
|
||||
|
||||
"""
|
||||
|
||||
0
src/Mod/Fem/femviewprovider/__init__.py
Normal file
0
src/Mod/Fem/femviewprovider/__init__.py
Normal file
Reference in New Issue
Block a user