From 3f43553ea096ce27da11ff797708ef7d6a391389 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 27 Apr 2022 14:55:06 -0700 Subject: Test UI for SL-17116. provide a debug interface to set a MaterialID for a face --- indra/newview/llpanelface.cpp | 11 ++++++++++- indra/newview/llpanelface.h | 1 + indra/newview/skins/default/xui/en/floater_tools.xml | 4 ++-- .../skins/default/xui/en/panel_tools_texture.xml | 17 +++++++++++++++-- 4 files changed, 28 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 71657239a6..094add423f 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -154,6 +154,7 @@ BOOL LLPanelFace::postBuild() childSetCommitCallback("glossiness",&LLPanelFace::onCommitMaterialGloss, this); childSetCommitCallback("environment",&LLPanelFace::onCommitMaterialEnv, this); childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this); + childSetCommitCallback("materialID", &LLPanelFace::onCommitMaterialID, this); childSetAction("button align",&LLPanelFace::onClickAutoFix,this); childSetAction("button align textures", &LLPanelFace::onAlignTexture, this); @@ -298,7 +299,7 @@ BOOL LLPanelFace::postBuild() { mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this); } - + clearCtrls(); @@ -1518,6 +1519,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal()); calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal()); calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal()); + + getChildView("materialID")->setEnabled(editable); } else { @@ -2302,6 +2305,12 @@ void LLPanelFace::onCommitMaterialMaskCutoff(LLUICtrl* ctrl, void* userdata) LLSelectedTEMaterial::setAlphaMaskCutoff(self,self->getCurrentAlphaMaskCutoff()); } +//static +void LLPanelFace::onCommitMaterialID(LLUICtrl* ctrl, void* userdata) +{ + LLPanelFace* self [[maybe_unused]] = (LLPanelFace*) userdata; +} + // static void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata ) { diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2d57d89a44..f7fa70a144 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -191,6 +191,7 @@ protected: static void onCommitMaterialGloss( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialEnv( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialMaskCutoff( LLUICtrl* ctrl, void* userdata); + static void onCommitMaterialID( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata); diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 0abee2ff80..44bdcd86f9 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2,7 +2,7 @@