diff options
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_add.c | 10 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 10 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_retarget.c | 5 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 6 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_utils.c | 4 |
6 files changed, 25 insertions, 11 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index cff161d9d93..e419100bd04 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -77,19 +77,20 @@ EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name) bone->dist = 0.25f; bone->xwidth = 0.1f; bone->zwidth = 0.1f; - bone->ease1 = 1.0f; - bone->ease2 = 1.0f; bone->rad_head = 0.10f; bone->rad_tail = 0.05f; bone->segments = 1; bone->layer = arm->layer; + /* Bendy-Bone parameters */ bone->roll1 = 0.0f; bone->roll2 = 0.0f; bone->curveInX = 0.0f; bone->curveInY = 0.0f; bone->curveOutX = 0.0f; bone->curveOutY = 0.0f; + bone->ease1 = 1.0f; + bone->ease2 = 1.0f; bone->scaleIn = 1.0f; bone->scaleOut = 1.0f; @@ -899,19 +900,20 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) newbone->dist = ebone->dist; newbone->xwidth = ebone->xwidth; newbone->zwidth = ebone->zwidth; - newbone->ease1 = ebone->ease1; - newbone->ease2 = ebone->ease2; newbone->rad_head = ebone->rad_tail; // don't copy entire bone... newbone->rad_tail = ebone->rad_tail; newbone->segments = 1; newbone->layer = ebone->layer; + /* Bendy-Bone parameters */ newbone->roll1 = ebone->roll1; newbone->roll2 = ebone->roll2; newbone->curveInX = ebone->curveInX; newbone->curveInY = ebone->curveInY; newbone->curveOutX = ebone->curveOutX; newbone->curveOutY = ebone->curveOutY; + newbone->ease1 = ebone->ease1; + newbone->ease2 = ebone->ease2; newbone->scaleIn = ebone->scaleIn; newbone->scaleOut = ebone->scaleOut; diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 190b0610059..192bb8eea61 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -173,6 +173,7 @@ typedef struct tPChanFCurveLink { float roll1, roll2; /* old bbone values (to be restored along with the transform properties) */ float curveInX, curveInY; /* (NOTE: we haven't renamed these this time, as their names are already long enough) */ float curveOutX, curveOutY; + float ease1, ease2; float scaleIn, scaleOut; struct IDProperty *oldprops; /* copy of custom properties at start of operator (to be restored before each modal step) */ diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index a3b439536b7..a55264bd020 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -462,19 +462,20 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone eBone->weight = curBone->weight; eBone->xwidth = curBone->xwidth; eBone->zwidth = curBone->zwidth; - eBone->ease1 = curBone->ease1; - eBone->ease2 = curBone->ease2; eBone->rad_head = curBone->rad_head; eBone->rad_tail = curBone->rad_tail; eBone->segments = curBone->segments; eBone->layer = curBone->layer; + /* Bendy-Bone parameters */ eBone->roll1 = curBone->roll1; eBone->roll2 = curBone->roll2; eBone->curveInX = curBone->curveInX; eBone->curveInY = curBone->curveInY; eBone->curveOutX = curBone->curveOutX; eBone->curveOutY = curBone->curveOutY; + eBone->ease1 = curBone->ease1; + eBone->ease2 = curBone->ease2; eBone->scaleIn = curBone->scaleIn; eBone->scaleOut = curBone->scaleOut; @@ -626,19 +627,20 @@ void ED_armature_from_edit(bArmature *arm) newBone->xwidth = eBone->xwidth; newBone->zwidth = eBone->zwidth; - newBone->ease1 = eBone->ease1; - newBone->ease2 = eBone->ease2; newBone->rad_head = eBone->rad_head; newBone->rad_tail = eBone->rad_tail; newBone->segments = eBone->segments; newBone->layer = eBone->layer; + /* Bendy-Bone parameters */ newBone->roll1 = eBone->roll1; newBone->roll2 = eBone->roll2; newBone->curveInX = eBone->curveInX; newBone->curveInY = eBone->curveInY; newBone->curveOutX = eBone->curveOutX; newBone->curveOutY = eBone->curveOutY; + newBone->ease1 = eBone->ease1; + newBone->ease2 = eBone->ease2; newBone->scaleIn = eBone->scaleIn; newBone->scaleOut = eBone->scaleOut; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index fa7bf6e7ad4..2fb216c2ef8 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -1444,19 +1444,20 @@ static EditBone *add_editbonetolist(char *name, ListBase *list) bone->dist = 0.25F; bone->xwidth = 0.1; bone->zwidth = 0.1; - bone->ease1 = 1.0; - bone->ease2 = 1.0; bone->rad_head = 0.10; bone->rad_tail = 0.05; bone->segments = 1; bone->layer = 1; //arm->layer; + /* Bendy-Bone parameters */ bone->roll1 = 0.0f; bone->roll2 = 0.0f; bone->curveInX = 0.0f; bone->curveInY = 0.0f; bone->curveOutX = 0.0f; bone->curveOutY = 0.0f; + bone->ease1 = 1.0f; + bone->ease2 = 1.0f; bone->scaleIn = 1.0f; bone->scaleOut = 1.0f; diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 063ba37f20d..2d86610e065 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -355,6 +355,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, const bo pchan->roll1 = chan->roll1; pchan->roll2 = chan->roll2; + pchan->ease1 = chan->ease1; + pchan->ease2 = chan->ease2; pchan->scaleIn = chan->scaleIn; pchan->scaleOut = chan->scaleOut; @@ -577,6 +579,8 @@ static void pchan_clear_scale(bPoseChannel *pchan) if ((pchan->protectflag & OB_LOCK_SCALEZ) == 0) pchan->size[2] = 1.0f; + pchan->ease1 = 0.0f; + pchan->ease2 = 0.0f; pchan->scaleIn = 1.0f; pchan->scaleOut = 1.0f; } @@ -735,7 +739,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op, /* clear any unkeyed tags */ if (pchan->bone) pchan->bone->flag &= ~BONE_UNKEYED; - + /* tag for autokeying later */ autokey = 1; } diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index b960bec3603..f80afdd169e 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -114,6 +114,8 @@ static void fcurves_to_pchan_links_get(ListBase *pfLinks, Object *ob, bAction *a pfl->curveInY = pchan->curveInY; pfl->curveOutX = pchan->curveOutX; pfl->curveOutY = pchan->curveOutY; + pfl->ease1 = pchan->ease1; + pfl->ease2 = pchan->ease2; pfl->scaleIn = pchan->scaleIn; pfl->scaleOut = pchan->scaleOut; @@ -219,6 +221,8 @@ void poseAnim_mapping_reset(ListBase *pfLinks) pchan->curveInY = pfl->curveInY; pchan->curveOutX = pfl->curveOutX; pchan->curveOutY = pfl->curveOutY; + pchan->ease1 = pfl->ease1; + pchan->ease2 = pfl->ease2; pchan->scaleIn = pfl->scaleIn; pchan->scaleOut = pfl->scaleOut; |