diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-04 13:23:47 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-04 13:31:27 +0200 |
commit | 3290f16f29e503115b7eaeb2005cfdbba42668dd (patch) | |
tree | 571f47e765ebb3ca8ec922bdd0bff0c64b195fd8 /indra/newview/llpanelface.cpp | |
parent | 81a4c7598d5971b46826e37a0237a659b8895822 (diff) |
SL-18854 Fix drag'n drop of plain textures on faces in PBR mode
When in PBR 'mode', defaulted texture drops to diffuse channel
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 8848accab0..0b18bdc6e6 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -193,8 +193,6 @@ std::string USE_TEXTURE; LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit() { - - LLRender::eTexIndex channel_to_edit = LLRender::DIFFUSE_MAP; if (mComboMatMedia) { @@ -216,6 +214,17 @@ LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit() return channel_to_edit; } +LLRender::eTexIndex LLPanelFace::getTextureDropChannel() +{ + if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL) + { + LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type"); + return LLRender::eTexIndex(radio_mat_type->getSelectedIndex()); + } + + return LLRender::eTexIndex(MATTYPE_DIFFUSE); +} + // Things the UI provides... // LLUUID LLPanelFace::getCurrentNormalMap() { return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); } @@ -1560,7 +1569,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) enabled = editable && has_pbr_material; material_type = radio_pbr_type->getSelectedIndex(); } - LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type)); switch (material_type) { |