diff options
| -rw-r--r-- | indra/newview/llagentwearables.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 84 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.h | 74 | ||||
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llinventorypanel.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llstartup.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llvoavatarself.cpp | 4 | 
9 files changed, 96 insertions, 106 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 9b4986247f..94bf54de7e 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1261,7 +1261,7 @@ LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name)  		LLFolderType::FT_OUTFIT,  		new_folder_name); -	LLAppearanceManager::shallowCopyCategory(LLAppearanceManager::getCOF(),folder_id, NULL); +	LLAppearanceManager::instance().shallowCopyCategory(LLAppearanceManager::instance().getCOF(),folder_id, NULL);  #if 0  // BAP - fix to go into rename state automatically after outfit is created.  	LLViewerInventoryCategory *parent_category = gInventory.getCategory(parent_id); @@ -1391,7 +1391,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem  			const LLUUID &item_id = getWearableItemID(type,i);  			popWearable(type,i);  			gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -			LLAppearanceManager::removeItemLinks(item_id,false); +			LLAppearanceManager::instance().removeItemLinks(item_id,false);  			//queryWearableCache(); // moved below  			if (old_wearable) @@ -1408,7 +1408,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem  		const LLUUID &item_id = getWearableItemID(type,index);  		popWearable(type, index);  		gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -		LLAppearanceManager::removeItemLinks(item_id,false); +		LLAppearanceManager::instance().removeItemLinks(item_id,false);  		//queryWearableCache(); // moved below @@ -2014,7 +2014,7 @@ void LLInitialWearablesFetch::done()  	gInventory.collectDescendentsIf(mCompleteFolders.front(), cat_array, wearable_array,   									LLInventoryModel::EXCLUDE_TRASH, is_wearable); -	LLAppearanceManager::setAttachmentInvLinkEnable(true); +	LLAppearanceManager::instance().setAttachmentInvLinkEnable(true);  	if (wearable_array.count() > 0)  	{  		LLAppearanceManager::instance().updateAppearanceFromCOF(); @@ -2023,7 +2023,7 @@ void LLInitialWearablesFetch::done()  	{  		processWearablesMessage();  		// Create links for attachments that may have arrived before the COF existed. -		LLAppearanceManager::linkRegisteredAttachments(); +		LLAppearanceManager::instance().linkRegisteredAttachments();  	}  	delete this;  } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0901289dac..5f2d22d78c 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -72,7 +72,7 @@ protected:  		// If the inventory callback manager goes away, we're shutting down, no longer want the callback.  		if( LLInventoryCallbackManager::is_instantiated() )  		{ -			LLAppearanceManager::wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); +			LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);  		}  		else  		{ @@ -171,7 +171,7 @@ void LLOutfitObserver::done()  	else  	{  		// Wear the inventory category. -		LLAppearanceManager::wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); +		LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);  	}  } @@ -251,7 +251,7 @@ public:  	virtual ~LLUpdateAppearanceOnDestroy()  	{ -		LLAppearanceManager::updateAppearanceFromCOF(); +		LLAppearanceManager::instance().updateAppearanceFromCOF();  	}  	/* virtual */ void fire(const LLUUID& inv_item) @@ -296,7 +296,7 @@ struct LLWearableHoldingPattern  	bool append;  }; -/* static */ void removeDuplicateItems(LLInventoryModel::item_array_t& items) +static void removeDuplicateItems(LLInventoryModel::item_array_t& items)  {  	LLInventoryModel::item_array_t new_items;  	std::set<LLUUID> items_seen; @@ -323,7 +323,7 @@ struct LLWearableHoldingPattern  	items = new_items;  } -void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventoryModel::item_array_t& src) +static void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventoryModel::item_array_t& src)  {  	LLInventoryModel::item_array_t new_dst;  	std::set<LLUUID> mark_inventory; @@ -361,25 +361,23 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory  	dst = new_dst;  } -/* static */   LLUUID LLAppearanceManager::getCOF()  {  	return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);  }  // Update appearance from outfit folder. -/* static */   void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append)  {  	if (!proceed)  		return;  #if 1  -	updateCOF(category,append); +	LLAppearanceManager::instance().updateCOF(category,append);  #else  	if (append)  	{ -		updateCOFFromCategory(category, append); // append is true - add non-duplicates to COF. +		LLAppearanceManager::instance().updateCOFFromCategory(category, append); // append is true - add non-duplicates to COF.  	}  	else  	{ @@ -387,18 +385,17 @@ void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, boo  		if (catp->getPreferredType() == LLFolderType::FT_NONE ||  			LLFolderType::lookupIsEnsembleType(catp->getPreferredType()))  		{ -			updateCOFFromCategory(category, append);  // append is false - rebuild COF. +			LLAppearanceManager::instance().updateCOFFromCategory(category, append);  // append is false - rebuild COF.  		}  		else if (catp->getPreferredType() == LLFolderType::FT_OUTFIT)  		{ -			rebuildCOFFromOutfit(category); +			LLAppearanceManager::instance().rebuildCOFFromOutfit(category);  		}  	}  #endif  }  // Append to current COF contents by recursively traversing a folder. -/* static */   void LLAppearanceManager::updateCOFFromCategory(const LLUUID& category, bool append)  {  		// BAP consolidate into one "get all 3 types of descendents" function, use both places. @@ -491,7 +488,6 @@ void LLAppearanceManager::updateCOFFromCategory(const LLUUID& category, bool app  	}  } -/* static */   void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,  											  LLPointer<LLInventoryCallback> cb)  { @@ -535,7 +531,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID  		}  	}  } -/* static */ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit_links) +void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit_links)  {  	LLInventoryModel::cat_array_t cats;  	LLInventoryModel::item_array_t items; @@ -552,7 +548,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID  // Keep the last N wearables of each type.  For viewer 2.0, N is 1 for  // both body parts and clothing items. -/* static */ void LLAppearanceManager::filterWearableItems( +void LLAppearanceManager::filterWearableItems(  	LLInventoryModel::item_array_t& items, S32 max_per_type)  {  	// Divvy items into arrays by wearable type. @@ -583,8 +579,8 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID  }  // Create links to all listed items. -/* static */ void LLAppearanceManager::linkAll(const LLUUID& category, -											   LLInventoryModel::item_array_t& items, +void LLAppearanceManager::linkAll(const LLUUID& category, +								  LLInventoryModel::item_array_t& items,  											   LLPointer<LLInventoryCallback> cb)  {  	for (S32 i=0; i<items.count(); i++) @@ -599,7 +595,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID  	}  } -/* static */ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) +void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)  {  	const LLUUID cof = getCOF(); @@ -660,14 +656,12 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID  } -/* static */   bool LLAppearanceManager::isMandatoryWearableType(EWearableType type)  {  	return (type==WT_SHAPE) || (type==WT_SKIN) || (type== WT_HAIR) || (type==WT_EYES);  }  // For mandatory body parts. -/* static */   void LLAppearanceManager::checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found)  {  	LLInventoryModel::cat_array_t new_cats; @@ -693,7 +687,6 @@ void LLAppearanceManager::checkMandatoryWearableTypes(const LLUUID& category, st  // with contents of new category.  This means preserving any mandatory  // body parts that aren't present in the new category, and getting rid  // of everything else. -/* static */   void LLAppearanceManager::purgeCOFBeforeRebuild(const LLUUID& category)  {  	// See which mandatory body types are present in the new category. @@ -726,7 +719,6 @@ void LLAppearanceManager::purgeCOFBeforeRebuild(const LLUUID& category)  }  // Replace COF contents from a given outfit folder. -/* static */   void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category)  {  	lldebugs << "rebuildCOFFromOutfit()" << llendl; @@ -790,11 +782,10 @@ void LLAppearanceManager::onWearableAssetFetch(LLWearable* wearable, void* data)  	holder->mResolved += 1;  	if(holder->mResolved >= (S32)holder->mFoundList.size())  	{ -		LLAppearanceManager::updateAgentWearables(holder, append); +		LLAppearanceManager::instance().updateAgentWearables(holder, append);  	}  } -/* static */  void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)  {  	lldebugs << "updateAgentWearables()" << llendl; @@ -835,7 +826,6 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder,  //	dec_busy_count();  } -/* static */   void LLAppearanceManager::updateAppearanceFromCOF()  {  	dumpCat(getCOF(),"COF, start"); @@ -916,7 +906,6 @@ void LLAppearanceManager::updateAppearanceFromCOF()  	}  } -/* static */   void LLAppearanceManager::getCOFValidDescendents(const LLUUID& category,  												 LLInventoryModel::item_array_t& items)  { @@ -931,7 +920,6 @@ void LLAppearanceManager::getCOFValidDescendents(const LLUUID& category,  									follow_folder_links);  } -/* static */  void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category,  													LLInventoryModel::item_array_t& items,  													LLAssetType::EType type, @@ -947,7 +935,6 @@ void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category,  									follow_folder_links);  } -/* static */   void LLAppearanceManager::getUserDescendents(const LLUUID& category,   											 LLInventoryModel::item_array_t& wear_items,  											 LLInventoryModel::item_array_t& obj_items, @@ -1011,7 +998,6 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b  }  // *NOTE: hack to get from avatar inventory to avatar -/* static */  void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* category, bool append )  {  	// Avoid unintentionally overwriting old wearables.  We have to do @@ -1031,7 +1017,6 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca  	}  } -/* static */  void LLAppearanceManager::wearOutfitByName(const std::string& name)  {  	llinfos << "Wearing category " << name << llendl; @@ -1084,7 +1069,7 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor  	return (a->isWearableType() && b->isWearableType() &&  			(a->getWearableType() == b->getWearableType()));  } -/* static */ +  void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )  {  	LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); @@ -1138,7 +1123,6 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )  	return;  } -/* static */  void LLAppearanceManager::wearEnsemble( LLInventoryCategory* cat, bool do_update )  {  #if SUPPORT_ENSEMBLES @@ -1153,7 +1137,6 @@ void LLAppearanceManager::wearEnsemble( LLInventoryCategory* cat, bool do_update  #endif  } -/* static */  void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update)  {  	LLInventoryModel::cat_array_t cat_array; @@ -1178,7 +1161,6 @@ void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update)  //#define DUMP_CAT_VERBOSE -/* static */  void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg)  {  	LLInventoryModel::cat_array_t cats; @@ -1200,7 +1182,6 @@ void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg)  	llinfos << msg << " count " << items.count() << llendl;  } -/* static */  void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& items,  										const std::string& msg)  { @@ -1213,15 +1194,19 @@ void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& it  	llinfos << llendl;  } +LLAppearanceManager::LLAppearanceManager(): +	mAttachmentInvLinkEnabled(false) +{ +} -std::set<LLUUID> LLAppearanceManager::sRegisteredAttachments; -bool LLAppearanceManager::sAttachmentInvLinkEnabled(false); +LLAppearanceManager::~LLAppearanceManager() +{ +} -/* static */  void LLAppearanceManager::setAttachmentInvLinkEnable(bool val)  {  	llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; -	sAttachmentInvLinkEnabled = val; +	mAttachmentInvLinkEnabled = val;  }  void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) @@ -1241,13 +1226,12 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)         llinfos << llendl;  } -/* static */  void LLAppearanceManager::registerAttachment(const LLUUID& item_id)  { -       sRegisteredAttachments.insert(item_id); -       //dumpAttachmentSet(sRegisteredAttachments,"after register:"); +       mRegisteredAttachments.insert(item_id); +       //dumpAttachmentSet(mRegisteredAttachments,"after register:"); -	   if (sAttachmentInvLinkEnabled) +	   if (mAttachmentInvLinkEnabled)  	   {  		   LLViewerInventoryItem *item = gInventory.getItem(item_id);  		   if (item) @@ -1264,13 +1248,12 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)  	   }  } -/* static */  void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)  { -       sRegisteredAttachments.erase(item_id); -       //dumpAttachmentSet(sRegisteredAttachments,"after unregister:"); +       mRegisteredAttachments.erase(item_id); +       //dumpAttachmentSet(mRegisteredAttachments,"after unregister:"); -	   if (sAttachmentInvLinkEnabled) +	   if (mAttachmentInvLinkEnabled)  	   {  		   //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");  		   LLAppearanceManager::removeItemLinks(item_id, false); @@ -1284,11 +1267,10 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)  	   }  } -/* static */  void LLAppearanceManager::linkRegisteredAttachments()  { -	for (std::set<LLUUID>::iterator it = sRegisteredAttachments.begin(); -		 it != sRegisteredAttachments.end(); +	for (std::set<LLUUID>::iterator it = mRegisteredAttachments.begin(); +		 it != mRegisteredAttachments.end();  		 ++it)  	{  		LLUUID item_id = *it; @@ -1300,5 +1282,5 @@ void LLAppearanceManager::linkRegisteredAttachments()  			gInventory.notifyObservers();  		}  	} -	sRegisteredAttachments.clear(); +	mRegisteredAttachments.clear();  } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 7dea16b6cf..b0ecb2e23e 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -42,66 +42,74 @@ struct LLWearableHoldingPattern;  class LLAppearanceManager: public LLSingleton<LLAppearanceManager>  { +	friend class LLSingleton<LLAppearanceManager>; +	  public: -	static void updateAppearanceFromCOF(); -	static bool needToSaveCOF(); -	static void changeOutfit(bool proceed, const LLUUID& category, bool append); -	static void updateCOF(const LLUUID& category, bool append = false); -	static void updateCOFFromCategory(const LLUUID& category, bool append); -	static void rebuildCOFFromOutfit(const LLUUID& category); -	static void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); -	static void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append); -	static void wearOutfitByName(const std::string& name); -	static void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, +	void updateAppearanceFromCOF(); +	bool needToSaveCOF(); +	void updateCOF(const LLUUID& category, bool append = false); +	void updateCOFFromCategory(const LLUUID& category, bool append); +	void rebuildCOFFromOutfit(const LLUUID& category); +	void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); +	void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append); +	void wearOutfitByName(const std::string& name); +	void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,  									LLPointer<LLInventoryCallback> cb);  	// Add COF link to individual item. -	static void wearItem(LLInventoryItem* item, bool do_update = true); +	void wearItem(LLInventoryItem* item, bool do_update = true);  	// Add COF link to ensemble folder. -	static void wearEnsemble(LLInventoryCategory* item, bool do_update = true); -	static LLUUID getCOF(); +	void wearEnsemble(LLInventoryCategory* item, bool do_update = true); +	LLUUID getCOF();  	// Remove COF entries -	static void removeItemLinks(const LLUUID& item_id, bool do_update = true); +	void removeItemLinks(const LLUUID& item_id, bool do_update = true);  	// For debugging - could be moved elsewhere. -	static void dumpCat(const LLUUID& cat_id, const std::string& msg); -	static void dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg); -	static void unregisterAttachment(const LLUUID& item_id); -	static void registerAttachment(const LLUUID& item_id); -	static void setAttachmentInvLinkEnable(bool val); -	static void linkRegisteredAttachments(); +	void dumpCat(const LLUUID& cat_id, const std::string& msg); +	void dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg); +	void unregisterAttachment(const LLUUID& item_id); +	void registerAttachment(const LLUUID& item_id); +	void setAttachmentInvLinkEnable(bool val); +	void linkRegisteredAttachments(); + +protected: +	LLAppearanceManager(); +	~LLAppearanceManager();  private: -	static void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); -	static void linkAll(const LLUUID& category, + +	void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); +	void linkAll(const LLUUID& category,  						LLInventoryModel::item_array_t& items,  						LLPointer<LLInventoryCallback> cb); -	static void getDescendentsOfAssetType(const LLUUID& category,  +	void getDescendentsOfAssetType(const LLUUID& category,   										  LLInventoryModel::item_array_t& items,  										  LLAssetType::EType type,  										  bool follow_folder_links); -	static void getCOFValidDescendents(const LLUUID& category,  +	void getCOFValidDescendents(const LLUUID& category,   									   LLInventoryModel::item_array_t& items); -	static void getUserDescendents(const LLUUID& category,  +	void getUserDescendents(const LLUUID& category,   								   LLInventoryModel::item_array_t& wear_items,  								   LLInventoryModel::item_array_t& obj_items,  								   LLInventoryModel::item_array_t& gest_items,  								   bool follow_folder_links); -	static void onWearableAssetFetch(LLWearable* wearable, void* data); -	static void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); -	static bool isMandatoryWearableType(EWearableType type); -	static void checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found); -	static void purgeCOFBeforeRebuild(const LLUUID& category); -	static void purgeCategory(const LLUUID& category, bool keep_outfit_links); +	void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); +	bool isMandatoryWearableType(EWearableType type); +	void checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found); +	void purgeCOFBeforeRebuild(const LLUUID& category); +	void purgeCategory(const LLUUID& category, bool keep_outfit_links); -	static std::set<LLUUID> sRegisteredAttachments; -	static bool sAttachmentInvLinkEnabled; +	std::set<LLUUID> mRegisteredAttachments; +	bool mAttachmentInvLinkEnabled; +	// Static callbacks +	static void onWearableAssetFetch(LLWearable* wearable, void* data); +	static void changeOutfit(bool proceed, const LLUUID& category, bool append);  };  #define SUPPORT_ENSEMBLES 0 diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1bc9297bba..caff825859 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1687,7 +1687,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,  				// BAP - should skip if dup.
  				if (move_is_into_current_outfit)
  				{
 -					LLAppearanceManager::wearEnsemble(inv_cat);
 +					LLAppearanceManager::instance().wearEnsemble(inv_cat);
  				}
  				else
  				{
 @@ -2044,7 +2044,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)  				    mContentsCount)
  				{
  					gInventory.removeObserver(this);
 -					LLAppearanceManager::wearInventoryCategory(category, FALSE, TRUE);
 +					LLAppearanceManager::instance().wearInventoryCategory(category, FALSE, TRUE);
  					delete this;
  				}
  			}
 @@ -2089,7 +2089,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model  		if(!model) return;
  		LLViewerInventoryCategory* cat = getCategory();
  		if(!cat) return;
 -		LLAppearanceManager::wearEnsemble(cat,true);
 +		LLAppearanceManager::instance().wearEnsemble(cat,true);
  		return;
  	}
  #endif
 @@ -2730,7 +2730,7 @@ void LLFolderBridge::modifyOutfit(BOOL append)  	// BAP - was:
  	// wear_inventory_category_on_avatar( cat, append );
 -	LLAppearanceManager::wearInventoryCategory( cat, FALSE, append );
 +	LLAppearanceManager::instance().wearInventoryCategory( cat, FALSE, append );
  }
  // helper stuff
 @@ -2953,7 +2953,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,  				// BAP - should skip if dup.
  				if (move_is_into_current_outfit)
  				{
 -					LLAppearanceManager::wearItem(inv_item);
 +					LLAppearanceManager::instance().wearItem(inv_item);
  				}
  				else
  				{
 @@ -4206,7 +4206,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item )  		lldebugs << "wear_inventory_item_on_avatar( " << item->getName()
  				 << " )" << llendl;
 -		LLAppearanceManager::wearItem(item);
 +		LLAppearanceManager::instance().wearItem(item);
  	}
  }
 @@ -4771,7 +4771,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,  	}
  	// Find and remove this item from the COF.
 -	LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::getCOF());
 +	LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::instance().getCOF());
  	llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF.
  	for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
  		 iter != items.end();
 diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index dfd4af5c28..9ee2defc01 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -694,7 +694,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc  {
  	// Don't select objects in COF (e.g. to prevent refocus when items are worn).
  	const LLInventoryObject *obj = gInventory.getObject(obj_id);
 -	if (obj && obj->getParentUUID() == LLAppearanceManager::getCOF())
 +	if (obj && obj->getParentUUID() == LLAppearanceManager::instance().getCOF())
  	{
  		return;
  	}
 diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 64dcd7b97f..84371b75cd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2630,10 +2630,10 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,  	}  	else  	{ -		LLAppearanceManager::wearOutfitByName(outfit_folder_name); +		LLAppearanceManager::instance().wearOutfitByName(outfit_folder_name);  	} -	LLAppearanceManager::wearOutfitByName(gestures); -	LLAppearanceManager::wearOutfitByName(COMMON_GESTURES_FOLDER); +	LLAppearanceManager::instance().wearOutfitByName(gestures); +	LLAppearanceManager::instance().wearOutfitByName(COMMON_GESTURES_FOLDER);  	// This is really misnamed -- it means we have started loading  	// an outfit/shape that will give the avatar a gender eventually. JC diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 959cb3f182..fbd86d0edf 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -2508,7 +2508,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(  		if(drop)  		{  		    BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE ); -			LLAppearanceManager::wearInventoryCategory(category, false, append); +			LLAppearanceManager::instance().wearInventoryCategory(category, false, append);  		}  		return ACCEPT_YES_MULTI;  	} @@ -2516,7 +2516,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(  	{  		if(drop)  		{ -			LLAppearanceManager::wearInventoryCategory(category, true, false); +			LLAppearanceManager::instance().wearInventoryCategory(category, true, false);  		}  		return ACCEPT_YES_MULTI;  	} diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 728fb7c616..4cc1d986bb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6424,13 +6424,13 @@ void handle_selected_texture_info(void*)  void handle_test_male(void*)  { -	LLAppearanceManager::wearOutfitByName("Male Shape & Outfit"); +	LLAppearanceManager::instance().wearOutfitByName("Male Shape & Outfit");  	//gGestureList.requestResetFromServer( TRUE );  }  void handle_test_female(void*)  { -	LLAppearanceManager::wearOutfitByName("Female Shape & Outfit"); +	LLAppearanceManager::instance().wearOutfitByName("Female Shape & Outfit");  	//gGestureList.requestResetFromServer( FALSE );  } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 185274d40d..d57090f808 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1039,7 +1039,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view  	if (attachment->isObjectAttached(viewer_object))  	{  		const LLUUID& attachment_id = viewer_object->getItemID(); -		LLAppearanceManager::registerAttachment(attachment_id); +		LLAppearanceManager::instance().registerAttachment(attachment_id);  	}  	return attachment; @@ -1078,7 +1078,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)  		}  		else  		{ -			LLAppearanceManager::unregisterAttachment(attachment_id); +			LLAppearanceManager::instance().unregisterAttachment(attachment_id);  		}  		return TRUE;  | 
