From 4ccea2a15c9f4fdd5d3f7cf2bbf3aad9a3909f4c Mon Sep 17 00:00:00 2001 From: LeeRiva <76054616+LeeRiva@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:33:30 +0200 Subject: [PATCH] Fixed the 'optional texture embedding' feature broken during development of the 'Animation' feature. --- src/assimp/SceneConverter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {}; } }