Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-05-03 21:42:18 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-05-03 21:42:18 +0300
commit331bf04fad9389cb572ad4c07aab38f5264d9b0e (patch)
treed3f31ab0c1884577840f2d2b2133ea1250262c01
parenta577291b03e49a8c5d0f56232fbaec18acb199d4 (diff)
GPencil: Hide Canvas Grid when Surface or Stroke mode is enabled
This was introduced by error during refactor. The grid must not be visible in these modes.
-rw-r--r--source/blender/draw/engines/overlay/overlay_gpencil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.c b/source/blender/draw/engines/overlay/overlay_gpencil.c
index 05c159359ff..b79d5753686 100644
--- a/source/blender/draw/engines/overlay/overlay_gpencil.c
+++ b/source/blender/draw/engines/overlay/overlay_gpencil.c
@@ -201,7 +201,9 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata)
}
const bool show_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0;
- const bool show_grid = (v3d->gp_flag & V3D_GP_SHOW_GRID) != 0;
+ const bool show_grid = (v3d->gp_flag & V3D_GP_SHOW_GRID) != 0 &&
+ ((ts->gpencil_v3d_align &
+ (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE)) == 0);
if (show_grid && show_overlays) {
const char *grid_unit = NULL;