Anim: store BoneCollections in a flat array #115354

Merged
Nathan Vegdahl merged 2 commits from nathanvegdahl/blender:hierarchical_bone_collections into main 2023-12-05 10:39:58 +01:00

2 Commits

Author SHA1 Message Date
Nathan Vegdahl 8244b3a093 Address PR comments part 1 2023-12-04 18:44:58 +01:00
Nathan Vegdahl 9a96ea2b50 Anim: convert BoneCollections to be stored in a flat array at runtime
This is in preparation for eventual hierarchical bone collections.

The motivation here is that we want to continue to store collections
in a flat list, for forwards compatibility with Blender 4.0.  However,
we would like to specify children as a lightweight index range, and that
becomes fairly inefficient with a listbase due to the list traversal
overhead incurred for index-based lookups.

As a compromise, we're still saving to disk as a list base for forwards
compatibility of blend files, but storing as an array at runtime for
efficient indexing.
2023-12-04 14:53:48 +01:00