diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-08-25 17:51:01 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-08-25 17:51:01 -0400 |
commit | 5e110169701c8438a2c8191f03d3c5a4f080728c (patch) | |
tree | 583e042e69e0fb6a19481083a6b34097c457bb83 | |
parent | d52913bdbfdffd7ce4b1b2ace0b6eecd28a5ae43 (diff) |
Fixed an issue where you go into appearance pose when editing physics if you were formerly in edit outfit.
Miscellaneous code cleanup.
-rw-r--r-- | indra/newview/llagentwearables.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llagentwearables.h | 2 | ||||
-rw-r--r-- | indra/newview/llbreastmotion.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 18 |
4 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 91a09cd886..c1aae867ef 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -821,7 +821,7 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index) } } -U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) +U32 LLAgentWearables::getWearableIndex(const LLWearable *wearable) const { if (wearable == NULL) { diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index d7e77a5a5b..3ef50f14da 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -124,7 +124,7 @@ public: void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove); void setWearableName(const LLUUID& item_id, const std::string& new_name); void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); - U32 getWearableIndex(LLWearable *wearable); + U32 getWearableIndex(const LLWearable *wearable) const; protected: void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false); diff --git a/indra/newview/llbreastmotion.cpp b/indra/newview/llbreastmotion.cpp index 8d3571e83d..036aa2ff39 100644 --- a/indra/newview/llbreastmotion.cpp +++ b/indra/newview/llbreastmotion.cpp @@ -42,7 +42,8 @@ #include "llbreastmotion.h" #include "llcharacter.h" #include "llviewercontrol.h" -#include "llviewervisualparam.H" +#include "llviewervisualparam.h" +#include "llvoavatarself.h" // #define OUTPUT_BREAST_DATA diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index e8733bf3e4..1422971b52 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -185,18 +185,26 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) { if (new_visibility.asBoolean()) { - bool is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible(); - bool is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible(); + const BOOL is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible(); + const BOOL is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible(); if (is_outfit_edit_visible || is_wearable_edit_visible) { - if (!gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement")) + const LLWearable *wearable_ptr = mEditWearable->getWearable(); + if (!wearable_ptr) + { + llwarns << "Visibility change to invalid wearable" << llendl; + return; + } + const BOOL disable_camera_motion = LLWearableType::getDisableCameraSwitch(wearable_ptr->getType()); + if (!gAgentCamera.cameraCustomizeAvatar() && + !disable_camera_motion && + gSavedSettings.getBOOL("AppearanceCameraMovement")) { gAgentCamera.changeCameraToCustomizeAvatar(); } if (is_wearable_edit_visible) { - LLWearable *wearable_ptr = mEditWearable->getWearable(); if (gAgentWearables.getWearableIndex(wearable_ptr) == LLAgentWearables::MAX_CLOTHING_PER_TYPE) { // we're no longer wearing the wearable we were last editing, switch back to outfit editor @@ -380,7 +388,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we { gAgentCamera.changeCameraToCustomizeAvatar(); } - mEditWearable->setWearable(wearable); + mEditWearable->setWearable(wearable, disable_camera_switch); mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency } else |