diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-27 14:52:46 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-27 14:52:46 -0400 |
commit | 9a0a68aa4468ccc072be0bf310ff2a5f4cd50f61 (patch) | |
tree | 324dc93040afe652fb2a1da4d617b794e0f2297f /indra | |
parent | 7477f9054846e1d8a11d0e31c51bd35efa9b4c18 (diff) | |
parent | cd46893057b9ec7d309059eff3f503cfaf46de56 (diff) |
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra')
22 files changed, 172 insertions, 150 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index dad2c615e3..128d67d73d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -164,7 +164,6 @@ set(viewer_SOURCE_FILES llfloaterbuyland.cpp llfloatercamera.cpp llfloatercolorpicker.cpp - llfloatercustomize.cpp llfloaterdaycycle.cpp llfloaterenvsettings.cpp llfloaterevent.cpp @@ -682,7 +681,6 @@ set(viewer_HEADER_FILES llfloaterbuyland.h llfloatercamera.h llfloatercolorpicker.h - llfloatercustomize.h llfloaterdaycycle.h llfloaterenvsettings.h llfloaterevent.h diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d84f8d071..0fa77ff7c2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -45,7 +45,6 @@ #include "llchannelmanager.h" #include "llconsole.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterreg.h" #include "llfloatertools.h" #include "llgroupactions.h" @@ -73,6 +72,7 @@ #include "llviewerdisplay.h" #include "llviewerjoystick.h" #include "llviewermediafocus.h" +#include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 9638d0e94f..47f290ad3b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -38,7 +38,6 @@ #include "llagent.h" #include "llanimationstates.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" @@ -48,6 +47,7 @@ #include "llviewercamera.h" #include "llviewercontrol.h" #include "llviewerjoystick.h" +#include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -1538,26 +1538,6 @@ F32 LLAgentCamera::calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_glob { F32 ui_offset = 0.f; - if (gFloaterCustomize) - { - const LLRect& rect = gFloaterCustomize->getRect(); - - // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); - F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians - F32 offset = tan(apparent_angle); - - if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) - { - // Move the avatar to the right (camera to the left) - ui_offset = offset; - } - else - { - // Move the avatar to the left (camera to the right) - ui_offset = -offset; - } - } F32 range = (F32)dist_vec(camera_pos_global, getFocusGlobal()); mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); return mUIOffset * range; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 68c4fa1ea0..cc9e68d593 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -39,7 +39,6 @@ #include "llagentwearablesfetch.h" #include "llappearancemgr.h" #include "llcallbacklist.h" -#include "llfloatercustomize.h" #include "llfolderview.h" #include "llgesturemgr.h" #include "llinventorybridge.h" @@ -617,6 +616,23 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) return NULL; } +LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) +{ + const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) + { + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) + { + LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); + if (curr_wearable && (curr_wearable->getItemID() == base_item_id)) + { + return curr_wearable; + } + } + } + return NULL; +} + LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { for (S32 i=0; i < LLWearableType::WT_COUNT; i++) @@ -1659,14 +1675,12 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty void LLAgentWearables::userRemoveAllClothes() { // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. - if (gFloaterCustomize) - { - gFloaterCustomize->askToSaveIfDirty(userRemoveAllClothesStep2); - } - else + if (gAgentCamera.cameraCustomizeAvatar()) { - userRemoveAllClothesStep2(TRUE); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + userRemoveAllClothesStep2(TRUE); } // static diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 1f19d1045b..c53b1333fc 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -91,6 +91,7 @@ public: const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; + LLWearable* getWearableFromItemID(const LLUUID& item_id); LLWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); static BOOL selfHasWearable(LLWearableType::EType type); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e017fffa54..8cc4436188 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -34,10 +34,10 @@ #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcommandhandler.h" -#include "llfloatercustomize.h" #include "llgesturemgr.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -1362,16 +1362,13 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego llinfos << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceMgr::changeOutfit, - &LLAppearanceMgr::instance(), - _1, category->getUUID(), append)); - } - else - { - LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); } void LLAppearanceMgr::wearOutfitByName(const std::string& name) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 29865e420a..577652fc79 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -41,7 +41,6 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llavataractions.h" -#include "llfloatercustomize.h" #include "llfloateropenobject.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" @@ -62,9 +61,11 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" @@ -4446,15 +4447,13 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty( - boost::bind(remove_inventory_category_from_avatar_step2, _1, category->getUUID())); - } - else - { - remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); } struct OnRemoveStruct @@ -4878,18 +4877,12 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); + LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); if( wearable ) { - // Set the tab to the right wearable. - if (gFloaterCustomize) - gFloaterCustomize->setCurrentWearableType( wearable->getType() ); + LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) - { - // Start Avatar Customization - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSidepanelAppearance::editWearable(wearable, panel); } } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c38d45f0f5..f67d91cfa5 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -52,7 +52,6 @@ #include "llappearancemgr.h" #include "llappviewer.h" //#include "llfirstuse.h" -#include "llfloatercustomize.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index 27a27fb65a..4c28e98e62 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -42,7 +42,6 @@ #include "lldrawpoolavatar.h" #include "llface.h" //#include "llfirstuse.h" -#include "llfloatercustomize.h" #include "llfloatertools.h" #include "llresmgr.h" #include "lltoolmgr.h" diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index b5b21584aa..9eccceca66 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -215,7 +215,10 @@ LLEditWearableDictionary::~LLEditWearableDictionary() LLEditWearableDictionary::Wearables::Wearables() { - addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); + // note the subpart that is listed first is treated as "default", regardless of what order is in enum. + // Please match the order presented in XUI. -Nyx + // this will affect what camera angle is shown when first editing a wearable + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS )); addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); @@ -898,6 +901,70 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) // Update picker controls state for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); + + showDefaultSubpart(); +} + +void LLPanelEditWearable::showDefaultSubpart() +{ + changeCamera(0); +} + +void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) +{ + bool expanded = param.asBoolean(); + + if (!mWearablePtr || !gAgentCamera.cameraCustomizeAvatar()) + { + // we don't have a valid wearable we're editing, or we've left the wearable editor + return; + } + + if (expanded) + { + changeCamera(index); + } + +} + +void LLPanelEditWearable::changeCamera(U8 subpart) +{ + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); + if (!wearable_entry) + { + llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; + return; + } + + if (subpart >= wearable_entry->mSubparts.size()) + { + llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << llendl; + return; + } + + ESubpart subpart_e = wearable_entry->mSubparts[subpart]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + return; + } + + // Update the camera + gMorphView->setCameraDistToDefault(); + gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) ); + gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset ); + gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); + if (gSavedSettings.getBOOL("AppearanceCameraMovement")) + { + gMorphView->updateCamera(); + } +} + +void LLPanelEditWearable::updateScrollingPanelList() +{ + updateScrollingPanelUI(); } void LLPanelEditWearable::initializePanel() @@ -974,6 +1041,7 @@ void LLPanelEditWearable::initializePanel() for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + showDefaultSubpart(); updateVerbs(); if (getWearable()) @@ -1013,52 +1081,6 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) } } -void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) -{ - bool expanded = param.asBoolean(); - - if (!mWearablePtr || !gAgentCamera.cameraCustomizeAvatar()) - { - // we don't have a valid wearable we're editing, or we've left the wearable editor - return; - } - - if (expanded) - { - const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); - if (!wearable_entry) - { - llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; - return; - } - - if (index >= wearable_entry->mSubparts.size()) - { - llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << index << llendl; - return; - } - - ESubpart subpart_e = wearable_entry->mSubparts[index]; - const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); - - if (!subpart_entry) - { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; - return; - } - - // Update the camera - gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) ); - gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset ); - gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); - gMorphView->setCameraDistToDefault(); - if (gSavedSettings.getBOOL("AppearanceCameraMovement")) - { - gMorphView->updateCamera(); - } - } -} - void LLPanelEditWearable::updateScrollingPanelUI() { // do nothing if we don't have a valid wearable we're editing diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 0953f09b6c..b6b8c0c781 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -1,6 +1,6 @@ /** - * @file llfloatercustomize.h - * @brief The customize avatar floater, triggered by "Appearance..." + * @file llpaneleditwearable.h + * @brief A LLPanel dedicated to the editing of wearables. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * @@ -65,10 +65,14 @@ public: void saveChanges(); void revertChanges(); + void showDefaultSubpart(); + void onTabExpandedCollapsed(const LLSD& param, U8 index); + + void updateScrollingPanelList(); + static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); - void onTabExpandedCollapsed(const LLSD& param, U8 index); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; @@ -88,6 +92,9 @@ private: void toggleTypeSpecificControls(LLWearableType::EType type); void updateTypeSpecificControls(LLWearableType::EType type); + // changes camera angle to default for selected subpart + void changeCamera(U8 subpart); + //alpha mask checkboxes void configureAlphaCheckbox(LLVOAvatarDefines::ETextureIndex te, const std::string& name); void onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLVOAvatarDefines::ETextureIndex te); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 707fc1555a..3719313c14 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -465,3 +465,19 @@ void LLSidepanelAppearance::setWearablesLoading(bool val) childSetVisible("wearables_loading_indicator", val); childSetVisible("edit_outfit_btn", !val); } + +void LLSidepanelAppearance::showDefaultSubpart() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->showDefaultSubpart(); + } +} + +void LLSidepanelAppearance::updateScrollingPanelList() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->updateScrollingPanelList(); + } +} diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 12303b6e96..5bde962c8d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -67,6 +67,8 @@ public: void showOutfitEditPanel(); void showWearableEditPanel(LLWearable *wearable = NULL); void setWearablesLoading(bool val); + void showDefaultSubpart(); + void updateScrollingPanelList(); private: void onFilterEdit(const std::string& search_string); diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 22e15dcff2..c1dc1de5e5 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -49,7 +49,6 @@ #include "lldrawable.h" #include "lldrawpoolavatar.h" #include "llface.h" -#include "llfloatercustomize.h" #include "llmorphview.h" #include "llresmgr.h" #include "llselectmgr.h" diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f0532d5a31..f8b6435614 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -61,9 +61,9 @@ #include "llviewerwindow.h" #include "lltrans.h" #include "llappearancemgr.h" -#include "llfloatercustomize.h" #include "llcommandhandler.h" #include "llviewermessage.h" +#include "llsidepanelappearance.h" ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names @@ -880,12 +880,14 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) void ModifiedCOFCallback::fire(const LLUUID& inv_item) { LLAppearanceMgr::instance().updateAppearanceFromCOF(); - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) + // TODO: camera mode may not be changed if a debug setting is tweaked + if( gAgentCamera.cameraCustomizeAvatar() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - if (gFloaterCustomize) + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel) { - gFloaterCustomize->switchToDefaultSubpart(); + panel->showDefaultSubpart(); } } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d0ac103f56..69352e6685 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -54,7 +54,6 @@ #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llbuycurrencyhtml.h" -#include "llfloatercustomize.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" #include "llfloaterland.h" @@ -3736,17 +3735,15 @@ void reset_view_final( BOOL proceed ); void handle_reset_view() { - if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - // Show dialog box if needed. - gFloaterCustomize->askToSaveIfDirty( reset_view_final ); - } - else - { - gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); - reset_view_final( TRUE ); - LLFloaterCamera::resetCameraMode(); + // switching to outfit selector should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); } + + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + reset_view_final( TRUE ); + LLFloaterCamera::resetCameraMode(); } class LLViewResetView : public view_listener_t diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9773275ede..da4ff1568b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -106,7 +106,6 @@ #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterland.h" #include "llfloaterinspect.h" #include "llfloatermap.h" @@ -4551,7 +4550,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gResizeScreenTexture = TRUE; - if (gFloaterCustomize && gFloaterCustomize->getVisible()) + if (gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a72d7f9227..2b0e974812 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7899,7 +7899,7 @@ BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 ind // baked textures can use TE images directly return ((isTextureDefined(type) || isSelf()) && (getTEImage(type)->getID() != IMG_INVISIBLE - || LLDrawPoolAlpha::sShowDebugAlpha)); + || LLDrawPoolAlpha::sShowDebugAlpha)); } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a8e2f446c2..a03ded26ac 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1337,7 +1337,7 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 { if (isIndexBakedTexture(type)) { - return LLVOAvatar::isTextureVisible(type); + return LLVOAvatar::isTextureVisible(type, (U32)0); } LLUUID tex_id = getLocalTextureID(type,index); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 10b9a18fa8..9e9b46473e 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -33,23 +33,25 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" -#include "llfloatercustomize.h" +#include "lldictionary.h" #include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" +#include "llsidepanelappearance.h" +#include "llsidetray.h" +#include "lltexlayer.h" +#include "lltexglobalcolor.h" +#include "lltrans.h" #include "llviewerregion.h" +#include "llvisualparam.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "llvoavatardefines.h" #include "llwearable.h" -#include "lldictionary.h" -#include "lltrans.h" -#include "lltexlayer.h" -#include "llvisualparam.h" -#include "lltexglobalcolor.h" using namespace LLVOAvatarDefines; @@ -576,14 +578,6 @@ BOOL LLWearable::isDirty() const } } - //if( gFloaterCustomize ) - //{ - // if( mDescription != gFloaterCustomize->getWearableDescription( mType ) ) - // { - // return TRUE; - // } - //} - return FALSE; } @@ -705,9 +699,9 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake } } - if( gFloaterCustomize ) + if( gAgentCamera.cameraCustomizeAvatar() ) { - gFloaterCustomize->setWearable(type, NULL, PERM_ALL, TRUE); + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } gAgentAvatarp->updateVisualParams(); @@ -976,9 +970,11 @@ void LLWearable::revertValues() syncImages(mSavedTEMap, mTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } @@ -1015,9 +1011,11 @@ void LLWearable::saveValues() // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) syncImages(mTEMap, mSavedTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h index a71362a139..07f8093426 100644 --- a/indra/newview/macview_Prefix.h +++ b/indra/newview/macview_Prefix.h @@ -65,7 +65,6 @@ #include "llfloater.h" #include "llfloaterbuildoptions.h" #include "llfloaterchat.h" -#include "llfloatercustomize.h" #include "llfloatergroups.h" #include "llfloaterworldmap.h" #include "llfloatermute.h" diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 71f740590b..0455086ef3 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -107,7 +107,7 @@ left="0" Jacket: </string> <string - name="skirt_skirt_desc_text"> + name="skirt_desc_text"> Skirt: </string> <string |