From c9ef206e39063c46c1fbab355c1a015e3e8b022e Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Thu, 28 Apr 2022 13:08:37 -0700 Subject: Beginning viewer side work for SL-17198 new asset and inventory types for Materials --- indra/newview/llpanelface.cpp | 4 +++- indra/newview/llpanelface.h | 2 ++ indra/newview/llviewerassettype.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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("shinySca F32 LLPanelFace::getCurrentShinyScaleV() { return getChild("shinyScaleV")->getValue().asReal(); } F32 LLPanelFace::getCurrentShinyOffsetU() { return getChild("shinyOffsetU")->getValue().asReal(); } F32 LLPanelFace::getCurrentShinyOffsetV() { return getChild("shinyOffsetV")->getValue().asReal(); } +LLUUID LLPanelFace::getCurrentMaterialID() { return getChild("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(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) -- cgit v1.2.3