{LYN-3787} Fix for infinite loop in the scene builder's import phase (#747)

* This simple fix pops any node that can not be registered using it name and unique ID
* Any scene file (i.e FBX) with the three or more nodes with the same name and parent will sort of work
* After the 2nd child node with the same name and parent will be dropped on export

Tests: added the new AutomatedTesting/Assets/BadAssets/three_same_named_nodes.fbx to regress test this
This commit is contained in:
jackalbe
2021-05-13 17:50:02 -05:00
committed by GitHub
parent c2dc3dad32
commit 7d91a4c08e
2 changed files with 5 additions and 0 deletions
@@ -139,6 +139,8 @@ namespace AZ
if (!nodeNameMap.RegisterNode(node.m_node, scene.GetGraph(), node.m_parent))
{
AZ_TracePrintf(Utilities::ErrorWindow, "Failed to register asset importer node in name table.");
// Skip this node since it could not be registered
nodes.pop();
continue;
}
AZStd::string nodeName = nodeNameMap.GetNodeName(node.m_node);