diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-10-19 11:37:57 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-11-21 20:10:07 +0300 |
commit | c23dbcf37d9ffed4d443e0f9ce36f14854a52009 (patch) | |
tree | 8abb29f802d6153108689bcedb4241ea1696449b /source/blender/makesrna/intern/rna_armature.c | |
parent | 6c9be3b27ce8246de78a039001f60298818b790d (diff) |
Bones: implement a new Aligned Inherit Scale mode.
Implement one more way of inheriting scale from the parent
bone, as an addition to the choices introduced in D5588.
This new mode inherits parent scale as if the parent and child
were not rotated relative to each other, always applying parent
X scale to child X scale and so forth. It is quite natural for
connected bone chains with coherent roll, like limbs or tentacles,
falling roughly between Average and Fix Shear in how closely
the parent scaling is followed.
Currently this can be achieved by using Inherit Scale: None plus
a Copy Scale with Offset from parent on the child; however, this
is cumbersome, and loses the distinction between true local and
inherited scale in the child's Local space.
This new mode also matches how the Before/After Original mix
modes work in the Copy Transforms constraint.
On the technical side this mode requires adding a right side
scale matrix multiplication into the Local<->Pose conversion,
in addition to the existing two left side matrices used for
location and orientation.
Differential Revision: https://developer.blender.org/D6099
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 4dc383a2460..b09a19bb39f 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -832,6 +832,12 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) 0, "Fix Shear", "Inherit scaling, but remove shearing of the child in the rest orientation"}, + {BONE_INHERIT_SCALE_ALIGNED, + "ALIGNED", + 0, + "Aligned", + "Rotate non-uniform parent scaling to align with the child, applying parent X " + "scale to child X axis, and so forth"}, {BONE_INHERIT_SCALE_AVERAGE, "AVERAGE", 0, |