GPencil: Fix unreported move to layer with lock material
The strokes with the material locked could be moved. Now the lock is respected.
This commit is contained in:
@@ -1441,7 +1441,8 @@ void GPENCIL_OT_paste(wmOperatorType *ot)
|
||||
|
||||
static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
bGPdata *gpd = CTX_data_gpencil_data(C);
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
bGPdata *gpd = (bGPdata *)ob->data;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
bGPDlayer *target_layer = NULL;
|
||||
ListBase strokes = {NULL, NULL};
|
||||
@@ -1492,6 +1493,11 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check if the color is editable. */
|
||||
if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TODO: Don't just move entire strokes - instead, only copy the selected portions... */
|
||||
if (gps->flag & GP_STROKE_SELECT) {
|
||||
BLI_remlink(&gpf->strokes, gps);
|
||||
|
Reference in New Issue
Block a user