diff options
-rw-r--r-- | indra/newview/llagentwearables.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 39 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.h | 3 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 11 |
5 files changed, 55 insertions, 13 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index def6e60abd..68ee9cd612 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2152,6 +2152,8 @@ void LLAgentWearables::updateServer() void LLAgentWearables::populateMyOutfitsFolder(void) { + llinfos << "starting outfit populate" << llendl; + LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); // Get the complete information on the items in the inventory and diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 018e9a92a0..eb4a47664b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -113,6 +113,8 @@ public: protected: ~LLWearInventoryCategoryCallback() { + llinfos << "done all inventory callbacks" << llendl; + // Is the destructor called by ordinary dereference, or because the app's shutting down? // If the inventory callback manager goes away, we're shutting down, no longer want the callback. if( LLInventoryCallbackManager::is_instantiated() ) @@ -150,12 +152,15 @@ protected: void LLOutfitObserver::done() { + llinfos << "done 2nd stage fetch" << llendl; gInventory.removeObserver(this); doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this)); } void LLOutfitObserver::doWearCategory() { + llinfos << "starting" << llendl; + // We now have an outfit ready to be copied to agent inventory. Do // it, and wear that outfit normally. if(mCopyItems) @@ -244,6 +249,8 @@ void LLOutfitFetch::done() // What we do here is get the complete information on the items in // the library, and set up an observer that will wait for that to // happen. + llinfos << "done first stage fetch" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(mCompleteFolders.front(), @@ -304,6 +311,8 @@ public: virtual ~LLUpdateAppearanceOnDestroy() { + llinfos << "done update appearance on destroy" << llendl; + if (!LLApp::isExiting()) { LLAppearanceManager::instance().updateAppearanceFromCOF(); @@ -312,6 +321,7 @@ public: /* virtual */ void fire(const LLUUID& inv_item) { + llinfos << "callback fired" << llendl; mFireCount++; } private: @@ -708,6 +718,8 @@ void LLAppearanceManager::linkAll(const LLUUID& category, void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { + llinfos << "starting" << llendl; + const LLUUID cof = getCOF(); // Deactivate currently active gestures in the COF, if replacing outfit @@ -765,6 +777,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) gInventory.notifyObservers(); // Create links to new COF contents. + llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; linkAll(cof, body_items, link_waiter); @@ -777,6 +790,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { createBaseOutfitLink(category, link_waiter); } + llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl; } void LLAppearanceManager::updatePanelOutfitName(const std::string& name) @@ -848,6 +862,8 @@ void LLAppearanceManager::updateAppearanceFromCOF() { // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link + llinfos << "starting" << llendl; + updateIsDirty(); dumpCat(getCOF(),"COF, start"); @@ -978,8 +994,9 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b { if(!category) return; - lldebugs << "wearInventoryCategory( " << category->getName() + llinfos << "wearInventoryCategory( " << category->getName() << " )" << llendl; + // What we do here is get the complete information on the items in // the inventory, and set up an observer that will wait for that to // happen. @@ -1008,7 +1025,8 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca // this up front to avoid having to deal with the case of multiple // wearables being dirty. if(!category) return; - lldebugs << "wearInventoryCategoryOnAvatar( " << category->getName() + + llinfos << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; if( gFloaterCustomize ) @@ -1285,6 +1303,23 @@ void LLAppearanceManager::updateIsDirty() } } +void LLAppearanceManager::onFirstFullyVisible() +{ + // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) + // then auto-populate outfits from the library into the My Outfits folder. + + llinfos << "avatar fully visible" << llendl; + + static bool check_populate_my_outfits = true; + if (check_populate_my_outfits && + (LLInventoryModel::getIsFirstTimeInViewer2() + || gSavedSettings.getBOOL("MyOutfitsAutofill"))) + { + gAgentWearables.populateMyOutfitsFolder(); + } + check_populate_my_outfits = false; +} + //#define DUMP_CAT_VERBOSE void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5fdff45735..28b51ee0f6 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -113,6 +113,9 @@ public: // should only be necessary to do on initial login. void updateIsDirty(); + // Called when self avatar is first fully visible. + void onFirstFullyVisible(); + protected: LLAppearanceManager(); ~LLAppearanceManager(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d1b91df6e9..af96629547 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1891,17 +1891,6 @@ bool idle_startup() } } - // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) - // then auto-populate outfits from the library into the My Outfits folder. - static bool check_populate_my_outfits = true; - if (check_populate_my_outfits && - (LLInventoryModel::getIsFirstTimeInViewer2() - || gSavedSettings.getBOOL("MyOutfitsAutofill"))) - { - gAgentWearables.populateMyOutfitsFolder(); - } - check_populate_my_outfits = false; - return TRUE; } @@ -2544,6 +2533,8 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { + llinfos << "starting" << llendl; + // Not going through the processAgentInitialWearables path, so need to set this here. LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); // Initiate creation of COF, since we're also bypassing that. diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 698b6be98b..7a6a48d1b3 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2538,6 +2538,17 @@ void LLVOAvatar::idleUpdateLoadingEffect() // update visibility when avatar is partially loaded if (updateIsFullyLoaded()) // changed? { + if (isFullyLoaded() && isSelf()) + { + llinfos << "self isFullyLoaded" << llendl; + + static bool first_fully_visible = true; + if (first_fully_visible) + { + first_fully_visible = false; + LLAppearanceManager::instance().onFirstFullyVisible(); + } + } if (isFullyLoaded()) { deleteParticleSource(); |