mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Fix 8ac9612 for IfcMaterials
This commit is contained in:
@@ -127,12 +127,12 @@ class Material(bonsai.core.tool.Material):
|
|||||||
|
|
||||||
if category_index_to_reselect is not None:
|
if category_index_to_reselect is not None:
|
||||||
props.active_material_index = category_index_to_reselect
|
props.active_material_index = category_index_to_reselect
|
||||||
return
|
else:
|
||||||
for material in materials:
|
for material in materials:
|
||||||
new = props.materials.add()
|
new = props.materials.add()
|
||||||
new["name"] = get_name(material)
|
new["name"] = get_name(material)
|
||||||
new.ifc_definition_id = material.id()
|
new.ifc_definition_id = material.id()
|
||||||
new.total_elements = len(ifcopenshell.util.element.get_elements_by_material(tool.Ifc.get(), material))
|
new.total_elements = len(ifcopenshell.util.element.get_elements_by_material(tool.Ifc.get(), material))
|
||||||
|
|
||||||
from bonsai.bim.module.material.data import MaterialsData
|
from bonsai.bim.module.material.data import MaterialsData
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user