Skip to content

Commit

Permalink
Bug fix: Add System-wide Macro dir to python path
Browse files Browse the repository at this point in the history
=================================================

Self explanatory, so that macros in system-wide location can import modules therein.
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed Jan 11, 2016
1 parent 7fc7bdc commit f1a3276
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/App/FreeCADInit.py
Expand Up @@ -52,6 +52,8 @@ def InitApplications():
HomeMod = os.path.realpath(HomeMod)
MacroDir = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro").GetString("MacroPath")
MacroMod = os.path.realpath(MacroDir+"/Mod")
SystemWideMacroDir = FreeCAD.getHomePath()+'Macro'
SystemWideMacroDir = os.path.realpath(SystemWideMacroDir)

#print FreeCAD.getHomePath()
if os.path.isdir(FreeCAD.getHomePath()+'src\\Tools'):
Expand Down Expand Up @@ -130,6 +132,8 @@ def InitApplications():
Log(" " + i + "\n")
# add MacroDir to path (RFE #0000504)
sys.path.append(MacroDir)
# add SystemWideMacroDir to path
sys.path.append(SystemWideMacroDir)
# add special path for MacOSX (bug #0000307)
import platform
if len(platform.mac_ver()[0]) > 0:
Expand Down

0 comments on commit f1a3276

Please sign in to comment.