Skip to content

Commit

Permalink
Fix render settings error #2234 (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor authored Feb 18, 2025
1 parent 85c0dad commit 71d22c2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions libs/render_delegate/render_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,17 @@ inline const TfTokenVector& _SupportedSprimTypes()
return r;
}

inline const TfTokenVector& _SupportedBprimTypes()
inline const TfTokenVector& _SupportedBprimTypes(bool ownsUniverse)
{
static const TfTokenVector r{HdPrimTypeTokens->renderBuffer, _tokens->openvdbAsset, HdPrimTypeTokens->renderSettings};
return r;
// For the hydra render delegate plugin, when we own the arnold universe, we don't want
// to support the render settings primitives as Bprims since it will be passed through SetRenderSettings
if (ownsUniverse) {
static const TfTokenVector r{HdPrimTypeTokens->renderBuffer, _tokens->openvdbAsset};
return r;
} else {
static const TfTokenVector r{HdPrimTypeTokens->renderBuffer, _tokens->openvdbAsset, HdPrimTypeTokens->renderSettings};
return r;
}
}

struct SupportedRenderSetting {
Expand Down Expand Up @@ -620,7 +627,7 @@ const TfTokenVector& HdArnoldRenderDelegate::GetSupportedRprimTypes() const { re

const TfTokenVector& HdArnoldRenderDelegate::GetSupportedSprimTypes() const { return _SupportedSprimTypes(); }

const TfTokenVector& HdArnoldRenderDelegate::GetSupportedBprimTypes() const { return _SupportedBprimTypes(); }
const TfTokenVector& HdArnoldRenderDelegate::GetSupportedBprimTypes() const { return _SupportedBprimTypes(_renderDelegateOwnsUniverse); }

void HdArnoldRenderDelegate::_SetRenderSetting(const TfToken& _key, const VtValue& _value)
{
Expand Down

0 comments on commit 71d22c2

Please sign in to comment.