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:
authorJulian Eisel <eiseljulian@gmail.com>2017-03-01 21:56:37 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-03-01 22:13:40 +0300
commit0f7a664731eb6e22d9c838f33fb62b2a16182538 (patch)
treedecefc848233fecb4c2d0050f0a9e60ad9891a4e /source/blender/makesrna
parent18684e546f25feefa5a696b786e74fd63b590d10 (diff)
Fix collection renaming not checking for unique name in entire hierarchy
Only checked for unique name in direct children of the master collection. Also added missing listener for outliner.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 86140eaaa05..cefc4a59da7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2262,10 +2262,7 @@ static void rna_SceneCollection_name_set(PointerRNA *ptr, const char *value)
{
Scene *scene = (Scene *)ptr->id.data;
SceneCollection *sc = (SceneCollection *)ptr->data;
- SceneCollection *sc_master = BKE_collection_master(scene);
-
- BLI_strncpy_utf8(sc->name, value, sizeof(sc->name));
- BLI_uniquename(&sc_master->scene_collections, sc, DATA_("SceneCollection"), '.', offsetof(SceneCollection, name), sizeof(sc->name));
+ BKE_collection_rename(scene, sc, value);
}
static void rna_SceneCollection_filter_set(PointerRNA *ptr, const char *value)
@@ -2517,10 +2514,7 @@ static void rna_LayerCollection_name_set(PointerRNA *ptr, const char *value)
{
Scene *scene = (Scene *)ptr->id.data;
SceneCollection *sc = ((LayerCollection *)ptr->data)->scene_collection;
- SceneCollection *sc_master = BKE_collection_master(scene);
-
- BLI_strncpy_utf8(sc->name, value, sizeof(sc->name));
- BLI_uniquename(&sc_master->scene_collections, sc, DATA_("SceneCollection"), '.', offsetof(SceneCollection, name), sizeof(sc->name));
+ BKE_collection_rename(scene, sc, value);
}
static PointerRNA rna_LayerCollection_objects_get(CollectionPropertyIterator *iter)