Fix bug where import mesh cleaning would inadvertently mark meshes as edited

This commit is contained in:
Dion Moult
2021-04-21 20:40:45 +10:00
parent 5e815e7832
commit ef88b30639
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ from ifcopenshell.api.attribute.data import Data as AttributeData
def mode_callback(obj, data):
for obj in bpy.context.selected_objects:
if (
obj.mode != "OBJECT"
obj.mode != "EDIT"
or not obj.data
or not isinstance(obj.data, bpy.types.Mesh)
or not obj.data.BIMMeshProperties.ifc_definition_id
@@ -1000,6 +1000,7 @@ class IfcImporter:
bpy.ops.mesh.tris_convert_to_quads(context_override)
bpy.ops.mesh.normals_make_consistent(context_override)
bpy.ops.object.editmode_toggle(context_override)
IfcStore.edited_objs.clear()
def add_opening_relation(self, element, obj):
if not element.is_a("IfcOpeningElement"):