Materials: External Module Support

The final PR for the external module feature that allows materials to
be stored in an external datastore, webservice, etc.

This includes the final material manager classes, and the UI support in
the form of commands and preference pages.
This commit is contained in:
David Carter
2025-04-28 16:11:02 -04:00
committed by Chris Hennes
parent 1bf21f85bd
commit ffb7ab779b
23 changed files with 1336 additions and 16 deletions

View File

@@ -57,6 +57,9 @@ class MaterialFilterTestCases(unittest.TestCase):
self.useUserDir = param.GetBool("UseMaterialsFromConfigDir", True)
self.useCustomDir = param.GetBool("UseMaterialsFromCustomDir", False)
paramExternal = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Material/ExternalInterface")
self.useExternal = paramExternal.GetBool("UseExternal", False)
filePath = os.path.dirname(__file__) + os.sep
testPath = filePath + "Materials"
param.SetString("CustomMaterialsDir", testPath)
@@ -65,6 +68,8 @@ class MaterialFilterTestCases(unittest.TestCase):
param.SetBool("UseMaterialsFromConfigDir", False)
param.SetBool("UseMaterialsFromCustomDir", True)
paramExternal.SetBool("UseExternal", False)
self.MaterialManager.refresh()
def tearDown(self):
@@ -77,6 +82,9 @@ class MaterialFilterTestCases(unittest.TestCase):
param.SetBool("UseMaterialsFromConfigDir", self.useUserDir)
param.SetBool("UseMaterialsFromCustomDir", self.useCustomDir)
paramExternal = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Material/ExternalInterface")
paramExternal.SetBool("UseExternal", self.useExternal)
self.MaterialManager.refresh()
def testFilter(self):