This commit tries to make the bare minimum changes to add a meaningful
level of support for Action Slots in Rigify:
- You can now select an Action Slot in each Action Set-up, and that
will be assigned to the generated Action Constraints.
- For this to be meaningful, we have to support selecting the same
Action in multiple Action Set-ups, which would previously throw an
error.
- For that to be possible however, it was necessary to make the
trigger selectors of Corrective Action Set-ups select one of the
other set-ups directly, rather than selecting an Action (datablock),
and then making an association to one of the action set-ups based on
that action pointer. (The necessity to allow users to point at
another action set-up was the reason behind not allowing user to use
the same action datablock multiple times.)
Pull Request: https://projects.blender.org/blender/blender/pulls/146182
Ensure that Rigify correctly handles RNA properties as RNA properties.
Before, it mixed dictionary-style and attribute-style access, but
since 7276b2009a that is no longer
possible.
This means that the (un)registration of the RNA properties needs to
happen in two places: the add-on itself, and the code it generates in
the rig. To be able to inject the code into a blend file, Rigify needs
to access it as string. This commit introduces a new way of dealing
with this: it just has normal code, and uses Python's
[`inspect.getsource()`][getsource] to get that code as string for
injection into the rig file.
[getsource]: https://docs.python.org/3/library/inspect.html#inspect.getsource
The biggest chunk of code in this commit deals with the 'Copy
Parameters', 'Copy Type & Parameters', and 'Mirror Type & Parameters'
operators. Since it's no longer possible to access RNA properties as
dict-like custom properties, new code was written to recursively copy
`bpy.types.PropertyGroup` instances. Eventually this may end up in
Blender itself, but that would mean writing more thorough checks and
making sure it works in many cases. And it might be easier to
implement this on the C++ side, where it should just be a matter of
exposing one `IDP_CopyPropertyContent()` call to the Python API.
That's all for another Blender release, though -- for now this'll have
to do to fix up Rigify for 5.0.
Fixes: #146675
Pull Request: https://projects.blender.org/blender/blender/pulls/147199
Minimal changes to make Rigify use the current Action API (introduced in
Blender 4.4) instead of the legacy API (removed in 5.0).
Most of the refactoring consists of:
- Find the right `Channelbag`
- Replace operations on `Action` with operations on that `Channelbag`.
I didn't manage to test all code, because some code paths are very hard
to follow, and others seem to only be available for legacy rigs.
This is part of #146586
Pull Request: https://projects.blender.org/blender/blender/pulls/147060
The code was using the legacy Grease Pencil data type
in `create_object_data`. For the object type `GREASEPENCIL` we should
be using `bpy.data.grease_pencils_v3`.
Pull Request: https://projects.blender.org/blender/blender/pulls/142335
Ensure the code doesn't delete items from the same collection it is
looping over.
This is done by copying the `self.artifact_reuse_table` dictionary items
and looping over that, making it possible to delete from the original
dictionary.
Co-authored-by: Gianluca Giampuzzo
Rigify was recently added to the core add-ons, and is now
translatable. This change fixes many issues that made messages
poorly or not translatable.
- Replace f-strings and % formatting with str.format().
- Use iface_ and rpt_ to translate formatted strings.
- Rename metarig submenus from "<Category> (submenu)" to simply
"<Category>" to allow the menu entries and submenus to have the same
name and be translated. The label was awkward anyway in my opinion.
- Remove trailing "." in operator reports.
Run `make format` to reformat the Rigify code. It now adheres to the
global Blender code style standard, rather than having its own style.
Most of the changes are simply adding spaces around operators, newlines
below docstrings, and changing some indentation.
Note that this does not reformat any stored-as-multiline-strings code
blocks.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/123833
The fix is to set local-space Limit Rotation constraints to use the
legacy behavior from pre-4.2. The legacy behavior isn't meaningful/
useful for other spaces, so we leave those constraints alone.
This is one part of a two-part fix for blender/blender#123105. The other part
is blender/blender#123361, which adds the Legacy Behavior option to the Limit
Rotation constraint.
Reviewed-on: https://projects.blender.org/extensions/rigify/pulls/4
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
Move Rigify from the external add-ons repository into
`scripts/addons_core`.
This commit adds Rigify, from the latest revision in [the add-ons
repo][addons]. It contains work by the following authors:
202 Alexander Gavrilov
67 Campbell Barton
58 Nathan Vegdahl
31 Lucio Rossi
24 Demeter Dzadik
10 Brecht Van Lommel
8 Dalai Felinto
7 Bastien Montagne
7 Sybren A. Stüvel
5 Damien Picard
4 meta-androcto
3 Ines Almeida
2 Jonathan Smith
2 ZanQdo
1 Aaron Carlisle
1 Andrej730
1 Hans Goudey
1 Luca Bonavita
1 Patrick Huang
1 Sergey Sharybin
1 Thomas Dinges
For the full history see the read-only [add-ons repository][addons].
Rigify has existed briefly as an extension on the extensions platform,
and commits were made to Rigify's extension repository (which is
different from the above-mentioned add-ons repository). That repository
will be deleted soon. Its commits that actually changed Rigify will be
committed as followups to this commit. Some commits were necessary to
turn the add-on into an extension; those will be ignored, as they're no
longer relevant.
[addons]: https://projects.blender.org/blender/blender-addons/src/rigify
Ref: !121825
Pull Request: https://projects.blender.org/blender/blender/pulls/123833