diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index e4402a51ca7..724e1dc2027 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -464,6 +464,13 @@ static void rna_GPencilLayer_info_set(PointerRNA *ptr, const char *value) /* now fix animation paths */ BKE_animdata_fix_paths_rename_all(&gpd->id, "layers", oldname, gpl->info); + + /* Fix mask layer. */ + LISTBASE_FOREACH (bGPDlayer *, gpl_, &gpd->layers) { + if ((gpl_->mask_layer[0] != '\0') && STREQ(gpl_->mask_layer, oldname)) { + BLI_strncpy(gpl_->mask_layer, gpl->info, sizeof(gpl_->mask_layer)); + } + } } static void rna_GPencil_layer_mask_set(PointerRNA *ptr, const bool value) |