mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
@@ -242,6 +242,8 @@ class SerializeBrick(bpy.types.Operator, ExportHelper):
|
|||||||
bl_label = "Serialize Brick"
|
bl_label = "Serialize Brick"
|
||||||
# Prevents crash on Blender 4.4.0.
|
# Prevents crash on Blender 4.4.0.
|
||||||
bl_description = "Save active Brick project by the provided filepath."
|
bl_description = "Save active Brick project by the provided filepath."
|
||||||
|
|
||||||
|
filename_ext = ".ttl"
|
||||||
filter_glob: bpy.props.StringProperty(default="*.ttl", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ttl", options={"HIDDEN"})
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
should_save_as: bpy.props.BoolProperty(name="Should Save As", default=False, options={"HIDDEN"})
|
should_save_as: bpy.props.BoolProperty(name="Should Save As", default=False, options={"HIDDEN"})
|
||||||
|
|||||||
@@ -192,8 +192,13 @@ class ExecuteIfcClash(bpy.types.Operator, ExportHelper):
|
|||||||
bl_label = "Execute IFC Clash"
|
bl_label = "Execute IFC Clash"
|
||||||
bl_description = "Execute clash detection and save the information to a .bcf or .json file"
|
bl_description = "Execute clash detection and save the information to a .bcf or .json file"
|
||||||
filter_glob: bpy.props.StringProperty(default="*.bcf;*.json", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.bcf;*.json", options={"HIDDEN"})
|
||||||
|
format: bpy.props.EnumProperty(name="Format", items=[(i, i, "") for i in ("bcf", "json")])
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
|
||||||
|
|
||||||
|
@property
|
||||||
|
def filename_ext(self) -> str:
|
||||||
|
return f".{self.format.lower()}"
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
if self.filepath:
|
if self.filepath:
|
||||||
return self.execute(context)
|
return self.execute(context)
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ class ExportIfcCsv(bpy.types.Operator, ExportHelper):
|
|||||||
bl_label = "Export IFC"
|
bl_label = "Export IFC"
|
||||||
bl_description = "Export IFC data as a spreadsheet."
|
bl_description = "Export IFC data as a spreadsheet."
|
||||||
filename_ext = ".csv"
|
filename_ext = ".csv"
|
||||||
|
filter_glob: bpy.props.StringProperty(default="*.csv", options={"HIDDEN"})
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -202,6 +203,8 @@ class ExportIfcCsv(bpy.types.Operator, ExportHelper):
|
|||||||
props = tool.Blender.get_csv_props()
|
props = tool.Blender.get_csv_props()
|
||||||
if props.format == "web":
|
if props.format == "web":
|
||||||
return self.execute(context)
|
return self.execute(context)
|
||||||
|
self.filter_glob = f"*.{props.format}"
|
||||||
|
self.filename_ext = f".{props.format}"
|
||||||
return ExportHelper.invoke(self, context, event)
|
return ExportHelper.invoke(self, context, event)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
|||||||
@@ -528,6 +528,7 @@ class PurgeUnusedElementsByClass(bpy.types.Operator, tool.Ifc.Operator, ExportHe
|
|||||||
"ALT+CLICK to provide a path where to save the IFC file with the removed elements (note changes will be applied to the current IFC too)"
|
"ALT+CLICK to provide a path where to save the IFC file with the removed elements (note changes will be applied to the current IFC too)"
|
||||||
)
|
)
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
filename_ext = ".ifc"
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
|
||||||
filter_glob: bpy.props.StringProperty(default="*.ifc", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ifc", options={"HIDDEN"})
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,19 @@ class ExecuteIfcFM(bpy.types.Operator, ExportHelper):
|
|||||||
bl_idname = "bim.execute_ifcfm"
|
bl_idname = "bim.execute_ifcfm"
|
||||||
bl_label = "Execute IfcFM"
|
bl_label = "Execute IfcFM"
|
||||||
bl_description = "Export IfcFM data as a spreadsheet."
|
bl_description = "Export IfcFM data as a spreadsheet."
|
||||||
file_format: bpy.props.StringProperty()
|
|
||||||
filter_glob: bpy.props.StringProperty(default="*.csv;*.ods;*.xlsx", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.csv;*.ods;*.xlsx", options={"HIDDEN"})
|
||||||
|
|
||||||
|
@property
|
||||||
|
def filename_ext(self) -> str:
|
||||||
|
props = bpy.context.scene.BIMFMProperties
|
||||||
|
return f".{props.format}"
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
props = context.scene.BIMFMProperties
|
||||||
|
layout.prop(props, "format")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
props = context.scene.BIMFMProperties
|
props = context.scene.BIMFMProperties
|
||||||
@@ -42,11 +52,6 @@ class ExecuteIfcFM(bpy.types.Operator, ExportHelper):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def invoke(self, context, event):
|
|
||||||
props = context.scene.BIMFMProperties
|
|
||||||
self.filepath = bpy.path.ensure_ext(bpy.data.filepath, f".{props.format}")
|
|
||||||
return ExportHelper.invoke(self, context, event)
|
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
props = context.scene.BIMFMProperties
|
props = context.scene.BIMFMProperties
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
@@ -105,6 +110,16 @@ class ExecuteIfcFMFederate(bpy.types.Operator, ExportHelper):
|
|||||||
bl_description = "Merge added IfcFM spreadsheets."
|
bl_description = "Merge added IfcFM spreadsheets."
|
||||||
filter_glob: bpy.props.StringProperty(default="*.ods;*.xlsx", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ods;*.xlsx", options={"HIDDEN"})
|
||||||
|
|
||||||
|
@property
|
||||||
|
def filename_ext(self) -> str:
|
||||||
|
props = bpy.context.scene.BIMFMProperties
|
||||||
|
return f".{props.format}"
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
props = context.scene.BIMFMProperties
|
||||||
|
layout.prop(props, "format")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
props = context.scene.BIMFMProperties
|
props = context.scene.BIMFMProperties
|
||||||
@@ -113,11 +128,6 @@ class ExecuteIfcFMFederate(bpy.types.Operator, ExportHelper):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def invoke(self, context, event):
|
|
||||||
props = context.scene.BIMFMProperties
|
|
||||||
self.filepath = bpy.path.ensure_ext(bpy.data.filepath, f".{props.format}")
|
|
||||||
return ExportHelper.invoke(self, context, event)
|
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
props = context.scene.BIMFMProperties
|
props = context.scene.BIMFMProperties
|
||||||
parser = ifcfm.Parser(preset=props.engine)
|
parser = ifcfm.Parser(preset=props.engine)
|
||||||
|
|||||||
@@ -638,6 +638,7 @@ class RADIANCE_OT_export_material_mappings(bpy.types.Operator, ExportHelper):
|
|||||||
bl_description = "Export material mappings to a JSON file"
|
bl_description = "Export material mappings to a JSON file"
|
||||||
|
|
||||||
filename_ext = ".json"
|
filename_ext = ".json"
|
||||||
|
filter_glob: bpy.props.StringProperty(default="*.json", options={"HIDDEN"})
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
props = context.scene.radiance_exporter_properties
|
props = context.scene.radiance_exporter_properties
|
||||||
|
|||||||
Reference in New Issue
Block a user