Fix critical bug where types would think they moved and cause long syncs at export time.

This commit is contained in:
Dion Moult
2023-03-24 20:52:20 +11:00
parent 57c32e55c2
commit 8aa2c1eea7
+2 -2
View File
@@ -154,10 +154,10 @@ class IfcExporter:
return checksum != repr(np.array(obj.diffuse_color).tobytes())
def sync_object_placement(self, obj):
if not tool.Ifc.is_moved(obj):
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
if element.is_a("IfcTypeProduct") or element.is_a("IfcProject") or not tool.Ifc.is_moved(obj):
return
blender_matrix = np.array(obj.matrix_world)
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
if (obj.scale - Vector((1.0, 1.0, 1.0))).length > 1e-4:
bpy.ops.bim.update_representation(obj=obj.name)
return element