From 2d0c807daf88e03f14e3e8935c6af32c8b91aeb4 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Fri, 14 Jun 2024 17:26:28 +0200 Subject: [PATCH] Fix BP texture picker applying texture to the wrong material channel when different transforms tab is open --- indra/newview/fspanelface.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index b111e8b7b8..3fe3d8695d 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -3606,6 +3606,9 @@ void FSPanelFace::onCommitTexture() LL_WARNS() << "onCommitTexture" << LL_ENDL; add(LLStatViewer::EDIT_TEXTURE, 1); + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_DIFFUSE); + LLSelectMgr::getInstance()->saveSelectedObjectTextures(); sendTexture(); @@ -3641,12 +3644,19 @@ void FSPanelFace::onCommitTexture() void FSPanelFace::onCommitNormalTexture() { LLUUID nmap_id = getCurrentNormalMap(); + + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_NORMAL); + sendBump(nmap_id.isNull() ? 0 : BUMPY_TEXTURE); onTextureSelectionChanged(mBumpyTextureCtrl); } void FSPanelFace::onCommitSpecularTexture() { + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_SPECULAR); + sendShiny(SHINY_TEXTURE); onTextureSelectionChanged(mShinyTextureCtrl); }