This commit is contained in:
Andrej730
2024-10-24 17:53:35 +05:00
parent 9998442eb4
commit 1642f231fb
3 changed files with 13 additions and 3 deletions
+2 -2
View File
@@ -40,11 +40,11 @@ from logging import Logger
class IfcExporter:
def __init__(self, ifc_export_settings):
def __init__(self, ifc_export_settings: IfcExportSettings):
self.ifc_export_settings = ifc_export_settings
def export(self):
self.file = IfcStore.get_file()
self.file = tool.Ifc.get()
self.set_header()
IfcStore.update_cache()
self.sync_all_objects()
+6
View File
@@ -28,6 +28,12 @@ if TYPE_CHECKING:
def edit_object_placement(
ifc: tool.Ifc, geometry: tool.Geometry, surveyor: tool.Surveyor, obj: Optional[bpy.types.Object] = None
) -> None:
"""Sync current object placement.
- apply and clear object scale;
- write current object position to IFC;
- update position checksums;
"""
element = ifc.get_entity(obj)
if not element:
return
+5 -1
View File
@@ -82,7 +82,11 @@ class Geometry(bonsai.core.tool.Geometry):
@classmethod
def clear_scale(cls, obj: bpy.types.Object) -> None:
# Note that clearing scale has no impact on cameras.
"""Apply and clear object scale.
If it's a mesh object, scale will be applied to it's mesh.
Note that clearing scale has no impact on cameras.
"""
if cls.is_scaled(obj):
if not obj.data:
location, rotation, _ = obj.matrix_world.decompose()