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:
authorJoshua Leung <aligorith@gmail.com>2008-10-11 02:49:17 +0400
committerJoshua Leung <aligorith@gmail.com>2008-10-11 02:49:17 +0400
commitc3aef29ab704ba7ca9ec401ad0028d21d8b431be (patch)
tree32bb758a5aad940e1c928a14c9c19b64a379e8ff
parent2f9e0ec15453261c7edde8b2fa487c4c17af65de (diff)
Bugfix #17802: Grease Pencil still draws when not shown in Image Editor
Added missing check for this case.
-rw-r--r--source/blender/src/gpencil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/src/gpencil.c b/source/blender/src/gpencil.c
index 6d6430aa76b..fe91b94eefc 100644
--- a/source/blender/src/gpencil.c
+++ b/source/blender/src/gpencil.c
@@ -1754,6 +1754,14 @@ static void gp_session_initpaint (tGPsdata *p)
p->sa= curarea;
p->v2d= &sima->v2d;
p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
+
+ /* check that gpencil data is allowed to be drawn */
+ if ((sima->flag & SI_DISPGP)==0) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown \n");
+ return;
+ }
}
break;
/* unsupported views */