Add dynamic tool tip for parametrized "Save" in IFC project

This commit is contained in:
Trashman247
2023-04-07 20:55:59 -07:00
committed by Dion Moult
parent e153f63a23
commit 27c52fe6d5
@@ -812,7 +812,6 @@ class ExportIFC(bpy.types.Operator):
bl_idname = "export_ifc.bim" bl_idname = "export_ifc.bim"
bl_label = "Export IFC" bl_label = "Export IFC"
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
bl_description = "Export the IFC project"
filename_ext = ".ifc" filename_ext = ".ifc"
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml;*.ifcjson", options={"HIDDEN"}) filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml;*.ifcjson", options={"HIDDEN"})
filepath: bpy.props.StringProperty(subtype="FILE_PATH") filepath: bpy.props.StringProperty(subtype="FILE_PATH")
@@ -892,6 +891,13 @@ class ExportIFC(bpy.types.Operator):
blenderbim.bim.handler.purge_module_data() blenderbim.bim.handler.purge_module_data()
return {"FINISHED"} return {"FINISHED"}
@classmethod
def description(cls, context, properties):
if properties.should_save_as == False:
return "Export the IFC project to this file"
else:
return "Export the IFC project to a selected file"
class ImportIFC(bpy.types.Operator): class ImportIFC(bpy.types.Operator):
bl_idname = "import_ifc.bim" bl_idname = "import_ifc.bim"