Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_mask.c')
-rw-r--r--source/blender/makesrna/intern/rna_mask.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index afd149a755a..b660236ea4f 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -52,12 +52,10 @@
#ifdef RNA_RUNTIME
-#include "DNA_mask_types.h"
#include "DNA_movieclip_types.h"
#include "BKE_depsgraph.h"
#include "BKE_mask.h"
-#include "BKE_tracking.h"
#include "BLI_math.h"
@@ -213,10 +211,13 @@ static void rna_MaskLayer_name_set(PointerRNA *ptr, const char *value)
{
Mask *mask = (Mask *)ptr->id.data;
MaskLayer *masklay = (MaskLayer *)ptr->data;
+ char oldname[sizeof(masklay->name)], newname[sizeof(masklay->name)];
- BLI_strncpy(masklay->name, value, sizeof(masklay->name));
+ /* need to be on the stack */
+ BLI_strncpy(oldname, masklay->name, sizeof(masklay->name));
+ BLI_strncpy_utf8(newname, value, sizeof(masklay->name));
- BKE_mask_layer_unique_name(mask, masklay);
+ BKE_mask_layer_rename(mask, masklay, oldname, newname);
}
static PointerRNA rna_MaskLayer_active_spline_get(PointerRNA *ptr)