[Bf-blender-cvs] [4ee23876b59] greasepencil-object: Revert "GPencil: Show Canvas Grid only in Draw Mode"

Antonioya noreply at git.blender.org
Sat Mar 16 17:15:14 CET 2019


Commit: 4ee23876b59dcfbe8a640d000592db8a615cfc1b
Author: Antonioya
Date:   Sat Mar 16 16:53:04 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB4ee23876b59dcfbe8a640d000592db8a615cfc1b

Revert "GPencil: Show Canvas Grid only in Draw Mode"

This reverts commit a6ca1b27fbdf32b68d13cea5413d97f588d1ce37.

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 6df56cae8e1..d67cca415fc 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -628,7 +628,6 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
 		    ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
 		    (v3d->gp_flag & V3D_GP_SHOW_GRID) &&
 		    (ob->type == OB_GPENCIL) && (ob == draw_ctx->obact) &&
-			(ob->mode == OB_MODE_PAINT_GPENCIL) &&
 			((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0) &&
 			((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) == 0))
 		{
@@ -664,7 +663,9 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
 			}
 
 			/* now move the origin to Object or Cursor */
-			if (ts->gpencil_v3d_align & GP_PROJECT_CURSOR) {
+			if ((ob->mode == OB_MODE_PAINT_GPENCIL) &&
+				(ts->gpencil_v3d_align & GP_PROJECT_CURSOR))
+			{
 				copy_v3_v3(stl->storage->grid_matrix[3], cursor->location);
 			}
 			else {



More information about the Bf-blender-cvs mailing list