From c5505bc438b1a41f8e1a8fdf18920f251001a3e7 Mon Sep 17 00:00:00 2001 From: David Carter Date: Thu, 14 Mar 2024 00:45:02 -0400 Subject: [PATCH] Material: Call to import_materials only returning solids Fixes #12933 The previous card implementation used a parameter to select either solids or fluids. The current material dictionary ignored the parameter and only returned solids. This PR restores the use of the material type filter. --- src/Mod/Material/materialtools/cardutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Material/materialtools/cardutils.py b/src/Mod/Material/materialtools/cardutils.py index 54280d86d8..4f5bbb76dc 100644 --- a/src/Mod/Material/materialtools/cardutils.py +++ b/src/Mod/Material/materialtools/cardutils.py @@ -269,7 +269,7 @@ def import_materials(category='Solid', template=False): mat = materialManager.getMaterial(matUUID) physicalModels = mat.PhysicalModels fluid = ('1ae66d8c-1ba1-4211-ad12-b9917573b202' in physicalModels) - if not fluid: + if (category == 'Solid' and not fluid) or (category != 'Solid' and fluid): path = mat.LibraryRoot + "/" + mat.Directory materials[path] = mat.Properties