6cfbf9ef2f
Bone collection visibility now respects their hierarchy. A bone collection is only visible when it is marked as visible and all its ancestors (so parents, greatparents, etc.) are visible. Root bone collections have no ancestors by definition, and only consider their own visibility. The effective ancestors' visibility is stored on each bone collection, in its `BONE_COLLECTION_ANCESTORS_VISIBLE` flag. This makes it possible to determine the effective visibility from just the flags of the bone collection itself. The `BONE_COLLECTION_ANCESTORS_VISIBLE` flag is now stored, with the other flags, in `BoneCollection::flags`. This means that it's stored in DNA, even though it's derived data and should actually be stored in a runtime struct. However, `BoneCollection` doesn't have any runtime struct yet, and I don't feel that the introduction of this flag is a good enough reason to introduce that just yet. Pull Request: https://projects.blender.org/blender/blender/pulls/116784