mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Implement undo in debug and diff operators.
This commit is contained in:
@@ -76,8 +76,12 @@ class CreateAllShapes(bpy.types.Operator):
|
|||||||
class CreateShapeFromStepId(bpy.types.Operator):
|
class CreateShapeFromStepId(bpy.types.Operator):
|
||||||
bl_idname = "bim.create_shape_from_step_id"
|
bl_idname = "bim.create_shape_from_step_id"
|
||||||
bl_label = "Create Shape From STEP ID"
|
bl_label = "Create Shape From STEP ID"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
return IfcStore.execute_ifc_operator(self, context)
|
||||||
|
|
||||||
|
def _execute(self, context):
|
||||||
logger = logging.getLogger("ImportIFC")
|
logger = logging.getLogger("ImportIFC")
|
||||||
self.ifc_import_settings = import_ifc.IfcImportSettings.factory(bpy.context, IfcStore.path, logger)
|
self.ifc_import_settings = import_ifc.IfcImportSettings.factory(bpy.context, IfcStore.path, logger)
|
||||||
self.file = IfcStore.get_file()
|
self.file = IfcStore.get_file()
|
||||||
@@ -96,6 +100,7 @@ class CreateShapeFromStepId(bpy.types.Operator):
|
|||||||
class SelectHighPolygonMeshes(bpy.types.Operator):
|
class SelectHighPolygonMeshes(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_high_polygon_meshes"
|
bl_idname = "bim.select_high_polygon_meshes"
|
||||||
bl_label = "Select High Polygon Meshes"
|
bl_label = "Select High Polygon Meshes"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
results = {}
|
results = {}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from blenderbim.bim.ifc import IfcStore
|
|||||||
class SelectDiffJsonFile(bpy.types.Operator):
|
class SelectDiffJsonFile(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_diff_json_file"
|
bl_idname = "bim.select_diff_json_file"
|
||||||
bl_label = "Select Diff JSON File"
|
bl_label = "Select Diff JSON File"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
@@ -23,6 +24,7 @@ class SelectDiffJsonFile(bpy.types.Operator):
|
|||||||
class VisualiseDiff(bpy.types.Operator):
|
class VisualiseDiff(bpy.types.Operator):
|
||||||
bl_idname = "bim.visualise_diff"
|
bl_idname = "bim.visualise_diff"
|
||||||
bl_label = "Visualise Diff"
|
bl_label = "Visualise Diff"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
#ifc_file = IfcStore.get_file() # In case we get from Store
|
#ifc_file = IfcStore.get_file() # In case we get from Store
|
||||||
@@ -48,6 +50,7 @@ class VisualiseDiff(bpy.types.Operator):
|
|||||||
class SelectDiffOldFile(bpy.types.Operator):
|
class SelectDiffOldFile(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_diff_old_file"
|
bl_idname = "bim.select_diff_old_file"
|
||||||
bl_label = "Select Diff Old File"
|
bl_label = "Select Diff Old File"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
@@ -62,6 +65,7 @@ class SelectDiffOldFile(bpy.types.Operator):
|
|||||||
class SelectDiffNewFile(bpy.types.Operator):
|
class SelectDiffNewFile(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_diff_new_file"
|
bl_idname = "bim.select_diff_new_file"
|
||||||
bl_label = "Select Diff New File"
|
bl_label = "Select Diff New File"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user