From bce167fb9aee8ca760618f6838e6075943bc749e Mon Sep 17 00:00:00 2001 From: cpichard Date: Fri, 5 Jan 2024 10:31:53 +0000 Subject: [PATCH] add the layer name if it is different than the sourceName (#1785) --- CHANGELOG.md | 2 +- libs/render_delegate/render_pass.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3328e11f..34668c6766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - [usd#1770](https://github.com/Autodesk/arnold-usd/issues/1770) - Fix exr driver always rendering float with husk when productType is arnold - [usd#1772](https://github.com/Autodesk/arnold-usd/issues/1772) - RectLight texture uvs are now consistent between husk, kick and other renderers. - [usd#1776](https://github.com/Autodesk/arnold-usd/issues/1776) - Fix incorrect PointInstancer instance orientations in the render delegate. +- [usd#1784] (https://github.com/Autodesk/arnold-usd/issues/1784) - The aov layer name is now correctly taken into account when rendering exrs with husk and using the arnold productType. ## [7.2.5.0] - 2023-12-13 @@ -31,7 +32,6 @@ - [usd#1524](https://github.com/Autodesk/arnold-usd/issues/1524) - Fix material binding on instances under a SkelRoot - [usd#1718](https://github.com/Autodesk/arnold-usd/issues/1718) - Support primvars:arnold attributes in Arnold typed schemas - ## [7.2.4.1] - 2023-10-18 ### Bugfix diff --git a/libs/render_delegate/render_pass.cpp b/libs/render_delegate/render_pass.cpp index 2b406bf2f7..3382ffdd37 100644 --- a/libs/render_delegate/render_pass.cpp +++ b/libs/render_delegate/render_pass.cpp @@ -932,11 +932,13 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt // Check if the AOV has a specific filter const auto arnoldAovFilterName = _GetOptionalSetting(renderVar.settings, _tokens->aovSettingFilter, ""); AtNode *aovFilterNode = arnoldAovFilterName.empty() ? nullptr : _CreateFilter(_renderDelegate, renderVar.settings, ++filterIndex); - customRenderVar.output = - AtString{TfStringPrintf( - arnoldTypes.isHalf ? "%s %s %s %s HALF": "%s %s %s %s", aovName.c_str(), arnoldTypes.outputString, aovFilterNode ? AiNodeGetName(aovFilterNode) : filterName, - customDriverName.c_str()) - .c_str()}; + std::string output = TfStringPrintf( + "%s %s %s %s", aovName.c_str(), arnoldTypes.outputString, aovFilterNode ? AiNodeGetName(aovFilterNode) : filterName, + customDriverName.c_str()); + if (!renderVar.name.empty() && renderVar.name != renderVar.sourceName) { + output += TfStringPrintf(" %s", renderVar.name.c_str()); + } + customRenderVar.output = AtString{output.c_str()}; } tolerance += 1; enableFiltering += 1;