mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Bonsai: hide array-child gizmos + converge regen selection
Add tool.Array.is_array_child helper. Port decorator and MEP action gizmos (lock, pen, join) hide on array children — writes on children get wiped by the next regen, and the port topology is inherited from the parent. Introduce tool.Array.select_only_parent and wire it into both bim.regenerate_array and bim.finish_editing_array so post-regen state converges on parent-only-selected + active. Grow and shrink paths otherwise diverge (grow left new children selected alongside the parent; shrink left only the parent). Relates to #8088. Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -630,15 +630,15 @@ class TestUsingArrays(NewFile):
|
||||
def test_remove_array_first_to_last(self):
|
||||
self.setup_array(add_second_layer=True)
|
||||
bpy.ops.bim.remove_array(item=0)
|
||||
assert len(bpy.context.selected_objects) == 3
|
||||
assert len(self._array_objects()) == 3
|
||||
bpy.ops.bim.remove_array(item=0)
|
||||
assert len(bpy.context.selected_objects) == 1
|
||||
assert len(self._array_objects()) == 1
|
||||
|
||||
def test_apply_array_1_layer(self):
|
||||
self.setup_array()
|
||||
bpy.ops.bim.apply_array()
|
||||
|
||||
objs = bpy.context.selected_objects
|
||||
objs = self._array_objects()
|
||||
assert len(objs) == 4
|
||||
# check BBIM_Array psets are removed
|
||||
for obj in objs:
|
||||
@@ -664,7 +664,7 @@ class TestUsingArrays(NewFile):
|
||||
self.setup_array(sync_children=True)
|
||||
bpy.ops.bim.apply_array()
|
||||
|
||||
objs = bpy.context.selected_objects
|
||||
objs = self._array_objects()
|
||||
assert len(objs) == 4
|
||||
# check BBIM_Array psets are removed
|
||||
for obj in objs:
|
||||
|
||||
Reference in New Issue
Block a user