summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2022-04-28 13:08:37 -0700
committerBrad Kittenbrink <brad@lindenlab.com>2022-04-28 13:08:37 -0700
commitc9ef206e39063c46c1fbab355c1a015e3e8b022e (patch)
treecaf74f8e69900d43dc4503a6dcb0abca770ebeb2 /indra/newview
parent3f43553ea096ce27da11ff797708ef7d6a391389 (diff)
Beginning viewer side work for SL-17198 new asset and inventory types for Materials
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelface.cpp4
-rw-r--r--indra/newview/llpanelface.h2
-rw-r--r--indra/newview/llviewerassettype.cpp1
3 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 094add423f..0b986e9a07 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -123,6 +123,7 @@ F32 LLPanelFace::getCurrentShinyScaleU() { return getChild<LLUICtrl>("shinySca
F32 LLPanelFace::getCurrentShinyScaleV() { return getChild<LLUICtrl>("shinyScaleV")->getValue().asReal(); }
F32 LLPanelFace::getCurrentShinyOffsetU() { return getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal(); }
F32 LLPanelFace::getCurrentShinyOffsetV() { return getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal(); }
+LLUUID LLPanelFace::getCurrentMaterialID() { return getChild<LLUICtrl>("materialID")->getValue().asUUID(); }
//
// Methods
@@ -2308,7 +2309,8 @@ void LLPanelFace::onCommitMaterialMaskCutoff(LLUICtrl* ctrl, void* userdata)
//static
void LLPanelFace::onCommitMaterialID(LLUICtrl* ctrl, void* userdata)
{
- LLPanelFace* self [[maybe_unused]] = (LLPanelFace*) userdata;
+ LLPanelFace* self = static_cast<LLPanelFace*>(userdata);
+ LLSelectedTEMaterial::setMaterialID(self, self->getCurrentMaterialID());
}
// static
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index f7fa70a144..6ce41a2aa7 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -234,6 +234,7 @@ private:
F32 getCurrentShinyScaleV();
F32 getCurrentShinyOffsetU();
F32 getCurrentShinyOffsetV();
+ LLUUID getCurrentMaterialID();
// Update visibility of controls to match current UI mode
// (e.g. materials vs media editing)
@@ -498,6 +499,7 @@ public:
DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID);
DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID);
DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor);
+ DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&, setMaterialID);
};
class LLSelectedTE
diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp
index 4804ef6ddc..481086f760 100644
--- a/indra/newview/llviewerassettype.cpp
+++ b/indra/newview/llviewerassettype.cpp
@@ -88,6 +88,7 @@ LLViewerAssetDictionary::LLViewerAssetDictionary()
addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE));
addEntry(LLViewerAssetType::AT_SETTINGS, new ViewerAssetEntry(DAD_SETTINGS));
+ addEntry(LLViewerAssetType::AT_MATERIAL, new ViewerAssetEntry(DAD_MATERIAL));
};
EDragAndDropType LLViewerAssetType::lookupDragAndDropType(EType asset_type)