Added ifc operators to some model operators

This commit is contained in:
Andrej730
2023-03-07 09:43:05 +05:00
parent da8e5dced1
commit 5a6ae57833
4 changed files with 8 additions and 8 deletions
@@ -439,12 +439,12 @@ def update_door_modifier_bmesh(context):
obj.data.update()
class BIM_OT_add_door(Operator):
class BIM_OT_add_door(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "mesh.add_door"
bl_label = "Door"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
def _execute(self, context):
ifc_file = tool.Ifc.get()
if not ifc_file:
self.report({"ERROR"}, "You need to start IFC project first to create a door.")
@@ -187,12 +187,12 @@ def get_path_data(obj):
return path_data
class BIM_OT_add_railing(Operator):
class BIM_OT_add_railing(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "mesh.add_railing"
bl_label = "Railing"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
def _execute(self, context):
ifc_file = tool.Ifc.get()
if not ifc_file:
self.report({"ERROR"}, "You need to start IFC project first to create a railing.")
@@ -283,12 +283,12 @@ def update_ifc_stair_props(obj):
)
class BIM_OT_add_clever_stair(Operator):
class BIM_OT_add_clever_stair(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "mesh.add_clever_stair"
bl_label = "Clever Stair"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
def _execute(self, context):
ifc_file = tool.Ifc.get()
if not ifc_file:
self.report({"ERROR"}, "You need to start IFC project first to create a stair.")
@@ -406,12 +406,12 @@ def update_window_modifier_bmesh(context):
obj.data.update()
class BIM_OT_add_window(Operator):
class BIM_OT_add_window(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "mesh.add_window"
bl_label = "Window"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
def _execute(self, context):
ifc_file = tool.Ifc.get()
if not ifc_file:
self.report({"ERROR"}, "You need to start IFC project first to create a window.")