mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Select all objects from multiple selected classes
This commit is contained in:
@@ -434,10 +434,14 @@ class SelectIfcClass(Operator):
|
||||
ifc_class: StringProperty()
|
||||
|
||||
def execute(self, context):
|
||||
for element in tool.Ifc.get().by_type(self.ifc_class):
|
||||
obj = tool.Ifc.get_object(element)
|
||||
if obj:
|
||||
obj.select_set(True)
|
||||
objects = bpy.context.selected_objects
|
||||
for object in objects:
|
||||
element = tool.Ifc.get_entity(object)
|
||||
element_class = element.is_a()
|
||||
for elem in tool.Ifc.get().by_type(element_class):
|
||||
obj = tool.Ifc.get_object(elem)
|
||||
if obj:
|
||||
obj.select_set(True)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user