Files
test2/source
Falk David 0089a90625 Refactor: Attribute API: Remove ID owner dependency
The attribute API defined in `attribute.cc` was dependent on
the assumption that `ID`s are always the "direct" owners of attributes.

For Grease Pencil drawings, this is not the case. The Grease Pencil ID
stores the attributes for layers, and the attributes for drawings are stored
in `CurvesGeometry` on the drawings themselves.

In order to make use of  `rna_attribute.cc`, we need that API to handle
other types of attribute owners.

This adds an `AttributeOwner` which is basically just a type and a
pointer. We replace the `ID` pointers and pass `AttributeOwner`s instead.

For cases where we have to do a switch based on the type, all the
types are handled and the `default` statment is left out. This ensures
that we get a compiler warning when a new `AttributeOwnerType`
is added.

No functional changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/122765
2024-06-07 16:42:41 +02:00
..