diff --git a/src/assimp/SceneConverter.cpp b/src/assimp/SceneConverter.cpp index 0265708..1cc735b 100644 --- a/src/assimp/SceneConverter.cpp +++ b/src/assimp/SceneConverter.cpp @@ -424,10 +424,10 @@ SamplerData SceneConverter::convertTexture(const aiMaterial& material, aiTexture } else { - auto textureFilename = vsg::findFile(texPath.C_Str(), options); - if (samplerImage.data = vsg::read_cast(textureFilename, options); !samplerImage.data.valid()) + externalTextureFilename = vsg::findFile(texPath.C_Str(), options); + if (samplerImage.data = vsg::read_cast(externalTextureFilename, options); !samplerImage.data.valid()) { - vsg::warn("Failed to load texture: ", textureFilename, " texPath = ", texPath.C_Str()); + vsg::warn("Failed to load texture: ", externalTextureFilename, " texPath = ", texPath.C_Str()); return {}; } }