Test UI for SL-17116. provide a debug interface to set a MaterialID for a face

meow-7.2.2
Brad Kittenbrink 2022-04-27 14:55:06 -07:00
parent c9fbd9e2e8
commit 3f43553ea0
4 changed files with 28 additions and 5 deletions

View File

@ -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 )
{

View File

@ -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);

View File

@ -2,7 +2,7 @@
<floater
positioning="cascading"
legacy_header_height="18"
height="600"
height="640"
layout="topleft"
bg_opaque_image="Window_NoTitle_Foreground"
bg_alpha_image="Window_NoTitle_Background"
@ -820,7 +820,7 @@
width="282"/>
<tab_container
follows="left|top"
height="410"
height="460"
halign="center"
left="0"
name="Object Info Tabs"

View File

@ -2,7 +2,7 @@
<panel
border="false"
follows="all"
height="420"
height="500"
label="Texture"
layout="topleft"
left="0"
@ -772,7 +772,7 @@
width="260" />
<button
left="10"
top="222"
top="257"
height="20"
label="Align"
label_selected="Align current texture layers"
@ -793,4 +793,17 @@
height="4"
start_url="about:blank"
decouple_texture_size="true" />
<line_editor
enabled="true"
follows="top|left"
height="16"
layout="topleft"
left="7"
label="Material UUID"
name="materialID"
select_on_focus="true"
top="380"
width="200"
tool_tip="UUID for a material asset"
/>
</panel>