GP: Use multiframe falloff for Bend transformation
authorAntonioya <blendergit@gmail.com>
Wed, 16 Jan 2019 10:25:12 +0000 (11:25 +0100)
committerAntonioya <blendergit@gmail.com>
Wed, 16 Jan 2019 18:22:13 +0000 (19:22 +0100)
source/blender/editors/transform/transform.c

index 10082eaa6eff0ff36ac038a8e2097bb8a13b2777..652316ffc026ffcceebbe9ba589f5b027ff9a718 100644 (file)
@@ -3322,7 +3322,20 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
                                CLAMP(fac, 0.0f, 1.0f);
                        }
 
-                       fac_scaled = fac * td->factor;
+                       if (t->options & CTX_GPENCIL_STROKES) {
+                               /* grease pencil multiframe falloff */
+                               bGPDstroke *gps = (bGPDstroke *)td->extra;
+                               if (gps != NULL) {
+                                       fac_scaled = fac * td->factor * gps->runtime.multi_frame_falloff;
+                               }
+                               else {
+                                       fac_scaled = fac * td->factor;
+                               }
+                       }
+                       else {
+                               fac_scaled = fac * td->factor;
+                       }
+
                        axis_angle_normalized_to_mat3(mat, data->warp_nor, values.angle * fac_scaled);
                        interp_v3_v3v3(delta, warp_sta_local, warp_end_radius_local, fac_scaled);
                        sub_v3_v3(delta, warp_sta_local);