From 8c123bad50ad95a95ab6e6d544dbed4a26527cf1 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 1 Jun 2022 11:21:51 +0200 Subject: [PATCH] App: add default macro directory to sys.path --- src/App/FreeCADInit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index 2285c9da36..a291be8030 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -111,7 +111,8 @@ def InitApplications(): AddPath = FreeCAD.ConfigGet("AdditionalModulePaths").split(";") HomeMod = FreeCAD.getUserAppDataDir()+"Mod" HomeMod = os.path.realpath(HomeMod) - MacroDir = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro").GetString("MacroPath") + MacroStd = App.getUserMacroDir(False) + MacroDir = App.getUserMacroDir(True) MacroMod = os.path.realpath(MacroDir+"/Mod") SystemWideMacroDir = FreeCAD.getHomePath()+'Macro' SystemWideMacroDir = os.path.realpath(SystemWideMacroDir) @@ -278,6 +279,7 @@ def InitApplications(): for i in path: Log(" " + i + "\n") # add MacroDir to path (RFE #0000504) + sys.path.append(MacroStd) sys.path.append(MacroDir) # add SystemWideMacroDir to path sys.path.append(SystemWideMacroDir)