mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +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"}
|
return {"CANCELLED"}
|
||||||
|
|
||||||
array_objects = tool.Blender.Modifier.Array.get_all_objects(parent_element)
|
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"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -366,9 +366,10 @@ class Blender:
|
|||||||
active_object.select_set(True)
|
active_object.select_set(True)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_objects_selection(cls, context, active_object, selected_objects):
|
def set_objects_selection(cls, context, active_object, selected_objects, clear_previous_selection=True):
|
||||||
for obj in context.selected_objects:
|
if clear_previous_selection:
|
||||||
obj.select_set(False)
|
for obj in context.selected_objects:
|
||||||
|
obj.select_set(False)
|
||||||
for obj in selected_objects:
|
for obj in selected_objects:
|
||||||
obj.select_set(True)
|
obj.select_set(True)
|
||||||
context.view_layer.objects.active = active_object
|
context.view_layer.objects.active = active_object
|
||||||
|
|||||||
Reference in New Issue
Block a user