Make alternate material directory UserAppData/Materials

This commit is contained in:
sgrogan
2015-09-14 08:54:35 -04:00
committed by Yorik van Havre
parent f79d0d8ed2
commit d343b170e9
2 changed files with 4 additions and 4 deletions

View File

@@ -237,10 +237,10 @@ class _ArchMaterialTaskPanel:
def fillMaterialCombo(self):
"fills the combo with the existing FCMat cards"
# look for cards in both resources dir and user folder.
# 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"]
paths.append(FreeCAD.ConfigGet("UserAppData"))
paths.append(FreeCAD.ConfigGet("UserAppData") + os.sep + "Materials")
self.cards = {}
for p in paths:
for f in os.listdir(p):

View File

@@ -93,10 +93,10 @@ class MaterialEditor(QtGui.QDialog):
def updateCards(self):
"updates the contents of the materials combo with existing material cards"
# look for cards in both resources dir and user folder.
# 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"]
paths.append(FreeCAD.ConfigGet("UserAppData"))
paths.append(FreeCAD.ConfigGet("UserAppData") + os.sep + "Materials")
self.cards = {}
for p in paths:
for f in os.listdir(p):