File tree Expand file tree Collapse file tree
src/blenderbim/blenderbim/bim/module/group Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 operator .ToggleGroup ,
3434 operator .UnassignGroup ,
3535 operator .UpdateGroup ,
36+ operator .SelectGroupElements ,
3637 prop .ExpandedGroups ,
3738 prop .Group ,
3839 prop .BIMGroupProperties ,
Original file line number Diff line number Diff line change @@ -275,3 +275,19 @@ def _execute(self, context):
275275 )
276276 bpy .ops .bim .load_groups ()
277277 return {"FINISHED" }
278+
279+
280+ class SelectGroupElements (bpy .types .Operator ):
281+ bl_idname = "bim.select_group_elements"
282+ bl_label = "Select Group elements"
283+ bl_options = {"REGISTER" , "UNDO" }
284+ group : bpy .props .IntProperty ()
285+
286+ @classmethod
287+ def poll (cls , context ):
288+ return bool (tool .Ifc .get () and context .active_object )
289+
290+ def execute (self , context ):
291+ elements = tool .Drawing .get_group_elements (tool .Ifc .get ().by_id (self .group ))
292+ tool .Spatial .select_products (elements )
293+ return {"FINISHED" }
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ def draw(self, context):
107107 for group in ObjectGroupsData .data ["groups" ]:
108108 row = self .layout .row (align = True )
109109 row .label (text = group ["name" ])
110+ row .operator ("bim.select_group_elements" , text = "" , icon = "RESTRICT_SELECT_OFF" ).group = group ["id" ]
110111 op = row .operator ("bim.unassign_group" , text = "" , icon = "X" )
111112 op .group = group ["id" ]
112113
You can’t perform that action at this time.
0 commit comments