public bool ApplyTextureAliases( Dictionary<string, string> aliasList, bool apply )
{
bool testResult = false;
// if TUS has an alias, see if it's in the alias container
if ( !string.IsNullOrEmpty( textureNameAlias ) )
{
if ( aliasList.ContainsKey( textureNameAlias ) )
{
// match was found so change the texture name in frames
testResult = true;
if ( apply )
{
// currently assumes animated frames are sequentially numbered
// cubic, 1d, 2d, and 3d textures are determined from current TUS state
if ( this.isCubic )
{
SetCubicTextureName( aliasList[ textureNameAlias ], textureType == TextureType.CubeMap );
}
else
{
// if more than one frame, then assume animated frames
if ( numFrames > 1 )
{
SetAnimatedTextureName( aliasList[ textureNameAlias ], numFrames, animDuration );
}
else
{
SetTextureName( aliasList[ textureNameAlias ], textureType, textureSrcMipmaps );
}
}
}
}
}
return testResult;
}