mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 19:09:07 +00:00
Bonsai: route array-regen selection through tool.Blender utilities
Rewrite tool.Array.select_only_parent as a thin call to tool.Blender.select_and_activate_single_object; drop the ad-hoc per-child deselect loop and the unused parent_element parameter. Replace the tail parent_obj.select_set(True) in _regenerate_array_body with tool.Blender.set_object_selection, which wraps select_set in the hidden-object try/except the utility already owns. Relates to #8088. Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -537,7 +537,7 @@ class TestSelectOnlyParent(NewFile):
|
||||
child_obj = tool.Ifc.get_object(child_element)
|
||||
child_obj.select_set(True)
|
||||
|
||||
tool.Array.select_only_parent(obj, element, bpy.context)
|
||||
tool.Array.select_only_parent(obj, bpy.context)
|
||||
|
||||
assert obj in bpy.context.selected_objects
|
||||
assert bpy.context.view_layer.objects.active is obj
|
||||
|
||||
Reference in New Issue
Block a user