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

GPencil: Show Canvas Grid only in Draw Mode

The grid is not used in Edit mode and in Sculpt mode the position depends of 
point, so the visual help is not valid.

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

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 d67cca415fc..6df56cae8e1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -628,6 +628,7 @@ 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))
                {
@@ -663,9 +664,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
                        }
 
                        /* now move the origin to Object or Cursor */
-                       if ((ob->mode == OB_MODE_PAINT_GPENCIL) &&
-                               (ts->gpencil_v3d_align & GP_PROJECT_CURSOR))
-                       {
+                       if (ts->gpencil_v3d_align & GP_PROJECT_CURSOR) {
                                copy_v3_v3(stl->storage->grid_matrix[3], 
cursor->location);
                        }
                        else {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to