mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
rename bim.export_ifc to bim.save_project (similar to bim.load_project)
note that old name "export_ifc.bim" is still available (cacb38a25) though deprecated
This commit is contained in:
@@ -97,7 +97,7 @@ def register():
|
||||
addon_keymaps.append((km, kmi))
|
||||
|
||||
km = wm.keyconfigs.addon.keymaps.new(name="Window", space_type="EMPTY")
|
||||
kmi = km.keymap_items.new("bim.export_ifc", "S", "PRESS", ctrl=True)
|
||||
kmi = km.keymap_items.new("bim.save_project", "S", "PRESS", ctrl=True)
|
||||
kmi.properties.should_save_as = False
|
||||
addon_keymaps.append((km, kmi))
|
||||
|
||||
|
||||
@@ -1107,7 +1107,7 @@ class ToggleLinkVisibility(bpy.types.Operator):
|
||||
|
||||
|
||||
class ExportIFCBase:
|
||||
bl_idname = "bim.export_ifc"
|
||||
bl_idname = "bim.save_project"
|
||||
bl_label = "Save IFC"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
filename_ext = ".ifc"
|
||||
@@ -1225,7 +1225,7 @@ class ExportIFCBase:
|
||||
|
||||
|
||||
class ExportIFC(ExportIFCBase, bpy.types.Operator):
|
||||
bl_idname = "bim.export_ifc"
|
||||
pass
|
||||
|
||||
|
||||
# TODO: remove as deprecated, better wait couple releases since
|
||||
|
||||
@@ -68,9 +68,9 @@ def file_menu(self, context):
|
||||
op = self.layout.operator("bim.load_project", text="Open IFC Project", icon="FILEBROWSER")
|
||||
op.should_start_fresh_session = True
|
||||
self.layout.separator()
|
||||
op = self.layout.operator("bim.export_ifc", icon="FILE_TICK", text="Save IFC Project")
|
||||
op = self.layout.operator("bim.save_project", icon="FILE_TICK", text="Save IFC Project")
|
||||
op.should_save_as = False
|
||||
op = self.layout.operator("bim.export_ifc", text="Save IFC Project As...")
|
||||
op = self.layout.operator("bim.save_project", text="Save IFC Project As...")
|
||||
op.should_save_as = True
|
||||
self.layout.separator()
|
||||
self.layout.operator("bim.revert_project")
|
||||
|
||||
@@ -960,7 +960,7 @@ def run_test_code():
|
||||
def saving_sample_test_files(and_open_in_blender=None):
|
||||
filepath = f"{variables['cwd']}/test/files/temp/sample_test_file"
|
||||
blend_filepath = f"{filepath}.blend"
|
||||
bpy.ops.bim.export_ifc(filepath=f"{filepath}.ifc", should_save_as=True)
|
||||
bpy.ops.bim.save_project(filepath=f"{filepath}.ifc", should_save_as=True)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=f"{filepath}.blend")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user