mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Added ReloadSelectedIfcFile operator
Added ReloadSelectedIfcFile operator and added it to IFC Quality Control -> IFC Debug, it's useful when you're debugging and doing a lot of iterations on the same file.
This commit is contained in:
@@ -91,6 +91,7 @@ classes = [
|
|||||||
operator.RemoveIfcFile,
|
operator.RemoveIfcFile,
|
||||||
operator.SelectDataDir,
|
operator.SelectDataDir,
|
||||||
operator.SelectIfcFile,
|
operator.SelectIfcFile,
|
||||||
|
operator.ReloadSelectedIfcFile,
|
||||||
operator.SelectSchemaDir,
|
operator.SelectSchemaDir,
|
||||||
operator.SelectURIAttribute,
|
operator.SelectURIAttribute,
|
||||||
operator.EditBlenderCollection,
|
operator.EditBlenderCollection,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class BIM_PT_debug(Panel):
|
|||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.prop(context.scene.BIMProperties, "ifc_file", text="")
|
row.prop(context.scene.BIMProperties, "ifc_file", text="")
|
||||||
row.operator("bim.validate_ifc_file", icon="CHECKMARK", text="")
|
row.operator("bim.validate_ifc_file", icon="CHECKMARK", text="")
|
||||||
|
row.operator("bim.reload_selected_ifc_file", icon="FILE_REFRESH", text="")
|
||||||
row.operator("bim.select_ifc_file", icon="FILE_FOLDER", text="")
|
row.operator("bim.select_ifc_file", icon="FILE_FOLDER", text="")
|
||||||
|
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
|
|||||||
@@ -100,6 +100,18 @@ class SelectIfcFile(bpy.types.Operator, IFCFileSelector):
|
|||||||
context.window_manager.fileselect_add(self)
|
context.window_manager.fileselect_add(self)
|
||||||
return {"RUNNING_MODAL"}
|
return {"RUNNING_MODAL"}
|
||||||
|
|
||||||
|
class ReloadSelectedIfcFile(bpy.types.Operator, IFCFileSelector):
|
||||||
|
bl_idname = "bim.reload_selected_ifc_file"
|
||||||
|
bl_label = "Reload selected IFC File"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
bl_description = "Reload currently selected IFC file"
|
||||||
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
self.filepath = context.scene.BIMProperties.ifc_file
|
||||||
|
if self.is_existing_ifc_file():
|
||||||
|
context.scene.BIMProperties.ifc_file = context.scene.BIMProperties.ifc_file
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
class SelectDataDir(bpy.types.Operator):
|
class SelectDataDir(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_data_dir"
|
bl_idname = "bim.select_data_dir"
|
||||||
|
|||||||
Reference in New Issue
Block a user