Macro: allow to specify extra system paths for macro

This introduce new option `-E [ --macro-path]` to specify extra system
paths of macros. The macro found in this paths will appear in `Macros`
dialog at `System macros` tab.

Change-Id: Ic21631ec0ebe8af5c7f42b4fe95400cfb67807d5
This commit is contained in:
Yury Shvedov
2024-12-15 15:30:39 +03:00
committed by Yorik van Havre
parent 93aa3b312f
commit f48ccba2d9
4 changed files with 59 additions and 30 deletions

View File

@@ -98,7 +98,8 @@ def InitApplications():
LibFcDir = os.path.realpath(LibFcDir)
if (os.path.exists(LibFcDir) and not LibFcDir in libpaths):
libpaths.append(LibFcDir)
AddPath = FreeCAD.ConfigGet("AdditionalModulePaths").split(";")
AddPath = FreeCAD.ConfigGet("AdditionalModulePaths").split(";") + \
FreeCAD.ConfigGet("AdditionalMacroPaths").split(";")
HomeMod = FreeCAD.getUserAppDataDir()+"Mod"
HomeMod = os.path.realpath(HomeMod)
MacroStd = App.getUserMacroDir(False)