Skip to content

Commit

Permalink
Material: Call to import_materials only returning solids
Browse files Browse the repository at this point in the history
Fixes FreeCAD#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.
  • Loading branch information
davesrocketshop committed Mar 14, 2024
1 parent d195787 commit 1b22ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Material/materialtools/cardutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b22ed6

Please sign in to comment.