From abe08908406c6aca446bc196758abd350d523f66 Mon Sep 17 00:00:00 2001 From: Sebastien Blaineau-Ortega Date: Wed, 14 Apr 2021 02:52:57 +0200 Subject: [PATCH] Only force the ID to shapes if the reader has a parent procedural #724 (#752) Co-authored-by: Sebastien Blaineau-Ortega --- translator/reader/reader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translator/reader/reader.cpp b/translator/reader/reader.cpp index 7eb1136601..af2d07f4d1 100644 --- a/translator/reader/reader.cpp +++ b/translator/reader/reader.cpp @@ -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()); }