Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit 5764cfc

Browse files
maxfb87Moult
authored andcommitted
Add regen button also under space tool
1 parent 1ad2465 commit 5764cfc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/blenderbim/blenderbim/bim/module/spatial/workspace.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class SpatialTool(WorkSpaceTool):
4949
("bim.spatial_hotkey", {"type": "A", "value": "PRESS", "shift": True}, {"properties": [("hotkey", "S_A")]}),
5050
("bim.spatial_hotkey", {"type": "B", "value": "PRESS", "alt": True}, {"properties": [("hotkey", "A_B")]}),
5151
("bim.spatial_hotkey", {"type": "T", "value": "PRESS", "shift": True}, {"properties": [("hotkey", "S_T")]}),
52+
("bim.spatial_hotkey", {"type": "G", "value": "PRESS", "shift": True}, {"properties": [("hotkey", "S_G")]}),
5253
)
5354

5455
def draw_settings(context, layout, ws_tool):
@@ -106,6 +107,14 @@ def draw_default_interface(cls, context):
106107

107108
@classmethod
108109
def draw_selected_object_interface(cls, context):
110+
active_obj = bpy.context.active_object
111+
element = tool.Ifc.get_entity(active_obj)
112+
if element and bpy.context.selected_objects and element.is_a("IfcSpace"):
113+
row = cls.layout.row(align=True)
114+
row.label(text="", icon="EVENT_SHIFT")
115+
row.label(text="", icon="EVENT_G")
116+
row.operator("bim.generate_space", text="Regen")
117+
109118
row = cls.layout.row(align=True)
110119
row.label(text="", icon="EVENT_SHIFT")
111120
row.label(text="", icon="EVENT_B")
@@ -167,3 +176,6 @@ def hotkey_A_B(self):
167176

168177
def hotkey_S_T(self):
169178
bpy.ops.bim.toggle_space_visibility()
179+
180+
def hotkey_S_G(self):
181+
bpy.ops.bim.generate_space()

0 commit comments

Comments
 (0)