[Bf-blender-cvs] [67a03921fdb] greasepencil-object: Apply falloff to rotation
Antonio Vazquez
noreply at git.blender.org
Fri Jan 5 17:27:47 CET 2018
Commit: 67a03921fdb447ccc0d96904812bfa2a994309bf
Author: Antonio Vazquez
Date: Fri Jan 5 17:18:22 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB67a03921fdb447ccc0d96904812bfa2a994309bf
Apply falloff to rotation
===================================================================
M source/blender/editors/transform/transform.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 6355a075305..aca9b9c7f4e 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -3783,7 +3783,15 @@ static void ElementRotation_ex(TransInfo *t, TransData *td, float mat[3][3], con
if (t->flag & T_POINTS) {
mul_m3_m3m3(totmat, mat, td->mtx);
mul_m3_m3m3(smat, td->smtx, totmat);
-
+
+ /* apply gpencil falloff */
+ if (t->options & CTX_GPENCIL_STROKES) {
+ bGPDstroke *gps = (bGPDstroke *)td->extra;
+ mul_m3_fl(smat, gps->falloff);
+ /* fix scale */
+ smat[0][0] = smat[1][1] = smat[2][2] = 1.0f;
+ }
+
sub_v3_v3v3(vec, td->iloc, center);
mul_m3_v3(smat, vec);
More information about the Bf-blender-cvs
mailing list