Skip to content

Commit

Permalink
Only force the ID to shapes if the reader has a parent procedural #724 (
Browse files Browse the repository at this point in the history
#752)

Co-authored-by: Sebastien Blaineau-Ortega <[email protected]>
  • Loading branch information
sebastienblor and sebastienblor authored Apr 14, 2021
1 parent 59628ca commit abe0890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions translator/reader/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,8 @@ void UsdArnoldReaderThreadContext::SetDispatcher(WorkDispatcher *dispatcher)
AtNode *UsdArnoldReaderThreadContext::CreateArnoldNode(const char *type, const char *name)
{
AtNode *node = AiNode(_reader->GetUniverse(), type, name, _reader->GetProceduralParent());
// All shape nodes should have an id parameter.
if (AiNodeEntryGetType(AiNodeGetNodeEntry(node)) == AI_NODE_SHAPE) {
// All shape nodes should have an id parameter if we're coming from a parent procedural
if (_reader->GetProceduralParent() && AiNodeEntryGetType(AiNodeGetNodeEntry(node)) == AI_NODE_SHAPE) {
AiNodeSetUInt(node, str::id, _reader->GetId());
}

Expand Down

0 comments on commit abe0890

Please sign in to comment.