diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 91a09cd886f91251d0095fdbdd1a21cdbf01ffad..c1aae867efbcf3eea7e9fce835f41491d9457624 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 d7e77a5a5bd9a323e53a6fb8fbbd0941d42ed0af..3ef50f14da45b8c13e844004a2e748adb7bdd2fe 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -124,7 +124,7 @@ class LLAgentWearables : public LLInitClass<LLAgentWearables> 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 8d3571e83dced3189bfe6e125dc9515d2734ec80..036aa2ff3964c523870d1f959189b5f3e6c39437 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 e8733bf3e43293bbf899337a5c79eef95f57906d..1422971b525d48541953e861b2631779644f2ce5 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