summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2012-07-11 18:30:39 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2012-07-11 18:30:39 -0400
commit64ad1aba304c50173195e15477c1882c5b6e7d37 (patch)
tree292cdd519bd77d1d944d60b4ac564a1d7b2b896e /indra/newview/llsidepanelappearance.cpp
parent033c84dc9452f4b38cdf87446203241c4554d126 (diff)
SH-3258 WIP initial work: refactoring appearance editing mode
Added flags for appearance editing status as well as which textures we should be using at a time. Also refactored so we are not using camera state to track appearance editing mode. Need to add more handling for which textures we actually use.
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r--indra/newview/llsidepanelappearance.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 853656905c..9267444534 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -206,12 +206,9 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
}
// Disable camera switch is currently just for WT_PHYSICS type since we don't want to freeze the avatar
// when editing its physics.
- const BOOL disable_camera_motion = LLWearableType::getDisableCameraSwitch(wearable_ptr->getType());
- if (!gAgentCamera.cameraCustomizeAvatar() &&
- !disable_camera_motion &&
- gSavedSettings.getBOOL("AppearanceCameraMovement"))
+ if (!gAgentCamera.cameraCustomizeAvatar())
{
- gAgentCamera.changeCameraToCustomizeAvatar();
+ LLVOAvatarSelf::onCustomizeStart(LLWearableType::getDisableCameraSwitch(wearable_ptr->getType()));
}
if (is_wearable_edit_visible)
{
@@ -283,7 +280,7 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked()
{
if (gAgentWearables.areWearablesLoaded())
{
- gAgentCamera.changeCameraToCustomizeAvatar();
+ LLVOAvatarSelf::onCustomizeStart();
}
}
@@ -371,15 +368,14 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam
if (visible)
{
mOutfitEdit->onOpen(LLSD());
- if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
- {
- gAgentCamera.changeCameraToCustomizeAvatar();
- }
+ LLVOAvatarSelf::onCustomizeStart(disable_camera_switch);
}
- else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ else
{
- gAgentCamera.changeCameraToDefault();
- gAgentCamera.resetView();
+ if (!disable_camera_switch) // if we're just switching between outfit and wearable editing, don't end customization.
+ {
+ LLVOAvatarSelf::onCustomizeEnd(disable_camera_switch);
+ }
}
}
@@ -405,10 +401,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
if (visible)
{
- if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
- {
- gAgentCamera.changeCameraToCustomizeAvatar();
- }
+ LLVOAvatarSelf::onCustomizeStart(disable_camera_switch);
mEditWearable->setWearable(wearable, disable_camera_switch);
mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency
}
@@ -416,10 +409,9 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
{
// Save changes if closing.
mEditWearable->saveChanges();
- if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ if (!disable_camera_switch) // if we're just switching between outfit and wearable editing, don't end customization.
{
- gAgentCamera.changeCameraToDefault();
- gAgentCamera.resetView();
+ LLVOAvatarSelf::onCustomizeEnd(disable_camera_switch);
}
}
}