mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
bim.import_ifccsv to support undo (missing Ifc Operator)
Previously it wasn't possible to undo changes in the currently loaded IFC model after bim.import_ifccsv
This commit is contained in:
@@ -288,9 +288,10 @@ class ExportIfcCsv(bpy.types.Operator):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class ImportIfcCsv(bpy.types.Operator):
|
class ImportIfcCsv(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
bl_idname = "bim.import_ifccsv"
|
bl_idname = "bim.import_ifccsv"
|
||||||
bl_label = "Import to IFC"
|
bl_label = "Import to IFC"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
filter_glob: bpy.props.StringProperty(default="*.csv;*.ods;*.xlsx", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.csv;*.ods;*.xlsx", options={"HIDDEN"})
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
@@ -308,7 +309,7 @@ class ImportIfcCsv(bpy.types.Operator):
|
|||||||
WindowManager.fileselect_add(self)
|
WindowManager.fileselect_add(self)
|
||||||
return {"RUNNING_MODAL"}
|
return {"RUNNING_MODAL"}
|
||||||
|
|
||||||
def execute(self, context):
|
def _execute(self, context):
|
||||||
import ifccsv
|
import ifccsv
|
||||||
|
|
||||||
props = context.scene.CsvProperties
|
props = context.scene.CsvProperties
|
||||||
|
|||||||
Reference in New Issue
Block a user