diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-26 13:27:19 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-26 13:27:19 -0400 |
commit | 1084bfef0057de5cd3201426aaad68329a62a0da (patch) | |
tree | 88f3aea04a0f94a78f5c51829165ba5a32b9abdc /indra | |
parent | c7b6ab820800d91d62ac292c7a1fe2ef12b3c5e1 (diff) |
EXT-7213 WIP kill old appearance editor and all traces of code
part 2 - correcting a few points that would have broken the build.
Final version will be reviewed before pushing.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llagentwearables.h | 1 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 13 |
7 files changed, 33 insertions, 11 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 68c4fa1ea0..0f9ab6cfa1 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++) 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/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 39fcf867b1..3ff88ec951 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4879,12 +4879,12 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); + LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); if( wearable ) { LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - LLSidePanelAppearance::editWearable(wearable, panel); + LLSidepanelAppearance::editWearable(wearable, panel); } } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 838f57073e..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,7 +884,7 @@ 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 - LLSidepanelAppearance *panel = dynamic_cast<LLSidePanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); if (panel) { panel->showDefaultSubpart(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 76aa2ae0f1..a1637c4724 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7888,7 +7888,7 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index } //virtual -BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index ) const { if (isIndexLocalTexture(type)) { diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ebca12dee8..1ad4175a42 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1333,11 +1333,11 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 } //virtual -BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index) const { if (isIndexBakedTexture(type)) { - return LLVOAvatar::isTextureVisible(type,0); + 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 358defbb31..94d70992f6 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; |