Falk David 07bc687785 Python: Define attribute groups based on AttributeOwnerType
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
2024-07-08 17:11:21 +02:00
2024-06-14 15:48:27 +02:00
2024-07-08 16:22:51 +02:00
2024-07-08 18:27:52 +10:00
2023-12-08 13:28:13 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%