mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Added ifc operators to some model operators
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user