Warn for missing textures.
This commit is contained in:
@@ -406,12 +406,14 @@ bool Model::LoadMilkshapeAscii( CString sPath )
|
|||||||
|
|
||||||
if( strcmp(Material.szDiffuseTexture, "")!=0 )
|
if( strcmp(Material.szDiffuseTexture, "")!=0 )
|
||||||
{
|
{
|
||||||
CString sFile = Material.szDiffuseTexture;
|
CString sTexturePath = sDir + Material.szDiffuseTexture;
|
||||||
FixSlashesInPlace( sFile );
|
FixSlashesInPlace( sTexturePath );
|
||||||
CString sPath = sDir + Material.szDiffuseTexture;
|
CollapsePath( sTexturePath );
|
||||||
CollapsePath( sPath );
|
if( IsAFile(sTexturePath) )
|
||||||
if( IsAFile(sPath) )
|
Material.aniTexture.Load( sTexturePath );
|
||||||
Material.aniTexture.Load( sPath );
|
else
|
||||||
|
LOG->Warn( "\"%s\" references a texture \"%s\" that does not exist",
|
||||||
|
sPath.c_str(), sTexturePath.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// alpha texture
|
// alpha texture
|
||||||
|
|||||||
Reference in New Issue
Block a user