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