diff options
author | Antonioya <blendergit@gmail.com> | 2019-01-16 13:25:12 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-01-16 21:22:13 +0300 |
commit | 798e67bc9e9d569c1781f4b8d41b4a752cbb8234 (patch) | |
tree | 717e67f59884e6d58acdf7ee611c0a6575584cc5 /source/blender | |
parent | c2dee803e31446c42dc6a371b9e89c4f4d559ead (diff) |
GP: Use multiframe falloff for Bend transformation
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 10082eaa6ef..652316ffc02 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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); |