diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-09-20 22:16:41 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-09-20 22:34:09 +0300 |
commit | eed6d6cc132d194efe018996d43a36ebc8d91ad4 (patch) | |
tree | 0817ea53fe929cb2959e219d1076d998d9d22b61 /rigify/__init__.py | |
parent | ecf30de46c368ffddad259c125402a38e6093382 (diff) |
Rigify: support generating mirrored linked duplicate widgets.
After the custom shape scale property was split into an XYZ vector,
it is possible to generate truly mirrored widgets using the same
mesh for the left and right side. The widgets Rigify generates are
originally symmetrical, but in practice they usually need to be
tweaked to fit the character better, and proper mirroring matters.
This commit implements widget mirroring and enables it by default.
When reusing widgets left from a previous generation the code tries
to detect whether they were actually originally mirrored by checking
object scale to avoid flipping in pre-existing rigs.
As an aside, reusing pre-existing widgets is made more robust
to random name changes by building a table via scanning the old
generated rig before overwriting it.
Diffstat (limited to 'rigify/__init__.py')
-rw-r--r-- | rigify/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rigify/__init__.py b/rigify/__init__.py index dd55be04..4b926c48 100644 --- a/rigify/__init__.py +++ b/rigify/__init__.py @@ -530,6 +530,10 @@ def register(): description="Forces Rigify to delete and rebuild all the rig widgets. if unset, only missing widgets will be created", default=False) + bpy.types.Armature.rigify_mirror_widgets = BoolProperty(name="Mirror Widgets", + description="Make widgets for left and right side bones linked duplicates with negative X scale for the right side, based on bone name symmetry", + default=True) + bpy.types.Armature.rigify_target_rig = PointerProperty(type=bpy.types.Object, name="Rigify Target Rig", description="Defines which rig to overwrite. If unset, a new one called 'rig' will be created", |