summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-05-26 18:22:15 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-05-26 18:22:15 -0400
commitb2433a6c82980e76dfde8735d69b788d20abc9d8 (patch)
tree56598d9bec26b54d3ba1a3896ac2cf52c2af139f /indra
parent14b8471d448a6e591ab29d25634a32d882853212 (diff)
parentec7dbc704040dfcdcd101f090dbb2f780ca0ee8a (diff)
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentcamera.cpp20
-rw-r--r--indra/newview/llagentwearables.cpp27
-rw-r--r--indra/newview/llagentwearables.h1
-rw-r--r--indra/newview/llappearancemgr.cpp14
-rw-r--r--indra/newview/llinventorybridge.cpp25
-rw-r--r--indra/newview/llpaneleditwearable.cpp115
-rw-r--r--indra/newview/llpaneleditwearable.h9
-rw-r--r--indra/newview/llsidepanelappearance.cpp16
-rw-r--r--indra/newview/llsidepanelappearance.h2
-rw-r--r--indra/newview/llviewerinventory.cpp6
-rw-r--r--indra/newview/llviewermenu.cpp16
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp23
-rw-r--r--indra/newview/llvoavatar.h14
-rw-r--r--indra/newview/llvoavatarself.cpp26
-rw-r--r--indra/newview/llvoavatarself.h3
-rw-r--r--indra/newview/llwearable.cpp37
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml2
18 files changed, 217 insertions, 141 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 9638d0e94f..d9eceec30d 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -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..1deba2e2e6 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -617,6 +617,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 +1676,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..5a4c30a307 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -34,6 +34,7 @@
#include "llaccordionctrltab.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
#include "llcommandhandler.h"
@@ -1362,16 +1363,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..f3dfde03c3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -62,6 +62,7 @@
#include "llpreviewgesture.h"
#include "llpreviewtexture.h"
#include "llselectmgr.h"
+#include "llsidepanelappearance.h"
#include "llsidetray.h"
#include "lltrans.h"
#include "llviewerassettype.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/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 8e9b164c09..2ba39fca9c 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -215,7 +215,9 @@ 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
+ 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));
@@ -893,6 +895,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()
@@ -969,6 +1035,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();
}
@@ -994,52 +1061,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 6f9ac82407..0af3758a4e 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -63,10 +63,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;
@@ -86,6 +90,9 @@ private:
void toggleTypeSpecificControls(LLWearableType::EType type);
void updateTypeSpecificControls(LLWearableType::EType type);
+ // changes camera angle to default for selected subpart
+ void changeCamera(U8 subpart);
+
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 010d593b27..6f934a0b66 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/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f0532d5a31..4dbede79da 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -64,6 +64,7 @@
#include "llfloatercustomize.h"
#include "llcommandhandler.h"
#include "llviewermessage.h"
+#include "llsidepanelappearance.h"
///----------------------------------------------------------------------------
/// Helper class to store special inventory item names
@@ -883,9 +884,10 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item)
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
// 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..b1b6db3305 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3736,17 +3736,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 editor 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 e0463e3c4a..f72f122f8a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4545,7 +4545,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 4371396629..a1637c4724 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7887,3 +7887,26 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index
getImage(te, index)->getID() != IMG_DEFAULT);
}
+//virtual
+BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index ) const
+{
+ if (isIndexLocalTexture(type))
+ {
+ return isTextureDefined(type, index);
+ }
+ else
+ {
+ // baked textures can use TE images directly
+ return ((isTextureDefined(type) || isSelf())
+ && (getTEImage(type)->getID() != IMG_INVISIBLE
+ || LLDrawPoolAlpha::sShowDebugAlpha));
+ }
+}
+
+//virtual
+BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const
+{
+ // non-self avatars don't have wearables
+ return FALSE;
+}
+
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 86a7cdae02..df47e9ba1d 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -462,7 +462,9 @@ public:
//--------------------------------------------------------------------
public:
virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
- BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const;
+ virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
+ virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
+
protected:
BOOL isFullyBaked();
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
@@ -1039,14 +1041,4 @@ protected: // Shared with LLVOAvatarSelf
}; // LLVOAvatar
-//------------------------------------------------------------------------
-// Inlines
-//------------------------------------------------------------------------
-inline BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex te) const
-{
- return ((isTextureDefined(te) || isSelf())
- && (getTEImage(te)->getID() != IMG_INVISIBLE
- || LLDrawPoolAlpha::sShowDebugAlpha));
-}
-
#endif // LL_VO_AVATAR_H
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index cf3fb01b5a..1ad4175a42 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1332,6 +1332,32 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32
return isDefined;
}
+//virtual
+BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index) const
+{
+ if (isIndexBakedTexture(type))
+ {
+ return LLVOAvatar::isTextureVisible(type, (U32)0);
+ }
+
+ LLUUID tex_id = getLocalTextureID(type,index);
+ return (tex_id != IMG_INVISIBLE)
+ || (LLDrawPoolAlpha::sShowDebugAlpha);
+}
+
+//virtual
+BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const
+{
+ if (isIndexBakedTexture(type))
+ {
+ return isTextureVisible(type);
+ }
+
+ U32 index = gAgentWearables.getWearableIndex(wearable);
+ return isTextureVisible(type,index);
+}
+
+
//-----------------------------------------------------------------------------
// requestLayerSetUploads()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 8e6d9698f2..189c1ac808 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -179,6 +179,9 @@ public:
BOOL isLocalTextureDataFinal(const LLTexLayerSet* layerset) const;
// If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index
/*virtual*/ BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const;
+ /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
+ /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
+
//--------------------------------------------------------------------
// Local Textures
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 10b9a18fa8..0fcb257e74 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -33,23 +33,26 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "llagentwearables.h"
+#include "lldictionary.h"
#include "llfloatercustomize.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 +579,6 @@ BOOL LLWearable::isDirty() const
}
}
- //if( gFloaterCustomize )
- //{
- // if( mDescription != gFloaterCustomize->getWearableDescription( mType ) )
- // {
- // return TRUE;
- // }
- //}
-
return FALSE;
}
@@ -705,9 +700,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 +971,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 +1012,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/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