mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 03:59:55 +00:00
See #6536. Recalculate profile only for selected objects.
This commit is contained in:
@@ -632,18 +632,7 @@ class EditAssignedMaterial(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
usage=material_set_usage,
|
usage=material_set_usage,
|
||||||
attributes=attributes,
|
attributes=attributes,
|
||||||
)
|
)
|
||||||
profile_sets_to_regenerate = set()
|
model_profile.DumbProfileRecalculator().recalculate(objects)
|
||||||
|
|
||||||
for obj in objects:
|
|
||||||
obj_element = tool.Ifc.get_entity(obj)
|
|
||||||
obj_material_usage = ifcopenshell.util.element.get_material(obj_element)
|
|
||||||
|
|
||||||
if obj_material_usage and obj_material_usage.is_a("IfcMaterialProfileSetUsage"):
|
|
||||||
profile_sets_to_regenerate.add(obj_material_usage.ForProfileSet)
|
|
||||||
|
|
||||||
for profile_set in profile_sets_to_regenerate:
|
|
||||||
for material_profile in profile_set.MaterialProfiles:
|
|
||||||
model_profile.DumbProfileRegenerator().regenerate_from_profile_def(material_profile.Profile)
|
|
||||||
|
|
||||||
bpy.ops.bim.disable_editing_assigned_material(obj=active_obj.name)
|
bpy.ops.bim.disable_editing_assigned_material(obj=active_obj.name)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user