diff --git a/graphics/src/AssimpLoader.cc b/graphics/src/AssimpLoader.cc index 2eda1248..9a72be07 100644 --- a/graphics/src/AssimpLoader.cc +++ b/graphics/src/AssimpLoader.cc @@ -584,7 +584,7 @@ ImagePtr AssimpLoader::Implementation::LoadEmbeddedTexture( std::string AssimpLoader::Implementation::GenerateTextureName( const aiScene* _scene, aiMaterial* _mat, const std::string& _type) const { - return ToString(_scene->mRootNode->mName) + "_" + ToString(_mat->GetName()) + + return ToString(_scene->mName) + "_" + ToString(_mat->GetName()) + "_" + _type; } diff --git a/graphics/src/AssimpLoader_TEST.cc b/graphics/src/AssimpLoader_TEST.cc index 5df30d0f..348b954e 100644 --- a/graphics/src/AssimpLoader_TEST.cc +++ b/graphics/src/AssimpLoader_TEST.cc @@ -673,7 +673,7 @@ TEST_F(AssimpLoader, LoadGlTF2BoxWithJPEGTexture) EXPECT_EQ(math::Color(0.4f, 0.4f, 0.4f, 1.0f), mat->Ambient()); EXPECT_EQ(math::Color(1.0f, 1.0f, 1.0f, 1.0f), mat->Diffuse()); EXPECT_EQ(math::Color(0.0f, 0.0f, 0.0f, 1.0f), mat->Specular()); - EXPECT_EQ("Cube_Material_Diffuse", mat->TextureImage()); + EXPECT_EQ("Scene_Material_Diffuse", mat->TextureImage()); EXPECT_NE(nullptr, mat->TextureData()); }