mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Adds a check so if we're trying to hit a named target, it doesn't spam the console with errors about not finding the diffuse texture.
This commit is contained in:
parent
702e63cb0c
commit
2d934032ea
1 changed files with 4 additions and 1 deletions
|
|
@ -392,7 +392,10 @@ void ProcessedMaterial::_setStageData()
|
||||||
mStages[i].setTex( MFT_DiffuseMap, _createTexture( mMaterial->mDiffuseMapFilename[i], &GFXDefaultStaticDiffuseProfile ) );
|
mStages[i].setTex( MFT_DiffuseMap, _createTexture( mMaterial->mDiffuseMapFilename[i], &GFXDefaultStaticDiffuseProfile ) );
|
||||||
if (!mStages[i].getTex( MFT_DiffuseMap ))
|
if (!mStages[i].getTex( MFT_DiffuseMap ))
|
||||||
{
|
{
|
||||||
mMaterial->logError("Failed to load diffuse map %s for stage %i", _getTexturePath(mMaterial->mDiffuseMapFilename[i]).c_str(), i);
|
//If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass. So we'll
|
||||||
|
//pass on the error rather than spamming the console
|
||||||
|
if (!mMaterial->mDiffuseMapFilename[i].startsWith("#"))
|
||||||
|
mMaterial->logError("Failed to load diffuse map %s for stage %i", _getTexturePath(mMaterial->mDiffuseMapFilename[i]).c_str(), i);
|
||||||
|
|
||||||
// Load a debug texture to make it clear to the user
|
// Load a debug texture to make it clear to the user
|
||||||
// that the texture for this stage was missing.
|
// that the texture for this stage was missing.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue