diff options
author | Antonioya <blendergit@gmail.com> | 2018-12-05 18:31:29 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-12-05 18:31:43 +0300 |
commit | 6dcb474dd4b6de529dd1fb93b4e69208de44eb1d (patch) | |
tree | 7d343228ac7f693615f1064f3e73fceff2bbcee7 | |
parent | 3e1ca9a693be8b0b50ddb8aa766fd9852541f270 (diff) |
GP: Disable Draw Modes if enable Annotation
When enable annotations with a grease pencil object, the GP Object must be set to Object mode because the annotation Draw and the GP draw are incompatible.
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index c7e6bb844c0..c7a8e357e54 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1880,6 +1880,9 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event */ if (sa && sa->spacetype == SPACE_VIEW3D) { if ((ob != NULL) && (ob->type == OB_GPENCIL)) { + ob->mode = OB_MODE_OBJECT; + ED_gpencil_setup_modes(C, (bGPdata *)ob->data, 0); + ViewLayer *view_layer = CTX_data_view_layer(C); BKE_view_layer_base_deselect_all(view_layer); view_layer->basact = NULL; |