summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-12 11:09:46 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-12 11:09:46 -0400
commit5e40435201e21a3b4b6f4a172937d3efe8ad15c0 (patch)
tree00ad500142405ab11fef14c6b7287efd1221ddcb /indra/newview/llvoavatarself.cpp
parent6681b47d4f75433ef409ca3eaa0ea1e10161cc80 (diff)
parent64ad1aba304c50173195e15477c1882c5b6e7d37 (diff)
merge
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rwxr-xr-xindra/newview/llvoavatarself.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index ecc616fa67..5355651692 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2705,19 +2705,38 @@ LLTexLayerSet* LLVOAvatarSelf::getLayerSet(EBakedTextureIndex baked_index) const
// static
-void LLVOAvatarSelf::onCustomizeStart()
+void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch)
{
- // We're no longer doing any baking or invalidating on entering
- // appearance editing mode. Leaving function in place in case
- // further changes require us to do something at this point - Nyx
+ if (isAgentAvatarValid())
+ {
+ gAgentAvatarp->mIsEditingAppearance = true;
+ gAgentAvatarp->mUseLocalAppearance = true;
+
+ if (gSavedSettings.getBOOL("AppearanceCameraMovement") && !disable_camera_switch)
+ {
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
+
+ gAgentAvatarp->invalidateAll();
+ gAgentAvatarp->updateMeshTextures();
+ }
}
// static
-void LLVOAvatarSelf::onCustomizeEnd()
+void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
{
+ gAgentAvatarp->mIsEditingAppearance = false;
if (isAgentAvatarValid())
{
gAgentAvatarp->invalidateAll();
+
+ if (gSavedSettings.getBOOL("AppearanceCameraMovement") && !disable_camera_switch)
+ {
+ gAgentCamera.changeCameraToDefault();
+ gAgentCamera.resetView();
+ }
+
+ LLAppearanceMgr::instance().updateAppearanceFromCOF();
}
}