mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Fix critical bug where types would think they moved and cause long syncs at export time.
This commit is contained in:
@@ -154,10 +154,10 @@ class IfcExporter:
|
|||||||
return checksum != repr(np.array(obj.diffuse_color).tobytes())
|
return checksum != repr(np.array(obj.diffuse_color).tobytes())
|
||||||
|
|
||||||
def sync_object_placement(self, obj):
|
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
|
return
|
||||||
blender_matrix = np.array(obj.matrix_world)
|
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:
|
if (obj.scale - Vector((1.0, 1.0, 1.0))).length > 1e-4:
|
||||||
bpy.ops.bim.update_representation(obj=obj.name)
|
bpy.ops.bim.update_representation(obj=obj.name)
|
||||||
return element
|
return element
|
||||||
|
|||||||
Reference in New Issue
Block a user