[Bf-blender-cvs] [646b7967383] greasepencil-object: GPencil: Set destination layer active after merge layers

Antonio Vazquez noreply at git.blender.org
Mon Feb 17 16:09:33 CET 2020


Commit: 646b796738367d99f464a2f7a94a53c4c97333e9
Author: Antonio Vazquez
Date:   Mon Feb 17 16:09:26 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB646b796738367d99f464a2f7a94a53c4c97333e9

GPencil: Set destination layer active after merge layers

If the destination layer is not set as active, the next operation will create a layer because no active layer.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 410279e359d..8d08109dfc5 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1215,6 +1215,8 @@ static int gp_merge_layer_exec(bContext *C, wmOperator *op)
       gpl_current->act_mask++;
     }
   }
+  /* Set destination layer as active. */
+  BKE_gpencil_layer_active_set(gpd, gpl_current);
 
   /* Now delete next layer */
   BKE_gpencil_layer_delete(gpd, gpl_next);



More information about the Bf-blender-cvs mailing list