Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-07-07 10:45:33 +0300
committerThomas Dinges <blender@dingto.org>2022-07-15 15:51:49 +0300
commit1da8bbc0469bb0cdb171278dfa7fb6929b550b87 (patch)
tree4dc1e1856d038fa76d6b353d5feaccdf6f6925b0
parent7fb8e475d9eca93bff87f011b29ac8aa7bc0ebca (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 .
-rw-r--r--source/blender/editors/transform/transform_mode.c16
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 2fd81486bb6..8df0f4eabd1 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);