From 8c21c74ff509558615f2fb4576bd560410428fbc Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 1 Aug 2023 15:21:23 +0500 Subject: [PATCH] Communicate that blend file is also saved on Ctrl-S https://i.imgur.com/BnzTDhM.png --- src/blenderbim/blenderbim/bim/module/project/operator.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/project/operator.py b/src/blenderbim/blenderbim/bim/module/project/operator.py index 69d1bcfc88..a929cb638e 100644 --- a/src/blenderbim/blenderbim/bim/module/project/operator.py +++ b/src/blenderbim/blenderbim/bim/module/project/operator.py @@ -1028,10 +1028,14 @@ class ExportIFC(bpy.types.Operator): output_file = os.path.relpath(output_file, bpy.path.abspath("//")) if scene.BIMProperties.ifc_file != output_file and extension not in ["ifczip", "ifcjson"]: scene.BIMProperties.ifc_file = output_file - if bpy.data.is_saved and bpy.data.is_dirty and bpy.data.filepath: + save_blend_file = bool(bpy.data.is_saved and bpy.data.is_dirty and bpy.data.filepath) + if save_blend_file: bpy.ops.wm.save_mainfile(filepath=bpy.data.filepath) blenderbim.bim.handler.purge_module_data() - self.report({"INFO"}, f'IFC Project "{os.path.basename(output_file)}" Saved') + self.report( + {"INFO"}, + f'IFC Project "{os.path.basename(output_file)}" {"" if not save_blend_file else "And Current Blend File Are"} Saved', + ) if bpy.data.is_saved: bpy.ops.wm.save_mainfile("INVOKE_DEFAULT")