diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-19 15:22:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-19 15:30:45 +0300 |
commit | 9e9d003a823f6f9f83c04b6f2493604735d80fe9 (patch) | |
tree | b6c340ebb2db256b563302c8a0f85714d2528aca /source/blender/blenkernel/intern/layer.c | |
parent | 8e8932c8ff28ec1b1ac7af9254244d94b326b9b8 (diff) |
Render: change view layer name convention to ViewLayer_001 to avoid OpenEXR issues
Some compositing applications do not support spaces and dots in layer names, and change
these to other symbols on import. This causes various compatibility issues, including
with Cryptomatte metadata. While technically those could be considered bugs in the
Cryptomatte implementation of other software, where they are not properly accounting for
that layer renaming, it's not ideal.
The OpenEXR channel naming convention is "layer.pass.channel". We get away with dots in
the layer name since we parse this from right to left, but it's a weak assumption.
Now we don't forbid using spaces or dots, and existing files are unchanged. But at
least by default names will be compatible, and hopefully other software catches up in
time to support more flexible layer names.
Ref T68924
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 502a4b8c22a..e51442b705d 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -170,7 +170,7 @@ ViewLayer *BKE_view_layer_context_active_PLACEHOLDER(const Scene *scene) static ViewLayer *view_layer_add(const char *name) { if (!name) { - name = DATA_("View Layer"); + name = DATA_("ViewLayer"); } ViewLayer *view_layer = MEM_callocN(sizeof(ViewLayer), "View Layer"); @@ -248,7 +248,7 @@ ViewLayer *BKE_view_layer_add(Scene *scene, BLI_uniquename(&scene->view_layers, view_layer_new, DATA_("ViewLayer"), - '.', + '_', offsetof(ViewLayer, name), sizeof(view_layer_new->name)); |