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:
@@ -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
Reference in New Issue
Block a user