diff --git a/projects/FBX/FBXSDK.cpp b/projects/FBX/FBXSDK.cpp index 695d2ca19e..1ae8532587 100644 --- a/projects/FBX/FBXSDK.cpp +++ b/projects/FBX/FBXSDK.cpp @@ -609,7 +609,7 @@ void TraverseNodesToGetPrim(FbxNode* pNode, std::string target_name, std::shared FbxMesh* mesh = pNode->GetMesh(); if (mesh) { - auto name = mesh->GetName(); + auto name = pNode->GetName(); if (target_name == name) { auto sub_prim = GetMesh(pNode); if (sub_prim) { @@ -628,7 +628,6 @@ void TraverseNodesToGetPrims(FbxNode* pNode, std::vectorGetMesh(); if (mesh) { - auto name = mesh->GetName(); auto sub_prim = GetMesh(pNode); if (sub_prim) { prims.push_back(sub_prim);