diff options
-rw-r--r-- | source/blender/editors/transform/transform.c | 13 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 2ae94fb6d5a..f0756a6f86e 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -198,12 +198,13 @@ static void applySeqSlide(TransInfo *t, const int mval[2]); /* end transform callbacks */ -static bool transdata_check_local_center(TransInfo *t) +static bool transdata_check_local_center(TransInfo *t, short around) { - return ((t->around == V3D_LOCAL) && ( + return ((around == V3D_LOCAL) && ( (t->flag & (T_OBJECT | T_POSE)) || (t->obedit && ELEM4(t->obedit->type, OB_MESH, OB_CURVE, OB_MBALL, OB_ARMATURE)) || - (t->spacetype == SPACE_IPO)) + (t->spacetype == SPACE_IPO) || + (t->options & (CTX_MOVIECLIP | CTX_MASK))) ); } @@ -3138,7 +3139,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) } /* local constraint shouldn't alter center */ - if (transdata_check_local_center(t)) { + if (transdata_check_local_center(t, t->around)) { copy_v3_v3(center, td->center); } else if (t->options & CTX_MOVIECLIP) { @@ -3534,9 +3535,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short const float *center; /* local constraint shouldn't alter center */ - if (transdata_check_local_center(t) || - ((around == V3D_LOCAL) && (t->options & CTX_MOVIECLIP))) - { + if (transdata_check_local_center(t, around)) { center = td->center; } else { diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 4ee20ba44fb..ce11400646a 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -6639,7 +6639,7 @@ static void MaskPointToTransData(Scene *scene, MaskSplinePoint *point, td->flag = 0; td->loc = td2d->loc; - copy_v3_v3(td->center, td->loc); + copy_v3_v3(td->center, bezt->vec[1]); copy_v3_v3(td->iloc, td->loc); memset(td->axismtx, 0, sizeof(td->axismtx)); @@ -6687,7 +6687,7 @@ static void MaskPointToTransData(Scene *scene, MaskSplinePoint *point, td->flag = 0; td->loc = td2d->loc; - copy_v3_v3(td->center, td->loc); + copy_v3_v3(td->center, bezt->vec[1]); copy_v3_v3(td->iloc, td->loc); memset(td->axismtx, 0, sizeof(td->axismtx)); |