diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-07-07 10:45:33 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-07-07 10:47:59 +0300 |
commit | 28105caaa394b5a6c3d237fea7ddadecca7d0331 (patch) | |
tree | 661049a220462952cc0f9d7042546cfc431fa667 /source | |
parent | 843ad51d18c80f4122baab47454d09383ae365c3 (diff) |
Fix T99342: GPencil multiframe falloff is scaling wrongly in rotation
The falloff was applied to scale by error. Now, the falloff is only applied to the rotation.
Differential Revision: https://developer.blender.org/D15364
.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_mode.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c index 83f1bd35f81..5ba0f08ee1c 100644 --- a/source/blender/editors/transform/transform_mode.c +++ b/source/blender/editors/transform/transform_mode.c @@ -549,18 +549,14 @@ void ElementRotation_ex(const TransInfo *t, mul_m3_m3m3(totmat, mat, td->mtx); mul_m3_m3m3(smat, td->smtx, totmat); - /* apply gpencil falloff */ + /* Apply gpencil falloff. */ if (t->options & CTX_GPENCIL_STROKES) { bGPDstroke *gps = (bGPDstroke *)td->extra; - float sx = smat[0][0]; - float sy = smat[1][1]; - float sz = smat[2][2]; - - mul_m3_fl(smat, gps->runtime.multi_frame_falloff); - /* fix scale */ - smat[0][0] = sx; - smat[1][1] = sy; - smat[2][2] = sz; + if (gps->runtime.multi_frame_falloff != 1.0f) { + float ident_mat[3][3]; + unit_m3(ident_mat); + interp_m3_m3m3(smat, ident_mat, smat, gps->runtime.multi_frame_falloff); + } } sub_v3_v3v3(vec, td->iloc, center); |