This commit is contained in:
Gorgious
2021-08-18 07:59:23 +02:00
parent 2d730fbee7
commit 799fb688b5
+6
View File
@@ -182,6 +182,8 @@ def redo_pre(scene):
@persistent @persistent
def redo_post(scene): def redo_post(scene):
if scene is None:
scene = bpy.context.scene
if IfcStore.last_transaction != scene.BIMProperties.last_transaction: if IfcStore.last_transaction != scene.BIMProperties.last_transaction:
IfcStore.last_transaction = scene.BIMProperties.last_transaction IfcStore.last_transaction = scene.BIMProperties.last_transaction
IfcStore.redo() IfcStore.redo()
@@ -192,6 +194,8 @@ def redo_post(scene):
@persistent @persistent
def ensureIfcExported(scene): def ensureIfcExported(scene):
if scene is None:
scene = bpy.context.scene
if IfcStore.get_file() and not scene.BIMProperties.ifc_file: if IfcStore.get_file() and not scene.BIMProperties.ifc_file:
bpy.ops.export_ifc.bim("INVOKE_DEFAULT") bpy.ops.export_ifc.bim("INVOKE_DEFAULT")
@@ -225,6 +229,8 @@ def get_application_version():
@persistent @persistent
def setDefaultProperties(scene): def setDefaultProperties(scene):
if scene is None:
scene = bpy.context.scene
global global_subscription_owner global global_subscription_owner
active_object_key = bpy.types.LayerObjects, "active" active_object_key = bpy.types.LayerObjects, "active"
bpy.msgbus.subscribe_rna( bpy.msgbus.subscribe_rna(