From 40df1bba9707cdf35eb9583c2024b294da671a2a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Aug 2012 17:58:26 -0400 Subject: SH-3625 WIP - consolidating code paths for removal, removed dead code --- indra/newview/llagentwearables.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llagentwearables.h') diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 5932be21c6..550560d7bc 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -215,7 +215,6 @@ public: static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); static void userRemoveMultipleAttachments(llvo_vec_t& llvo_array); - static void userRemoveAllAttachments(); static void userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array); BOOL itemUpdatePending(const LLUUID& item_id) const; -- cgit v1.2.3 From c355fb98d3f4040196b7b8586dc9328fccb906d2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 3 Sep 2012 06:12:50 +0000 Subject: Extracted texture baking system into llappearance library. --- indra/newview/llagentwearables.h | 49 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'indra/newview/llagentwearables.h') diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 5932be21c6..3df552544b 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -40,10 +40,9 @@ class LLInventoryItem; class LLVOAvatarSelf; -class LLWearable; +class LLViewerWearable; class LLInitialWearablesFetch; class LLViewerObject; -class LLTexLayerTemplate; class LLAgentWearables : public LLInitClass { @@ -82,7 +81,7 @@ public: bool canMoveWearable(const LLUUID& item_id, bool closer_to_body); // Note: False for shape, skin, eyes, and hair, unless you have MORE than 1. - bool canWearableBeRemoved(const LLWearable* wearable) const; + bool canWearableBeRemoved(const LLViewerWearable* wearable) const; void animateAllWearableParams(F32 delta, BOOL upload_bake); @@ -92,15 +91,15 @@ public: 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); + const LLViewerWearable* getWearableFromItemID(const LLUUID& item_id) const; + LLViewerWearable* getWearableFromItemID(const LLUUID& item_id); + LLViewerWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); static BOOL selfHasWearable(LLWearableType::EType type); - LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); - const LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; - LLWearable* getTopWearable(const LLWearableType::EType type); - LLWearable* getBottomWearable(const LLWearableType::EType type); + LLViewerWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); + const LLViewerWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; + LLViewerWearable* getTopWearable(const LLWearableType::EType type); + LLViewerWearable* getBottomWearable(const LLWearableType::EType type); U32 getWearableCount(const LLWearableType::EType type) const; U32 getWearableCount(const U32 tex_index) const; @@ -113,31 +112,31 @@ public: private: // Low-level data structure setter - public access is via setWearableItem, etc. - void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable); - U32 pushWearable(const LLWearableType::EType type, LLWearable *wearable); - void wearableUpdated(LLWearable *wearable); - void popWearable(LLWearable *wearable); + void setWearable(const LLWearableType::EType type, U32 index, LLViewerWearable *wearable); + U32 pushWearable(const LLWearableType::EType type, LLViewerWearable *wearable); + void wearableUpdated(LLViewerWearable *wearable); + void popWearable(LLViewerWearable *wearable); void popWearable(const LLWearableType::EType type, U32 index); public: - void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false); - void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove); + void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false); + void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& 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(const LLWearable *wearable) const; + U32 getWearableIndex(const LLViewerWearable *wearable) const; protected: - void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false); - static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable); + void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false); + static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable); void addWearableToAgentInventory(LLPointer cb, - LLWearable* wearable, + LLViewerWearable* wearable, const LLUUID& category_id = LLUUID::null, BOOL notify = TRUE); void addWearabletoAgentInventoryDone(const LLWearableType::EType type, const U32 index, const LLUUID& item_id, - LLWearable* wearable); + LLViewerWearable* wearable); void recoverMissingWearable(const LLWearableType::EType type, U32 index /*= 0*/); void recoverMissingWearableDone(); @@ -180,7 +179,7 @@ protected: void sendAgentWearablesRequest(); void queryWearableCache(); void updateServer(); - static void onInitialWearableAssetArrived(LLWearable* wearable, void* userdata); + static void onInitialWearableAssetArrived(LLViewerWearable* wearable, void* userdata); //-------------------------------------------------------------------- // Outfits @@ -245,7 +244,7 @@ private: // Member variables //-------------------------------------------------------------------- private: - typedef std::vector wearableentry_vec_t; // all wearables of a certain type (EG all shirts) + typedef std::vector wearableentry_vec_t; // all wearables of a certain type (EG all shirts) typedef std::map wearableentry_map_t; // wearable "categories" arranged by wearable type wearableentry_map_t mWearableDatas; @@ -289,13 +288,13 @@ private: addWearableToAgentInventoryCallback(LLPointer cb, LLWearableType::EType type, U32 index, - LLWearable* wearable, + LLViewerWearable* wearable, U32 todo = CALL_NONE); virtual void fire(const LLUUID& inv_item); private: LLWearableType::EType mType; U32 mIndex; - LLWearable* mWearable; + LLViewerWearable* mWearable; U32 mTodo; LLPointer mCB; }; -- cgit v1.2.3 From 21c364c4d455cc05ec176032e8c090be0cc4ed50 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 3 Sep 2012 09:10:24 +0000 Subject: Renamed LLVOAvatarDefines to LLAvatarAppearanceDefines --- indra/newview/llagentwearables.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagentwearables.h') diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 3df552544b..423e23018e 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -36,7 +36,7 @@ // newview #include "llinventorymodel.h" #include "llviewerinventory.h" -#include "llvoavatardefines.h" +#include "llavatarappearancedefines.h" class LLInventoryItem; class LLVOAvatarSelf; @@ -122,7 +122,7 @@ public: void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false); void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& 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); + void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index); U32 getWearableIndex(const LLViewerWearable *wearable) const; protected: @@ -171,7 +171,7 @@ protected: public: // Processes the initial wearables update message (if necessary, since the outfit folder makes it redundant) static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); - LLUUID computeBakedTextureHash(LLVOAvatarDefines::EBakedTextureIndex baked_index, + LLUUID computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index, BOOL generate_valid_hash = TRUE); protected: -- cgit v1.2.3 From 85d0bcc0630bfbf8b50be3a47a113c4f8d6ec9df Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 6 Sep 2012 02:53:55 +0000 Subject: Extracted mWearableDatas from LLAgentWearables into llappearance/LLWearableData. Moved LLDriverParam into llappearance --- indra/newview/llagentwearables.h | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) (limited to 'indra/newview/llagentwearables.h') diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 41995dd55b..a60fbc969b 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -37,6 +37,7 @@ #include "llinventorymodel.h" #include "llviewerinventory.h" #include "llavatarappearancedefines.h" +#include "llwearabledata.h" class LLInventoryItem; class LLVOAvatarSelf; @@ -44,7 +45,7 @@ class LLViewerWearable; class LLInitialWearablesFetch; class LLViewerObject; -class LLAgentWearables : public LLInitClass +class LLAgentWearables : public LLInitClass, public LLWearableData { //-------------------------------------------------------------------- // Constructors / destructors / Initializers @@ -78,7 +79,7 @@ public: bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } void updateWearablesLoaded(); void checkWearablesLoaded() const; - bool canMoveWearable(const LLUUID& item_id, bool closer_to_body); + bool canMoveWearable(const LLUUID& item_id, bool closer_to_body) const; // Note: False for shape, skin, eyes, and hair, unless you have MORE than 1. bool canWearableBeRemoved(const LLViewerWearable* wearable) const; @@ -94,36 +95,22 @@ public: const LLViewerWearable* getWearableFromItemID(const LLUUID& item_id) const; LLViewerWearable* getWearableFromItemID(const LLUUID& item_id); LLViewerWearable* getWearableFromAssetID(const LLUUID& asset_id); + LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/); + const LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); static BOOL selfHasWearable(LLWearableType::EType type); - LLViewerWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); - const LLViewerWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; - LLViewerWearable* getTopWearable(const LLWearableType::EType type); - LLViewerWearable* getBottomWearable(const LLWearableType::EType type); - U32 getWearableCount(const LLWearableType::EType type) const; - U32 getWearableCount(const U32 tex_index) const; - - static const U32 MAX_CLOTHING_PER_TYPE = 5; - //-------------------------------------------------------------------- // Setters //-------------------------------------------------------------------- - private: - // Low-level data structure setter - public access is via setWearableItem, etc. - void setWearable(const LLWearableType::EType type, U32 index, LLViewerWearable *wearable); - U32 pushWearable(const LLWearableType::EType type, LLViewerWearable *wearable); - void wearableUpdated(LLViewerWearable *wearable); - void popWearable(LLViewerWearable *wearable); - void popWearable(const LLWearableType::EType type, U32 index); - + /*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed); public: void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false); void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, BOOL remove); void setWearableName(const LLUUID& item_id, const std::string& new_name); + // *TODO: Move this into llappearance/LLWearableData ? void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index); - U32 getWearableIndex(const LLViewerWearable *wearable) const; protected: void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false); @@ -171,10 +158,9 @@ protected: public: // Processes the initial wearables update message (if necessary, since the outfit folder makes it redundant) static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); - LLUUID computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index, - BOOL generate_valid_hash = TRUE); protected: + /*virtual*/ void invalidateBakedTextureHash(LLMD5& hash) const; void sendAgentWearablesUpdate(); void sendAgentWearablesRequest(); void queryWearableCache(); @@ -243,10 +229,6 @@ private: // Member variables //-------------------------------------------------------------------- private: - typedef std::vector wearableentry_vec_t; // all wearables of a certain type (EG all shirts) - typedef std::map wearableentry_map_t; // wearable "categories" arranged by wearable type - wearableentry_map_t mWearableDatas; - static BOOL mInitialWearablesUpdateReceived; BOOL mWearablesLoaded; std::set mItemsAwaitingWearableUpdate; -- cgit v1.2.3 From 6a8947679cdb3a3d6ce9d4d175a2bdfed4b7eee3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 16 Jan 2013 11:34:42 -0500 Subject: SH-3645 WIP - preserve item order after wearable save as --- indra/newview/llagentwearables.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagentwearables.h') diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index a60fbc969b..5be4648636 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -183,7 +183,7 @@ private: // Save Wearables //-------------------------------------------------------------------- public: - void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); + void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, const std::string& description, BOOL save_in_lost_and_found); void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE, const std::string new_name = ""); void saveAllWearables(); @@ -270,7 +270,8 @@ private: LLWearableType::EType type, U32 index, LLViewerWearable* wearable, - U32 todo = CALL_NONE); + U32 todo = CALL_NONE, + const std::string description = ""); virtual void fire(const LLUUID& inv_item); private: LLWearableType::EType mType; @@ -278,6 +279,7 @@ private: LLViewerWearable* mWearable; U32 mTodo; LLPointer mCB; + std::string mDescription; }; }; // LLAgentWearables -- cgit v1.2.3