From 50c201472a64cbb334ad1e144a2f846370a7a17d Mon Sep 17 00:00:00 2001 From: Doug Falta Date: Tue, 25 Jun 2024 09:08:34 -0500 Subject: [PATCH] #43: Add support for refreshing PBR textures on objects. --- indra/newview/alviewermenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/alviewermenu.cpp b/indra/newview/alviewermenu.cpp index 72a9b9a110..e81e3b1e51 100644 --- a/indra/newview/alviewermenu.cpp +++ b/indra/newview/alviewermenu.cpp @@ -361,6 +361,15 @@ namespace LLViewerTexture* spec_img = node->getObject()->getTESpecularMap(i); faces_per_tex[spec_img->getID()].push_back(i); } + + LLPointer mat = node->getObject()->getTE(i)->getGLTFRenderMaterial(); + if (mat.notNull()) + { + for (U32 j = 0; j < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++j) + { + faces_per_tex[mat->mTextureId[j]].push_back(i); + } + } } for (auto const& it : faces_per_tex)