[Bf-blender-cvs] [8709a51fa90] master: Fix T103293: GPencil Multiframe Scale affects stroke thickness inversely

Antonio Vazquez noreply at git.blender.org
Sat Dec 17 16:36:11 CET 2022


Commit: 8709a51fa9073884510a546ca99de45321f1d26f
Author: Antonio Vazquez
Date:   Sat Dec 17 16:35:54 2022 +0100
Branches: master
https://developer.blender.org/rB8709a51fa9073884510a546ca99de45321f1d26f

Fix T103293: GPencil Multiframe Scale affects stroke thickness inversely

The problem was the falloff factor was applied directly
and in the thickness must be inversed. Now the thickess
is calculated using an interpolation.

===================================================================

M	source/blender/editors/transform/transform_mode.c

===================================================================

diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index aeceedf0690..95d2b4d6439 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -1029,8 +1029,9 @@ void ElementResize(const TransInfo *t,
       applyNumInput(&num_evil, values_final_evil);
 
       float ratio = values_final_evil[0];
-      *td->val = td->ival * fabs(ratio) * gps->runtime.multi_frame_falloff;
-      CLAMP_MIN(*td->val, 0.001f);
+      float transformed_value = td->ival * fabs(ratio);
+      *td->val = max_ff(interpf(transformed_value, td->ival, gps->runtime.multi_frame_falloff),
+                        0.001f);
     }
   }
   else {



More information about the Bf-blender-cvs mailing list