summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8228775596..2bcd0858d3 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5475,6 +5475,11 @@ S32 LLViewerObject::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* override_ma
tep->setGLTFRenderMaterial(render_mat);
retval = TEM_CHANGE_TEXTURE;
+ for (LLGLTFMaterial::local_tex_map_t::value_type &val : override_mat->mTrackingIdToLocalTexture)
+ {
+ LLLocalBitmapMgr::getInstance()->associateGLTFMaterial(val.first, override_mat);
+ }
+
}
else if (tep->setGLTFRenderMaterial(nullptr))
{
@@ -5482,14 +5487,6 @@ S32 LLViewerObject::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* override_ma
}
}
- if (retval == TEM_CHANGE_TEXTURE)
- {
- for (LLGLTFMaterial::local_tex_map_t::value_type val : override_mat->mTrackingIdToLocalTexture)
- {
- LLLocalBitmapMgr::getInstance()->associateGLTFMaterial(val.first, override_mat);
- }
- }
-
return retval;
}