[Bf-blender-cvs] [e16afa5c73e] blender2.8: GP: Only check annotation origin for 3D View
Antonioya
noreply at git.blender.org
Wed Sep 26 16:25:20 CEST 2018
Commit: e16afa5c73eea51cc3b2e85641a7a4e4d615bd6f
Author: Antonioya
Date: Wed Sep 26 16:25:11 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe16afa5c73eea51cc3b2e85641a7a4e4d615bd6f
GP: Only check annotation origin for 3D View
===================================================================
M source/blender/editors/gpencil/annotate_paint.c
===================================================================
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");
More information about the Bf-blender-cvs
mailing list