Skip to content

Commit

Permalink
Use static tokens for arnold:format and arnold:filter (#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor committed Jul 26, 2023
1 parent b9b39cd commit cc613f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/render_delegate/render_pass.cpp
Expand Up @@ -955,15 +955,15 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
// Querying the data format from USD, with a default value of color3f.
// If we have arnold:format defined, we use its value for the format
const TfToken hydraFormat = _GetOptionalSetting<TfToken>(renderVar.settings, _tokens->dataType, _GetTokenFromHdFormat(renderVar.format));
const TfToken arnoldFormat = _GetOptionalSetting<TfToken>(renderVar.settings, TfToken("arnold:format"), TfToken(""));
const TfToken arnoldFormat = _GetOptionalSetting<TfToken>(renderVar.settings, _tokens->arnoldFormat, TfToken(""));
const TfToken format = arnoldFormat != TfToken("") ? arnoldFormat : hydraFormat;
const auto arnoldTypes = _GetArnoldAOVTypeFromTokenType(format);
const auto aovName = _CreateAOV(
_renderDelegate, arnoldTypes, renderVar.name, renderVar.sourceType,
renderVar.sourceName, customRenderVar.writer, customRenderVar.reader, lightPathExpressions,
aovShaders);
// Check if the AOV has a specific filter
const auto arnoldAovFilterName = _GetOptionalSetting<std::string>(renderVar.settings, TfToken("arnold:filter"), "");
const auto arnoldAovFilterName = _GetOptionalSetting<std::string>(renderVar.settings, _tokens->aovSettingFilter, "");
AtNode *aovFilterNode = arnoldAovFilterName.empty() ? nullptr : _CreateFilter(_renderDelegate, renderVar.settings);
customRenderVar.output =
AtString{TfStringPrintf(
Expand Down

0 comments on commit cc613f3

Please sign in to comment.