Skip to content

Commit 69662f6

Browse files
committed
USDScene : Fix build for older USD versions
1 parent fb7f16e commit 69662f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,7 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
12061206
}
12071207
else if( const IECoreScene::ShaderNetwork *shaderNetwork = runTimeCast<const ShaderNetwork>( attribute ) )
12081208
{
1209+
#if PXR_VERSION >= 2111
12091210
if( name == g_lightAttributeName )
12101211
{
12111212
ShaderAlgo::writeLight( shaderNetwork, m_location->prim );
@@ -1215,6 +1216,10 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
12151216
const auto &[output, purpose] = materialOutputAndPurpose( name.string() );
12161217
m_materials[purpose][output] = shaderNetwork;
12171218
}
1219+
#else
1220+
const auto &[output, purpose] = materialOutputAndPurpose( name.string() );
1221+
m_materials[purpose][output] = shaderNetwork;
1222+
#endif
12181223
}
12191224
else if( name.string() == "gaffer:globals" )
12201225
{

0 commit comments

Comments
 (0)