From a197a1b9093fad4df7886ebdefad3ba19d7655a4 Mon Sep 17 00:00:00 2001 From: Petru Conduraru Date: Sun, 12 Jul 2026 22:25:26 +0300 Subject: [PATCH] Fix ci-bonsai-daily: get_linked_element_geom_slice uses hidden-shifted index space get_linked_element_geom_slice slices into the mesh polygon index space that excludes hidden faces, but built its cumulative guid_ids with get_linked_element_guid_ids(obj, skip_hidden=False) - the raw, un-shifted index space - so the returned slice was wrong whenever any face was hidden. The sibling call two lines up (get_guid_by_face_index) already uses skip_hidden=True; align this one. Verified in headless Blender: test/tool/test_project.py::TestGettingLinkedElementGeomSlice goes from 2 failed / 3 passed to 5 passed (the two skip_hidden cases now return the correct slice). This change was made with the assistance of an AI tool. Co-Authored-By: Claude Fable 5 --- src/bonsai/bonsai/tool/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/project.py b/src/bonsai/bonsai/tool/project.py index 7199c125cf..b0e73f3879 100644 --- a/src/bonsai/bonsai/tool/project.py +++ b/src/bonsai/bonsai/tool/project.py @@ -745,7 +745,7 @@ class Project(bonsai.core.tool.Project): index = obj_guids.index(guid) if index in obj_hidden_indices: assert False, "Unexpected. Why would you need the geometry for the hidden element?" - obj_guid_ids = cls.get_linked_element_guid_ids(obj, skip_hidden=False) + obj_guid_ids = cls.get_linked_element_guid_ids(obj, skip_hidden=True) guid_end_index = obj_guid_ids[index] guid_start_index = index and obj_guid_ids[index - 1] return slice(guid_start_index, guid_end_index)