Manual texture reloading now re-fetches materials-related textures.

This commit is contained in:
Shyotl
2014-08-18 23:47:37 -05:00
parent d1d68721ac
commit 1b3f0f9ec0

View File

@@ -2204,8 +2204,17 @@ void reload_objects(LLTextureReloader& texture_list, LLViewerObject::const_child
for (U8 i = 0; i < object->getNumTEs(); i++)
{
texture_list.addTexture(object->getTEImage(i));
const LLTextureEntry* te = object->getTE(i);
if (LLMaterial* mat = te ? te->getMaterialParams().get() : NULL)
{
if (mat->getSpecularID().notNull())
texture_list.addTexture(LLViewerTextureManager::getFetchedTexture(mat->getSpecularID()));
if (mat->getNormalID().notNull())
texture_list.addTexture(LLViewerTextureManager::getFetchedTexture(mat->getNormalID()));
}
}
if(recurse)
{
reload_objects(texture_list,object->getChildren(), true);