mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
add undo for "csv" module #1475
This commit is contained in:
@@ -13,6 +13,7 @@ from blenderbim.bim.handler import purge_module_data
|
|||||||
class AddCsvAttribute(bpy.types.Operator):
|
class AddCsvAttribute(bpy.types.Operator):
|
||||||
bl_idname = "bim.add_csv_attribute"
|
bl_idname = "bim.add_csv_attribute"
|
||||||
bl_label = "Add CSV Attribute"
|
bl_label = "Add CSV Attribute"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
attribute = context.scene.CsvProperties.csv_attributes.add()
|
attribute = context.scene.CsvProperties.csv_attributes.add()
|
||||||
@@ -22,6 +23,7 @@ class AddCsvAttribute(bpy.types.Operator):
|
|||||||
class RemoveCsvAttribute(bpy.types.Operator):
|
class RemoveCsvAttribute(bpy.types.Operator):
|
||||||
bl_idname = "bim.remove_csv_attribute"
|
bl_idname = "bim.remove_csv_attribute"
|
||||||
bl_label = "Remove CSV Attribute"
|
bl_label = "Remove CSV Attribute"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
index: bpy.props.IntProperty()
|
index: bpy.props.IntProperty()
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
@@ -98,6 +100,7 @@ class ImportIfcCsv(bpy.types.Operator):
|
|||||||
class EyedropIfcCsv(bpy.types.Operator):
|
class EyedropIfcCsv(bpy.types.Operator):
|
||||||
bl_idname = "bim.eyedrop_ifccsv"
|
bl_idname = "bim.eyedrop_ifccsv"
|
||||||
bl_label = "Query Selected Items"
|
bl_label = "Query Selected Items"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
global_ids = []
|
global_ids = []
|
||||||
@@ -112,6 +115,7 @@ class EyedropIfcCsv(bpy.types.Operator):
|
|||||||
class SelectCsvIfcFile(bpy.types.Operator):
|
class SelectCsvIfcFile(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_csv_ifc_file"
|
bl_idname = "bim.select_csv_ifc_file"
|
||||||
bl_label = "Select CSV IFC File"
|
bl_label = "Select CSV IFC File"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
filename_ext = ".ifc"
|
filename_ext = ".ifc"
|
||||||
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|||||||
Reference in New Issue
Block a user