diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 71e03f093b4..b1c0060981a 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -4619,6 +4619,8 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op) if (gpl_dst == NULL) { gpl_dst = BKE_gpencil_layer_addnew(gpd_dst, gpl->info, false, false); BKE_gpencil_layer_copy_settings(gpl, gpl_dst); + /* Copy masks. */ + BKE_gpencil_layer_mask_copy(gpl, gpl_dst); } /* add frame if not created before */ @@ -4737,6 +4739,9 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op) } ob_dst->actcol = actcol; + /* Remove any invalid Mask relationship. */ + BKE_gpencil_layer_mask_cleanup_all_layers(gpd_dst); + DEG_id_tag_update(&gpd_src->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); |