[Bf-blender-cvs] [8e8932c8ff2] master: Render: use "_" as delimiter in AOV names to avoid issues with OpenEXR

Brecht Van Lommel noreply at git.blender.org
Tue Oct 19 13:09:28 CEST 2021


Commit: 8e8932c8ff28ec1b1ac7af9254244d94b326b9b8
Author: Brecht Van Lommel
Date:   Tue Oct 19 12:13:27 2021 +0200
Branches: master
https://developer.blender.org/rB8e8932c8ff28ec1b1ac7af9254244d94b326b9b8

Render: use "_" as delimiter in AOV names to avoid issues with OpenEXR

OpenEXR uses "." to separate layers/passes/channels, so using AOV.001 is
a problem. Other applications will not be able to parse it correctly.

Default to AOV_001 instead, and don't allow using dots in AOV names.

Fixes T89991
Ref T73266
Ref D12871

===================================================================

M	source/blender/blenkernel/intern/layer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 434a2296d95..502a4b8c22a 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -2380,8 +2380,12 @@ static void viewlayer_aov_make_name_unique(ViewLayer *view_layer)
   if (aov == NULL) {
     return;
   }
+
+  /* Don't allow dots, it's incompatible with OpenEXR convention to store channels
+   * as "layer.pass.channel". */
+  BLI_str_replace_char(aov->name, '.', '_');
   BLI_uniquename(
-      &view_layer->aovs, aov, DATA_("AOV"), '.', offsetof(ViewLayerAOV, name), sizeof(aov->name));
+      &view_layer->aovs, aov, DATA_("AOV"), '_', offsetof(ViewLayerAOV, name), sizeof(aov->name));
 }
 
 static void viewlayer_aov_active_set(ViewLayer *view_layer, ViewLayerAOV *aov)



More information about the Bf-blender-cvs mailing list