Skip to content

Commit 0c4e59b

Browse files
tallytalwarpixar-oss
authored andcommitted
Allow OSL context to be set for rmanOslParser similar to sdrOsl/oslParser
Once the sdrContext and shadingSystem concepts intermix is fixed in future, this fallback behavior of setting OSL as the node's context can be removed. (Internal change: 2404283)
1 parent 1b81c04 commit 0c4e59b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

third_party/renderman/plugin/rmanOslParser/rmanOslParser.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,8 @@ RmanOslParserPlugin::Parse(const NdrNodeDiscoveryResult& discoveryResult)
322322
// Set Sdr context if it's not already set in metadata, and if it's
323323
// a semantically valid context defined by USD 26.05.
324324
if (metadata.find(SdrNodeMetadata->Context) == metadata.end()) {
325-
TfToken context = _getSdrContextFromSchemaBase(metadata);
326-
if (context != _tokens->shadingSystem) {
327-
metadata[SdrNodeMetadata->Context] = context;
328-
}
325+
metadata[SdrNodeMetadata->Context] =
326+
_getSdrContextFromSchemaBase(metadata);
329327
}
330328
#endif
331329

@@ -388,6 +386,8 @@ RmanOslParserPlugin::_getSdrContextFromSchemaBase(
388386
}
389387

390388
// fallback to shadingSystem as default context
389+
// NOTE: This fallback will be removed and trigger a change in behavior
390+
// in SdrShaderNode::GetContext in an upcoming release.
391391
return _tokens->shadingSystem;
392392
}
393393

0 commit comments

Comments
 (0)