Material: Editor, fix folders to look for mat cards

This commit is contained in:
Bernd Hahnebach
2018-06-01 08:21:33 +02:00
parent 6ae0aa0659
commit b643d03319

View File

@@ -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 = {}