Fix for [#20331] adding and removing render layers in specific sequence creates layers with the same name

Render layers now use the same consistent 'unique name' function as other parts of Blender (i.e. RenderLayer.001). Updated the defaults for consistency.
This commit is contained in:
2009-12-11 05:23:00 +00:00
parent 34ec7474fd
commit 877c47fe35
2 changed files with 9543 additions and 9538 deletions

View File

@@ -29,6 +29,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@@ -862,7 +863,8 @@ void scene_add_render_layer(Scene *sce)
int tot= 1 + BLI_countlist(&sce->r.layers);
srl= MEM_callocN(sizeof(SceneRenderLayer), "new render layer");
sprintf(srl->name, "%d RenderLayer", tot);
sprintf(srl->name, "RenderLayer");
BLI_uniquename(&sce->r.layers, srl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), 32);
BLI_addtail(&sce->r.layers, srl);
/* note, this is also in render, pipeline.c, to make layer when scenedata doesnt have it */

File diff suppressed because it is too large Load Diff