From b643d033193ca53c384d8d84fc85136c5413f1fe Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 1 Jun 2018 08:21:33 +0200 Subject: [PATCH] Material: Editor, fix folders to look for mat cards --- src/Mod/Material/MaterialEditor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Material/MaterialEditor.py b/src/Mod/Material/MaterialEditor.py index 496d461267..18d29c93af 100644 --- a/src/Mod/Material/MaterialEditor.py +++ b/src/Mod/Material/MaterialEditor.py @@ -78,8 +78,9 @@ class MaterialEditor: "updates the contents of the materials combo with existing material cards" # look for cards in both resources dir and a Materials sub-folder in the user folder. # User cards with same name will override system cards - paths = [FreeCAD.getResourceDir() + os.sep + "Mod" + os.sep + "Material" + os.sep + "StandardMaterial"] - ap = FreeCAD.ConfigGet("UserAppData") + os.sep + "Materials" + # FreeCAD returns paths with / at the end, thus not os.sep is needed on first + + paths = [FreeCAD.getResourceDir() + "Mod" + os.sep + "Material" + os.sep + "StandardMaterial"] + ap = FreeCAD.ConfigGet("UserAppData") + "Material" if os.path.exists(ap): paths.append(ap) self.cards = {}