Manual texture reloading now re-fetches materials-related textures.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user