Add warning when animated texture not found

This commit is contained in:
Marianne Gagnon 2015-12-06 20:14:55 -05:00
parent cfc6ccf5ea
commit ae916fced6

View File

@ -1345,6 +1345,7 @@ void Track::handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml)
// to lower case, for case-insensitive comparison
name = StringUtils::toLowerCase(name);
int moving_textures_found = 0;
for(unsigned int i=0; i<node->getMaterialCount(); i++)
{
video::SMaterial &irrMaterial=node->getMaterial(i);
@ -1361,8 +1362,12 @@ void Track::handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml)
if (texture_name != name) continue;
core::matrix4 *m = &irrMaterial.getTextureMatrix(j);
m_animated_textures.push_back(new MovingTexture(m, *texture_node));
moving_textures_found++;
} // for j<MATERIAL_MAX_TEXTURES
} // for i<getMaterialCount
if (moving_textures_found == 0)
Log::warn("AnimTexture", "Did not find animate texture '%s'", name.c_str());
} // for node_number < xml->getNumNodes
} // handleAnimatedTextures