|
|
@ -267,10 +267,11 @@ namespace sh
|
|
|
|
|
|
|
|
|
|
|
|
MaterialInstance* Factory::searchInstance (const std::string& name)
|
|
|
|
MaterialInstance* Factory::searchInstance (const std::string& name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mMaterials.find(name) != mMaterials.end())
|
|
|
|
MaterialMap::iterator it = mMaterials.find(name);
|
|
|
|
return &mMaterials.find(name)->second;
|
|
|
|
if (it != mMaterials.end())
|
|
|
|
|
|
|
|
return &(it->second);
|
|
|
|
return NULL;
|
|
|
|
else
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MaterialInstance* Factory::findInstance (const std::string& name)
|
|
|
|
MaterialInstance* Factory::findInstance (const std::string& name)
|
|
|
@ -434,8 +435,9 @@ namespace sh
|
|
|
|
|
|
|
|
|
|
|
|
std::string Factory::retrieveTextureAlias (const std::string& name)
|
|
|
|
std::string Factory::retrieveTextureAlias (const std::string& name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mTextureAliases.find(name) != mTextureAliases.end())
|
|
|
|
TextureAliasMap::iterator it = mTextureAliases.find(name);
|
|
|
|
return mTextureAliases[name];
|
|
|
|
if (it != mTextureAliases.end())
|
|
|
|
|
|
|
|
return it->second;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|