mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 21:38:12 +00:00
Fix bug where edit mode syncing didn't work if you edited many objects at once
This commit is contained in:
@@ -9,17 +9,18 @@ from ifcopenshell.api.attribute.data import Data as AttributeData
|
|||||||
|
|
||||||
|
|
||||||
def mode_callback(obj, data):
|
def mode_callback(obj, data):
|
||||||
if (
|
for obj in bpy.context.selected_objects:
|
||||||
obj.mode != "OBJECT"
|
if (
|
||||||
or not obj.data
|
obj.mode != "OBJECT"
|
||||||
or not isinstance(obj.data, bpy.types.Mesh)
|
or not obj.data
|
||||||
or not obj.data.BIMMeshProperties.ifc_definition_id
|
or not isinstance(obj.data, bpy.types.Mesh)
|
||||||
or not bpy.context.scene.BIMProjectProperties.is_authoring
|
or not obj.data.BIMMeshProperties.ifc_definition_id
|
||||||
):
|
or not bpy.context.scene.BIMProjectProperties.is_authoring
|
||||||
return
|
):
|
||||||
representation = IfcStore.get_file().by_id(obj.data.BIMMeshProperties.ifc_definition_id)
|
return
|
||||||
if representation.RepresentationType == "Tessellation" or representation.RepresentationType == "Brep":
|
representation = IfcStore.get_file().by_id(obj.data.BIMMeshProperties.ifc_definition_id)
|
||||||
IfcStore.edited_objs.add(obj.name)
|
if representation.RepresentationType == "Tessellation" or representation.RepresentationType == "Brep":
|
||||||
|
IfcStore.edited_objs.add(obj.name)
|
||||||
|
|
||||||
|
|
||||||
def name_callback(obj, data):
|
def name_callback(obj, data):
|
||||||
|
|||||||
Reference in New Issue
Block a user