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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-19 13:13:27 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-19 13:59:05 +0300
commit8e8932c8ff28ec1b1ac7af9254244d94b326b9b8 (patch)
tree852045c004afdbf93d47f9c6fe83b96fae8f83db
parent6ee181ec2446fce3f61ed3a187ea08f50db82ca2 (diff)
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
-rw-r--r--source/blender/blenkernel/intern/layer.c6
1 files changed, 5 insertions, 1 deletions
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)