From e16afa5c73eea51cc3b2e85641a7a4e4d615bd6f Mon Sep 17 00:00:00 2001 From: Antonioya Date: Wed, 26 Sep 2018 16:25:11 +0200 Subject: [PATCH] GP: Only check annotation origin for 3D View --- source/blender/editors/gpencil/annotate_paint.c | 11 +++++++---- 1 file 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");