Commit: 2e4527f3ca14d2f96f1a20f25c59b90fec6e98b3 Author: Antonioya Date: Mon Jul 30 22:21:13 2018 +0200 Branches: greasepencil-object https://developer.blender.org/rB2e4527f3ca14d2f96f1a20f25c59b90fec6e98b3
Add a warning in annotations if active object is GP Now the annotations is not working with grease pencil object selected and we need inform the user. We need find a better solution for this, but at least we have a notification and not something that looks a bug, but a not supported function. =================================================================== 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 690bc13b394..6325052fccd 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1932,8 +1932,15 @@ static int gpencil_draw_exec(bContext *C, wmOperator *op) /* start of interactive drawing part of operator */ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + Object *ob = CTX_data_active_object(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 (G.debug & G_DEBUG) printf("GPencil - Starting Drawing\n"); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs