[Bf-blender-cvs] [f1996fa1249] greasepencil-object: Minor Optimisation for GP Grab brush

Joshua Leung noreply at git.blender.org
Mon Dec 18 12:37:20 CET 2017


Commit: f1996fa1249e69e5060a440c6ee39364c1fb17c4
Author: Joshua Leung
Date:   Mon Dec 18 21:29:30 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBf1996fa1249e69e5060a440c6ee39364c1fb17c4

Minor Optimisation for GP Grab brush

Write directly to the point instead of writing to a temporary value first

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

M	source/blender/editors/gpencil/gpencil_brush.c

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

diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 2af9aca9939..f6fea8724ca 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -500,8 +500,7 @@ static void gp_brush_grab_apply_cached(
 		/* apply transformation */
 		mul_v3_m4v3(fpt, diff_mat, &pt->x);
 		/* apply */
-		add_v3_v3(fpt, delta);
-		copy_v3_v3(&pt->x, fpt);
+		add_v3_v3v3(&pt->x, fpt, delta);
 		/* undo transformation to the init parent position */
 		float inverse_diff_mat[4][4];
 		invert_m4_m4(inverse_diff_mat, diff_mat);



More information about the Bf-blender-cvs mailing list