From b0f78605227a5a4b87aebbada70a0bd2a8d9ca2a Mon Sep 17 00:00:00 2001 From: Sebastien Blaineau-Ortega Date: Thu, 3 Nov 2022 14:26:34 +0100 Subject: [PATCH] Fix build issues in older versions of USD (#1347) --- render_delegate/utils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/render_delegate/utils.cpp b/render_delegate/utils.cpp index bdbd7d6c70..977de7dcd2 100644 --- a/render_delegate/utils.cpp +++ b/render_delegate/utils.cpp @@ -1569,15 +1569,21 @@ bool HdArnoldGetComputedPrimvars( const auto computedPrimvars = delegate->GetExtComputationPrimvarDescriptors(id, interpolation); for (const auto& primvar : computedPrimvars) { if (HdChangeTracker::IsPrimvarDirty(dirtyBits, id, primvar.name)) { +#if PXR_VERSION >= 2105 if (primvar.name == HdTokens->points) pointsPrimvars.emplace_back(primvar); else +#endif + { + dirtyPrimvars.emplace_back(primvar); + } } } } bool changed = false; +#if PXR_VERSION >= 2105 if (pointsSample && !pointsPrimvars.empty()) { HdExtComputationUtils::SampledValueStore valueStore; const size_t maxSamples = HD_ARNOLD_MAX_PRIMVAR_SAMPLES; @@ -1592,6 +1598,7 @@ bool HdArnoldGetComputedPrimvars( *pointsSample = itComputed->second; } } +#endif if (!dirtyPrimvars.empty()) {