mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
fix delete material operator
This commit is contained in:
@@ -250,7 +250,8 @@ class UnassignMaterial(bpy.types.Operator, tool.Ifc.Operator):
|
||||
if element:
|
||||
material = ifcopenshell.util.element.get_material(element, should_inherit=False)
|
||||
inherited_material = ifcopenshell.util.element.get_material(element, should_inherit=True)
|
||||
if "Usage" in material.is_a():
|
||||
print(material, inherited_material)
|
||||
if material and "Usage" in material.is_a():
|
||||
element_type = ifcopenshell.util.element.get_type(element)
|
||||
ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=element_type)
|
||||
elif not material and inherited_material:
|
||||
|
||||
Reference in New Issue
Block a user