use internalname for terrain layers

stops bugs like spaces in filenames and the like from occuring due to pointing right at the diffuse flat file name, as well as corruption from using a different diffuse in the material later

(cherry picked from commit c1227dbdd0dd61c25970eeaac128c6cbe5d25947)
This commit is contained in:
AzaezelX 2021-11-29 13:52:45 -06:00
parent 3c30a905c3
commit 1b282e0baf

View file

@ -259,8 +259,7 @@ void TerrainFile::_initMaterialInstMapping()
for( U32 i = 0; i < mMaterials.size(); ++ i )
{
Torque::Path path( mMaterials[ i ]->getDiffuseMap());
mMaterialInstMapping.push_back( path.getFileName() );
mMaterialInstMapping.push_back(mMaterials[i]->getInternalName());
}
mMaterialInstMapping.mapMaterials();