Fix scale in Apply Pose As Rest Pose for bendy bones.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sat, 7 Jul 2018 11:41:29 +0000 (14:41 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Sat, 7 Jul 2018 12:10:41 +0000 (15:10 +0300)
Scale is multiplicative, and adding it up causes the bone to bloat.

source/blender/editors/armature/pose_transform.c

index 43dfa2f13d7a8e6e808d150ffe339d2e0439a47f..2d8f5dbecbe5bb0e5664b10ef6e1445bfa675155 100644 (file)
@@ -164,8 +164,8 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
                        curbone->roll2 += pchan->roll2;
                        curbone->ease1 += pchan->ease1;
                        curbone->ease2 += pchan->ease2;
-                       curbone->scaleIn += pchan->scaleIn;
-                       curbone->scaleOut += pchan->scaleOut;
+                       curbone->scaleIn *= pchan->scaleIn;
+                       curbone->scaleOut *= pchan->scaleOut;
 
                        pchan->curveInX = pchan->curveOutX = 0.0f;
                        pchan->curveInY = pchan->curveOutY = 0.0f;