07bc687785
The function `rna_def_attributes_common` assumed that the owner of the attributes is an `ID`. This PR refactors the code to partially remove this assumption. The `rna_def_attributes_common` function now takes an argument `AttributeOwnerType type` that defines what `AttributeGroup` should be used. This is in preperation for #116043 where we want to use `rna_def_attributes_common` for grease pencil drawings, which are not IDs. In addition to the refactor explained above, this also changes the API slightly: Previously, the `AttributeGroup` defiend `active_color`, `active_color_index`, `active_color_name`, `default_color_name`, and `render_color_index` for all IDs. These properties could only be used by meshes. So this PR seperates the `AttributeGroup` type into one type per attribute owner: `AttributeGroupMesh`, `AttributeGroupPointCloud`, `AttributeGroupCurves`, and `AttributeGroupGreasePencil`. As such the properties mentioned above are now only usable by meshes. Note that this technically breaks the API and will have to be noted in the release notes. Pull Request: https://projects.blender.org/blender/blender/pulls/123658