mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +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()
|
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_idname = "mesh.add_door"
|
||||||
bl_label = "Door"
|
bl_label = "Door"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def _execute(self, context):
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
if not ifc_file:
|
if not ifc_file:
|
||||||
self.report({"ERROR"}, "You need to start IFC project first to create a door.")
|
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
|
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_idname = "mesh.add_railing"
|
||||||
bl_label = "Railing"
|
bl_label = "Railing"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def _execute(self, context):
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
if not ifc_file:
|
if not ifc_file:
|
||||||
self.report({"ERROR"}, "You need to start IFC project first to create a railing.")
|
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_idname = "mesh.add_clever_stair"
|
||||||
bl_label = "Clever Stair"
|
bl_label = "Clever Stair"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def _execute(self, context):
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
if not ifc_file:
|
if not ifc_file:
|
||||||
self.report({"ERROR"}, "You need to start IFC project first to create a stair.")
|
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()
|
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_idname = "mesh.add_window"
|
||||||
bl_label = "Window"
|
bl_label = "Window"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def execute(self, context):
|
def _execute(self, context):
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
if not ifc_file:
|
if not ifc_file:
|
||||||
self.report({"ERROR"}, "You need to start IFC project first to create a window.")
|
self.report({"ERROR"}, "You need to start IFC project first to create a window.")
|
||||||
|
|||||||
Reference in New Issue
Block a user