summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-02-02 23:51:56 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-02-02 23:51:56 +0200
commit8075cf04c4d55b5978a6a19efbf329d332fd85a0 (patch)
treeb4d8fa5150ff04902a7ad4330fbce30b1f717349 /indra/newview/llpanelface.cpp
parent70d0a39305f80d3f5548d7450ed17515ba23cb9f (diff)
Issue #26 Support texture drop onto PBR materials
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index f936739fde..a527ebe47f 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -227,6 +227,17 @@ LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
return LLRender::eTexIndex(MATTYPE_DIFFUSE);
}
+LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
+{
+ if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
+ {
+ LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
+ return texture_info_from_pbrtype(radio_pbr_type->getSelectedIndex());
+ }
+
+ return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
+}
+
// Things the UI provides...
//
LLUUID LLPanelFace::getCurrentNormalMap() { return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); }
@@ -4653,7 +4664,8 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
LLToolDragAndDrop::dropTextureAllFaces(objectp,
itemp_res,
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
- LLUUID::null);
+ LLUUID::null,
+ false);
}
else // one face
{
@@ -4662,6 +4674,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
itemp_res,
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
LLUUID::null,
+ false,
0);
}
}