mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Communicate that blend file is also saved on Ctrl-S
https://i.imgur.com/BnzTDhM.png
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user