Operator to add new storey to building

This commit is contained in:
Gorgious
2022-01-27 14:46:32 +01:00
parent a1fb277188
commit 145e9a87ad
2 changed files with 11 additions and 0 deletions
@@ -28,6 +28,7 @@ classes = (
operator.RemoveContainer,
operator.SelectContainer,
operator.SelectSimilarContainer,
operator.BIM_OT_building_storey_add,
prop.SpatialElement,
prop.BIMSpatialProperties,
prop.BIMObjectSpatialProperties,
@@ -121,3 +121,13 @@ class SelectSimilarContainer(bpy.types.Operator, Operator):
def _execute(self, context):
core.select_similar_container(tool.Ifc, tool.Spatial, obj=context.active_object)
class BIM_OT_building_storey_add(bpy.types.Operator, Operator):
bl_idname = "bim.building_storey_add"
bl_label = "Add Storey"
bl_options = {"REGISTER", "UNDO"}
building_name: bpy.props.StringProperty()
def _execute(self, context):
core.add_storey_to_building(tool.Ifc, tool.Spatial, obj=context.active_object)