railing, roof - save representation to ifc instead of marking it as edited #5610

This commit is contained in:
Andrej730
2024-10-21 18:01:31 +05:00
parent 492df2310d
commit c581946fa8
3 changed files with 5 additions and 2 deletions
@@ -107,11 +107,12 @@ def update_railing_modifier_ifc_data(context: bpy.types.Context) -> None:
)
tool.Model.replace_object_ifc_representation(body, obj, model_representation)
# TODO: is still necessary? Seems to be needed only because FRAMELESS_PANEL was using too.Ifc.edit.
# hacky way to ensure tha ifc representation won't get tessellated at project save
tool.Ifc.finish_edit(obj)
elif props.railing_type == "FRAMELESS_PANEL":
tool.Ifc.edit(obj)
tool.Model.add_body_representation(obj)
def update_bbim_railing_pset(element: ifcopenshell.entity_instance, railing_data: dict[str, Any]) -> None:
+1 -1
View File
@@ -417,7 +417,7 @@ def update_roof_modifier_ifc_data(context: bpy.types.Context) -> None:
# occurrences attributes
# occurrences = tool.Ifc.get_all_element_occurrences(element)
tool.Ifc.edit(obj)
tool.Model.add_body_representation(obj)
def update_bbim_roof_pset(element: ifcopenshell.entity_instance, roof_data: dict[str, Any]) -> None:
@@ -126,6 +126,8 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator):
representation=representation,
should_reload=True,
is_global=True,
# Don't sync changes because object has an opening,
# therefore bim.update_representaiton wouldn't work either way.
should_sync_changes_first=False,
)