Commit: 6dcb474dd4b6de529dd1fb93b4e69208de44eb1d
Author: Antonioya
Date:   Wed Dec 5 16:31:29 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB6dcb474dd4b6de529dd1fb93b4e69208de44eb1d

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.

===================================================================

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 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to