mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #5543. Updating a representation reloads the representation.
This commit is contained in:
@@ -410,6 +410,7 @@ class UpdateRepresentation(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
continue
|
continue
|
||||||
self.update_obj_mesh_representation(context, obj)
|
self.update_obj_mesh_representation(context, obj)
|
||||||
tool.Ifc.finish_edit(obj)
|
tool.Ifc.finish_edit(obj)
|
||||||
|
tool.Geometry.reload_representation(objs)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def update_obj_mesh_representation(self, context: bpy.types.Context, obj: bpy.types.Object) -> None:
|
def update_obj_mesh_representation(self, context: bpy.types.Context, obj: bpy.types.Object) -> None:
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ def update_representation_obj(self, context):
|
|||||||
if data and not data.users:
|
if data and not data.users:
|
||||||
bpy.data.meshes.remove(data)
|
bpy.data.meshes.remove(data)
|
||||||
self.item_objs.clear()
|
self.item_objs.clear()
|
||||||
|
if not self.representation_obj and self.mode != "OBJECT":
|
||||||
|
self.is_changing_mode = True
|
||||||
|
self.mode = "OBJECT"
|
||||||
|
self.is_changing_mode = False
|
||||||
|
|
||||||
|
|
||||||
def get_mode(self, context):
|
def get_mode(self, context):
|
||||||
|
|||||||
@@ -834,6 +834,8 @@ class EditOpenings(Operator, tool.Ifc.Operator):
|
|||||||
self.get_all_building_objects_of_similar_openings(opening)
|
self.get_all_building_objects_of_similar_openings(opening)
|
||||||
) # NB this has nothing to do with clone similar_opening
|
) # NB this has nothing to do with clone similar_opening
|
||||||
tool.Ifc.unlink(element=opening)
|
tool.Ifc.unlink(element=opening)
|
||||||
|
if bpy.context.scene.BIMGeometryProperties.representation_obj == opening_obj:
|
||||||
|
bpy.context.scene.BIMGeometryProperties.representation_obj = None
|
||||||
bpy.data.objects.remove(opening_obj)
|
bpy.data.objects.remove(opening_obj)
|
||||||
|
|
||||||
tool.Model.reload_body_representation(building_objs)
|
tool.Model.reload_body_representation(building_objs)
|
||||||
|
|||||||
Reference in New Issue
Block a user