129fb2eab8
Make it possible to nest bone collections. The data structure on the armature is still a flat array. It is organised as follows: - Sibling collections (i.e. ones with the same parent) are stored sequentially in the array. - Each bone collection keep track of the number of children, and the index of the first child. - Root collections (i.e. ones without parent) are stored as the first elements in the array. - The number of root collections is stored on the Armature. This commit also contains the following: - Replaced the flat UIList of bone collections with a tree view. - Updated the M/Shift+M operators (move/assign to collection) to work with hierarchical bone collections. - Updated RNA interface to expose only root collections at `armature.collections`. All collections are available on `armature.collections.all`, and children at `bonecollection.children`. - Library override support. Only new roots + their subtrees can be added via overrides. See https://projects.blender.org/blender/blender/issues/115934 Co-authored with @nathanvegdahl and @nrupsis. Pull Request: https://projects.blender.org/blender/blender/pulls/115945