Commit: 65f62b70c21b4f3de1645a90fe63d00cc5324918
Author: Antonio Vazquez
Date:   Fri Feb 9 18:11:06 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB65f62b70c21b4f3de1645a90fe63d00cc5324918

Temp fix for object mode

The function ED_object_base_activate() was calling again the mode set and undo 
the mode change.

Do we need this function? Really the object is already the active one.

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

M       source/blender/editors/gpencil/gpencil_edit.c

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c 
b/source/blender/editors/gpencil/gpencil_edit.c
index 9312b18b199..0a04ca64f57 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -218,7 +218,7 @@ static int gpencil_editmode_toggle_exec(bContext *C, 
wmOperator *op)
        /* set workspace mode */
        // XXX: was BKE_workspace_object_mode_set()
        ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene);
-       ED_object_base_activate(C, view_layer->basact);
+       //ED_object_base_activate(C, view_layer->basact);
        /* setup other modes */
        gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
@@ -301,7 +301,7 @@ static int gpencil_paintmode_toggle_exec(bContext *C, 
wmOperator *op)
        /* set workspace mode */
        // XXX: was BKE_workspace_object_mode_set()
        ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene);
-       ED_object_base_activate(C, view_layer->basact);
+       //ED_object_base_activate(C, view_layer->basact);
        /* setup other modes */
        gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
@@ -383,7 +383,7 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, 
wmOperator *op)
        /* set workspace mode */
        // XXX: was BKE_workspace_object_mode_set()
        ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene);
-       ED_object_base_activate(C, view_layer->basact);
+       //ED_object_base_activate(C, view_layer->basact);
        /* setup other modes */
        gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
@@ -465,7 +465,7 @@ static int gpencil_weightmode_toggle_exec(bContext *C, 
wmOperator *op)
        /* set workspace mode */
        // XXX: was BKE_workspace_object_mode_set()
        ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene);
-       ED_object_base_activate(C, view_layer->basact);
+       //ED_object_base_activate(C, view_layer->basact);
        /* setup other modes */
        gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to