Fix #1989. Fix bug where you couldn't export to IfcJSON, since it couldn't be imported again.

This commit is contained in:
Dion Moult
2022-01-14 18:55:44 +11:00
parent f8c7f48674
commit d63be20c8b
2 changed files with 13 additions and 1 deletions
@@ -802,7 +802,7 @@ class ExportIFC(bpy.types.Operator):
new.name = output_file
if self.use_relative_path and bpy.data.is_saved:
output_file = os.path.relpath(output_file, bpy.path.abspath("//"))
if scene.BIMProperties.ifc_file != output_file:
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:
bpy.ops.wm.save_mainfile(filepath=bpy.data.filepath)