mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
Reset not applied objects scales during project save
We try to apply scales using bim.update_representation and if didn't worked (presumably because object has openings) we reset the scales. It was confusing for users that they scaled an object, saved IFC and they would know that scaling didn't worked only after they reopen the IFC project.
This commit is contained in:
@@ -146,6 +146,11 @@ class IfcExporter:
|
||||
return
|
||||
if tool.Geometry.is_scaled(obj):
|
||||
bpy.ops.bim.update_representation(obj=obj.name)
|
||||
# update_representation might not apply scale if the object has openings
|
||||
# reset it, so let user know that the scale wasn't saved.
|
||||
if tool.Geometry.is_scaled(obj):
|
||||
print(f"WARNING. Object '{obj.name}' scales ({obj.scale[:]}) are reset during project save.")
|
||||
obj.scale = (1.0, 1.0, 1.0)
|
||||
return element
|
||||
if element.is_a("IfcGridAxis"):
|
||||
return self.sync_grid_axis_object_placement(obj, element)
|
||||
|
||||
Reference in New Issue
Block a user