summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-05-18 12:00:36 -0700
committercallum_linden <none@none>2015-05-18 12:00:36 -0700
commit80aa29eaec78d267b4fa1822cfbd3a33b268066a (patch)
tree1ce0483bd490750e367bfe53a19ec312cdc0bd27 /indra/newview/llpanelface.cpp
parentd214c2854110520d5574f675bcc12f64bfd42090 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge with Viewer Release (after Viewer Release updated with Viewer Tools Update)
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rwxr-xr-xindra/newview/llpanelface.cpp67
1 files changed, 25 insertions, 42 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index cc8b7d2a52..afc1a789c4 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -240,6 +240,8 @@ BOOL LLPanelFace::postBuild()
if(mShinyColorSwatch)
{
mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2));
+ mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2));
+ mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
mShinyColorSwatch->setFollowsTop();
mShinyColorSwatch->setFollowsLeft();
mShinyColorSwatch->setCanApplyImmediately(TRUE);
@@ -898,52 +900,22 @@ void LLPanelFace::updateUI()
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
}
}
-
- if (shinytexture_ctrl)
- {
- if (identical_spec && (shiny == SHINY_TEXTURE))
- {
- shinytexture_ctrl->setTentative( FALSE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( specmap_id );
- }
- else if (specmap_id.isNull())
- {
- shinytexture_ctrl->setTentative( FALSE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( LLUUID::null );
- }
- else
- {
- shinytexture_ctrl->setTentative( TRUE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( specmap_id );
+
+ if (shinytexture_ctrl)
+ {
+ shinytexture_ctrl->setTentative( !identical_spec );
+ shinytexture_ctrl->setEnabled( editable );
+ shinytexture_ctrl->setImageAssetID( specmap_id );
}
- }
- if (bumpytexture_ctrl)
- {
- if (identical_norm && (bumpy == BUMPY_TEXTURE))
- {
- bumpytexture_ctrl->setTentative( FALSE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( normmap_id );
- }
- else if (normmap_id.isNull())
- {
- bumpytexture_ctrl->setTentative( FALSE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( LLUUID::null );
- }
- else
- {
- bumpytexture_ctrl->setTentative( TRUE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( normmap_id );
- }
+ if (bumpytexture_ctrl)
+ {
+ bumpytexture_ctrl->setTentative( !identical_norm );
+ bumpytexture_ctrl->setEnabled( editable );
+ bumpytexture_ctrl->setImageAssetID( normmap_id );
}
}
-
+
// planar align
bool align_planar = false;
bool identical_planar_aligned = false;
@@ -1461,12 +1433,23 @@ void LLPanelFace::onCancelColor(const LLSD& data)
LLSelectMgr::getInstance()->selectionRevertColors();
}
+void LLPanelFace::onCancelShinyColor(const LLSD& data)
+{
+ LLSelectMgr::getInstance()->selectionRevertShinyColors();
+}
+
void LLPanelFace::onSelectColor(const LLSD& data)
{
LLSelectMgr::getInstance()->saveSelectedObjectColors();
sendColor();
}
+void LLPanelFace::onSelectShinyColor(const LLSD& data)
+{
+ LLSelectedTEMaterial::setSpecularLightColor(this, getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+ LLSelectMgr::getInstance()->saveSelectedShinyColors();
+}
+
// static
void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
{