-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path__init__.py
40 lines (32 loc) · 876 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
__title__ = "Part-o-magic package"
__doc__ = """Experimental container automation for FreeCAD"""
__all__ = [
"Base",
"Gui",
"Features",
]
def importAll():
"importAll(): imports all modules of Part-o-magic"
from . import Base
from . import Gui
from . import Features
for modstr in __all__:
mod = globals()[modstr]
if hasattr(mod, "importAll"):
mod.importAll()
def reloadAll():
"reloadAll(): reloads all modules of Part-o-magic. Useful for debugging."
try: #py2-3 compatibility: obtain reload() function
reload
except Exception:
from importlib import reload
for modstr in __all__:
mod = globals()[modstr]
reload(mod)
if hasattr(mod, "reloadAll"):
mod.reloadAll()
import FreeCAD
if FreeCAD.GuiUp:
addCommands()
def addCommands():
pass