mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
bim.select_all_array_objects not to clear previous selection #3960
This commit is contained in:
@@ -262,7 +262,9 @@ class SelectAllArrayObjects(bpy.types.Operator):
|
||||
return {"CANCELLED"}
|
||||
|
||||
array_objects = tool.Blender.Modifier.Array.get_all_objects(parent_element)
|
||||
tool.Blender.set_objects_selection(context, active_object=array_objects[0], selected_objects=array_objects)
|
||||
tool.Blender.set_objects_selection(
|
||||
context, active_object=array_objects[0], selected_objects=array_objects, clear_previous_selection=False
|
||||
)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -366,9 +366,10 @@ class Blender:
|
||||
active_object.select_set(True)
|
||||
|
||||
@classmethod
|
||||
def set_objects_selection(cls, context, active_object, selected_objects):
|
||||
for obj in context.selected_objects:
|
||||
obj.select_set(False)
|
||||
def set_objects_selection(cls, context, active_object, selected_objects, clear_previous_selection=True):
|
||||
if clear_previous_selection:
|
||||
for obj in context.selected_objects:
|
||||
obj.select_set(False)
|
||||
for obj in selected_objects:
|
||||
obj.select_set(True)
|
||||
context.view_layer.objects.active = active_object
|
||||
|
||||
Reference in New Issue
Block a user