summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-03-02 02:25:59 -0800
committerAnchor Linden <anchor@lindenlab.com>2018-03-02 02:25:59 -0800
commit8f64a9edea9d4230cdc845c126955e23990823cb (patch)
tree8b8554c288f5ce826c30fff4e8c387cb93ad16fe /indra/newview/llpanelface.cpp
parent92bd48fd6db7c906b5c6a140875219e662939e57 (diff)
[MAINT 8081] - show/hide avatar base mesh regions if avatar joint attachments are using server bakes. pass the magic ids correctly across ui and texture entry.
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp65
1 files changed, 42 insertions, 23 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 7e75dca908..363fe3da04 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -867,41 +867,52 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
updateAlphaControls();
-
- if(texture_ctrl)
- {
+
+ if (texture_ctrl)
+ {
if (identical_diffuse)
{
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ texture_ctrl->setTentative(FALSE);
+ texture_ctrl->setEnabled(editable);
+ texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
- }
- else if (id.isNull())
+
+ if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)
{
- // None selected
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( FALSE );
- texture_ctrl->setImageAssetID( LLUUID::null );
- getChildView("combobox alphamode")->setEnabled( FALSE );
- getChildView("label alphamode")->setEnabled( FALSE );
- getChildView("maskcutoff")->setEnabled( FALSE);
- getChildView("label maskcutoff")->setEnabled( FALSE );
+ texture_ctrl->setBakeTextureEnabled(objectp->isAttachment());
}
- else
- {
- // Tentative: multiple selected with different textures
- texture_ctrl->setTentative( TRUE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ }
+ else if (id.isNull())
+ {
+ // None selected
+ texture_ctrl->setTentative(FALSE);
+ texture_ctrl->setEnabled(FALSE);
+ texture_ctrl->setImageAssetID(LLUUID::null);
+ getChildView("combobox alphamode")->setEnabled(FALSE);
+ getChildView("label alphamode")->setEnabled(FALSE);
+ getChildView("maskcutoff")->setEnabled(FALSE);
+ getChildView("label maskcutoff")->setEnabled(FALSE);
+ }
+ else
+ {
+ // Tentative: multiple selected with different textures
+ texture_ctrl->setTentative(TRUE);
+ texture_ctrl->setEnabled(editable);
+ texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
+
+ if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)
+ {
+ texture_ctrl->setBakeTextureEnabled(objectp->isAttachment());
+ }
}
+
}
if (shinytexture_ctrl)
@@ -2467,6 +2478,15 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
{
LLUUID get(LLViewerObject* object, S32 te_index)
{
+ LLTextureEntry *te = object->getTE(te_index);
+ if (te)
+ {
+ if ((te->getID() == IMG_USE_BAKED_EYES) || (te->getID() == IMG_USE_BAKED_HAIR) || (te->getID() == IMG_USE_BAKED_HEAD) || (te->getID() == IMG_USE_BAKED_LOWER) || (te->getID() == IMG_USE_BAKED_SKIRT) || (te->getID() == IMG_USE_BAKED_UPPER))
+ {
+ return te->getID();
+ }
+ }
+
LLUUID id;
LLViewerTexture* image = object->getTEImage(te_index);
if (image)
@@ -2476,7 +2496,6 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
if (!id.isNull() && LLViewerMedia::textureHasMedia(id))
{
- LLTextureEntry *te = object->getTE(te_index);
if (te)
{
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;