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

.
This commit is contained in:
Antonio Vazquez 2022-07-07 09:45:33 +02:00
parent 843ad51d18
commit 28105caaa3
Notes: blender-bot 2023-02-14 00:29:15 +01:00
Referenced by issue #99342, GPencil: Multiframe falloff mode, rotation make other frames smaler around 90°
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 6 additions and 10 deletions

View File

@ -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);