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:
authorAntonioya <blendergit@gmail.com>2018-09-26 17:25:11 +0300
committerAntonioya <blendergit@gmail.com>2018-09-26 17:25:11 +0300
commite16afa5c73eea51cc3b2e85641a7a4e4d615bd6f (patch)
treea8f6b75c104dffed3a9c877f40e41faa843ee8c4 /source/blender/editors/gpencil/annotate_paint.c
parent1cdf136846c9a5aa804eb757164ce78ffc90626a (diff)
GP: Only check annotation origin for 3D View
Diffstat (limited to 'source/blender/editors/gpencil/annotate_paint.c')
-rw-r--r--source/blender/editors/gpencil/annotate_paint.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 4d73be7758d..d6d2ce8585a 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -1862,14 +1862,17 @@ static int gpencil_draw_exec(bContext *C, wmOperator *op)
static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
Object *ob = CTX_data_active_object(C);
+ ScrArea *sa = CTX_wm_area(C);
tGPsdata *p = NULL;
/* GPXX Need a better solution */
- if ((ob != NULL) && (ob->type == OB_GPENCIL)) {
- BKE_report(op->reports, RPT_ERROR, "Cannot draw annotation with a Grease Pencil object active");
- return OPERATOR_CANCELLED;
+ if (sa && sa->spacetype == SPACE_VIEW3D)
+ {
+ if ((ob != NULL) && (ob->type == OB_GPENCIL)) {
+ BKE_report(op->reports, RPT_ERROR, "Cannot draw annotation with a Grease Pencil object active");
+ return OPERATOR_CANCELLED;
+ }
}
-
if (G.debug & G_DEBUG)
printf("GPencil - Starting Drawing\n");