Merged baking process with v3 head. Hopefully alleviates some baking oddities pertaining innitial login.
This commit is contained in:
@@ -13290,6 +13290,39 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>20.0</real>
|
<real>20.0</real>
|
||||||
</map>
|
</map>
|
||||||
|
<key>TexelPixelRatio</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>texel pixel ratio = texel / pixel</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>1.0</real>
|
||||||
|
</map>
|
||||||
|
<key>TextureCameraMotionThreshold</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>If the overall motion is lower than this value, textures will be loaded faster</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>0.2</real>
|
||||||
|
</map>
|
||||||
|
<key>TextureCameraMotionBoost</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Progressive discard level decrement when the camera is still</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>S32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
</map>
|
||||||
<key>TextureDecodeDisabled</key>
|
<key>TextureDecodeDisabled</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -3344,13 +3344,12 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no cache of this bake. request upload.
|
// no cache of this bake. request upload.
|
||||||
gAgentAvatarp->requestLayerSetUpload(baked_index);
|
gAgentAvatarp->invalidateComposite(gAgentAvatarp->getLayerSet(baked_index),TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "Received cached texture response for " << num_results << " textures." << llendl;
|
llinfos << "Received cached texture response for " << num_results << " textures." << llendl;
|
||||||
gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them");
|
gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them");
|
||||||
|
|
||||||
@@ -3885,7 +3884,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl;
|
LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL;
|
||||||
//dumpAvatarTEs( "sendAgentSetAppearance()" );
|
//dumpAvatarTEs( "sendAgentSetAppearance()" );
|
||||||
|
|
||||||
LLMessageSystem* msg = gMessageSystem;
|
LLMessageSystem* msg = gMessageSystem;
|
||||||
@@ -3943,14 +3942,14 @@ void LLAgent::sendAgentSetAppearance()
|
|||||||
// only update cache entries if we have all our baked textures
|
// only update cache entries if we have all our baked textures
|
||||||
if (textures_current)
|
if (textures_current)
|
||||||
{
|
{
|
||||||
llinfos << "TAT: Sending cached texture data" << llendl;
|
LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL;
|
||||||
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
|
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
|
||||||
{
|
{
|
||||||
BOOL generate_valid_hash = TRUE;
|
BOOL generate_valid_hash = TRUE;
|
||||||
if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLVOAvatarDefines::EBakedTextureIndex)baked_index))
|
if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLVOAvatarDefines::EBakedTextureIndex)baked_index))
|
||||||
{
|
{
|
||||||
generate_valid_hash = FALSE;
|
generate_valid_hash = FALSE;
|
||||||
llinfos << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << llendl;
|
LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash);
|
const LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash);
|
||||||
|
|||||||
@@ -1615,7 +1615,16 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||||||
{
|
{
|
||||||
gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
|
gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
|
||||||
gAgentAvatarp->updateVisualParams();
|
gAgentAvatarp->updateVisualParams();
|
||||||
gAgentAvatarp->invalidateAll();
|
|
||||||
|
// If we have not yet declouded, we may want to use
|
||||||
|
// baked texture UUIDs sent from the first objectUpdate message
|
||||||
|
// don't overwrite these. If we have already declouded, we've saved
|
||||||
|
// these ids as the last known good textures and can invalidate without
|
||||||
|
// re-clouding.
|
||||||
|
if (!gAgentAvatarp->getIsCloud())
|
||||||
|
{
|
||||||
|
gAgentAvatarp->invalidateAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start rendering & update the server
|
// Start rendering & update the server
|
||||||
@@ -1816,7 +1825,8 @@ void LLAgentWearables::queryWearableCache()
|
|||||||
{
|
{
|
||||||
gAgentAvatarp->outputRezTiming("Fetching textures from cache");
|
gAgentAvatarp->outputRezTiming("Fetching textures from cache");
|
||||||
}
|
}
|
||||||
llinfos << "Requesting texture cache entry for " << num_queries << " baked textures" << llendl;
|
|
||||||
|
LL_INFOS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL;
|
||||||
gMessageSystem->sendReliable(gAgent.getRegion()->getHost());
|
gMessageSystem->sendReliable(gAgent.getRegion()->getHost());
|
||||||
gAgentQueryManager.mNumPendingQueries++;
|
gAgentQueryManager.mNumPendingQueries++;
|
||||||
gAgentQueryManager.mWearablesCacheQueryID++;
|
gAgentQueryManager.mWearablesCacheQueryID++;
|
||||||
@@ -2345,6 +2355,11 @@ boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(
|
|||||||
}
|
}
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
|
|
||||||
|
bool LLAgentWearables::changeInProgress() const
|
||||||
|
{
|
||||||
|
return mCOFChangeInProgress;
|
||||||
|
}
|
||||||
|
|
||||||
void LLAgentWearables::notifyLoadingStarted()
|
void LLAgentWearables::notifyLoadingStarted()
|
||||||
{
|
{
|
||||||
mCOFChangeInProgress = true;
|
mCOFChangeInProgress = true;
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ public:
|
|||||||
boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb);
|
boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb);
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
|
|
||||||
|
bool changeInProgress() const;
|
||||||
void notifyLoadingStarted();
|
void notifyLoadingStarted();
|
||||||
void notifyLoadingFinished();
|
void notifyLoadingFinished();
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,11 @@
|
|||||||
#include "rlvlocks.h"
|
#include "rlvlocks.h"
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
|
std::string self_av_string()
|
||||||
|
{
|
||||||
|
return gAgentAvatarp->avString();
|
||||||
|
}
|
||||||
|
|
||||||
// RAII thingy to guarantee that a variable gets reset when the Setter
|
// RAII thingy to guarantee that a variable gets reset when the Setter
|
||||||
// goes out of scope. More general utility would be handy - TODO:
|
// goes out of scope. More general utility would be handy - TODO:
|
||||||
// check boost.
|
// check boost.
|
||||||
@@ -160,6 +165,8 @@ public:
|
|||||||
{
|
{
|
||||||
mCatID = cat_id;
|
mCatID = cat_id;
|
||||||
mAppend = append;
|
mAppend = append;
|
||||||
|
|
||||||
|
LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
|
||||||
}
|
}
|
||||||
void fire(const LLUUID& item_id)
|
void fire(const LLUUID& item_id)
|
||||||
{
|
{
|
||||||
@@ -171,12 +178,13 @@ public:
|
|||||||
* after the last item has fired the event and dereferenced it -- if all
|
* after the last item has fired the event and dereferenced it -- if all
|
||||||
* the events actually fire!
|
* the events actually fire!
|
||||||
*/
|
*/
|
||||||
|
LL_DEBUGS("Avatar") << self_av_string() << " fired on copied item, id " << item_id << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~LLWearInventoryCategoryCallback()
|
~LLWearInventoryCategoryCallback()
|
||||||
{
|
{
|
||||||
llinfos << "done all inventory callbacks" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL;
|
||||||
|
|
||||||
// Is the destructor called by ordinary dereference, or because the app's shutting down?
|
// 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 the inventory callback manager goes away, we're shutting down, no longer want the callback.
|
||||||
@@ -186,7 +194,7 @@ protected:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llwarns << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl;
|
llwarns << self_av_string() << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,6 +228,7 @@ LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit
|
|||||||
|
|
||||||
LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
|
LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
|
||||||
{
|
{
|
||||||
|
LL_INFOS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL;
|
||||||
llinfos << "done update appearance on destroy" << llendl;
|
llinfos << "done update appearance on destroy" << llendl;
|
||||||
|
|
||||||
if (!LLApp::isExiting())
|
if (!LLApp::isExiting())
|
||||||
@@ -233,7 +242,7 @@ void LLUpdateAppearanceOnDestroy::fire(const LLUUID& inv_item)
|
|||||||
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(inv_item);
|
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(inv_item);
|
||||||
const std::string item_name = item ? item->getName() : "ITEM NOT FOUND";
|
const std::string item_name = item ? item->getName() : "ITEM NOT FOUND";
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
mFireCount++;
|
mFireCount++;
|
||||||
}
|
}
|
||||||
@@ -399,7 +408,8 @@ void LLWearableHoldingPattern::checkMissingWearables()
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway why don't we actually skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0);
|
std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0);
|
||||||
@@ -417,7 +427,7 @@ void LLWearableHoldingPattern::checkMissingWearables()
|
|||||||
{
|
{
|
||||||
if (requested_by_type[type] > found_by_type[type])
|
if (requested_by_type[type] > found_by_type[type])
|
||||||
{
|
{
|
||||||
llwarns << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << llendl;
|
llwarns << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << llendl;
|
||||||
}
|
}
|
||||||
if (found_by_type[type] > 0)
|
if (found_by_type[type] > 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -434,7 +444,7 @@ void LLWearableHoldingPattern::checkMissingWearables()
|
|||||||
mTypesToRecover.insert(type);
|
mTypesToRecover.insert(type);
|
||||||
mTypesToLink.insert(type);
|
mTypesToLink.insert(type);
|
||||||
recoverMissingWearable((LLWearableType::EType)type);
|
recoverMissingWearable((LLWearableType::EType)type);
|
||||||
llwarns << "need to replace " << type << llendl;
|
llwarns << self_av_string() << "need to replace " << type << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,13 +464,14 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||||||
|
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway need to skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activate all gestures in this folder
|
// Activate all gestures in this folder
|
||||||
if (mGestItems.count() > 0)
|
if (mGestItems.count() > 0)
|
||||||
{
|
{
|
||||||
llinfos << "Activating " << mGestItems.count() << " gestures" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.count() << " gestures" << LL_ENDL;
|
||||||
|
|
||||||
LLGestureMgr::instance().activateGestures(mGestItems);
|
LLGestureMgr::instance().activateGestures(mGestItems);
|
||||||
|
|
||||||
@@ -477,7 +488,7 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update wearables.
|
// Update wearables.
|
||||||
llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
|
||||||
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-3.0.0a) | Added: Catznip-2.1.2a
|
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-3.0.0a) | Added: Catznip-2.1.2a
|
||||||
@@ -504,7 +515,8 @@ void LLWearableHoldingPattern::onFetchCompletion()
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkMissingWearables();
|
checkMissingWearables();
|
||||||
@@ -515,7 +527,8 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
@@ -530,14 +543,14 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
|
|||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
{
|
{
|
||||||
llinfos << "polling, done status: " << completed << " timed out " << timed_out
|
LL_INFOS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out
|
||||||
<< " elapsed " << mWaitTime.getElapsedTimeF32() << llendl;
|
<< " elapsed " << mWaitTime.getElapsedTimeF32() << LL_ENDL;
|
||||||
|
|
||||||
mFired = true;
|
mFired = true;
|
||||||
|
|
||||||
if (timed_out)
|
if (timed_out)
|
||||||
{
|
{
|
||||||
llwarns << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl;
|
llwarns << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
onFetchCompletion();
|
onFetchCompletion();
|
||||||
@@ -585,12 +598,12 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llwarns << "inventory item not found for recovered wearable" << llendl;
|
llwarns << self_av_string() << "inventory item not found for recovered wearable" << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llwarns << "inventory link not found for recovered wearable" << llendl;
|
llwarns << self_av_string() << "inventory link not found for recovered wearable" << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
@@ -612,7 +625,8 @@ public:
|
|||||||
{
|
{
|
||||||
if (!mHolder->isMostRecent())
|
if (!mHolder->isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
@@ -620,7 +634,7 @@ public:
|
|||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "Recovered item for type " << mType << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << mType << LL_ENDL;
|
||||||
LLViewerInventoryItem *itemp = gInventory.getItem(item_id);
|
LLViewerInventoryItem *itemp = gInventory.getItem(item_id);
|
||||||
mWearable->setItemID(item_id);
|
mWearable->setItemID(item_id);
|
||||||
LLPointer<LLInventoryCallback> cb = new RecoveredItemLinkCB(mType,mWearable,mHolder);
|
LLPointer<LLInventoryCallback> cb = new RecoveredItemLinkCB(mType,mWearable,mHolder);
|
||||||
@@ -647,7 +661,8 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to recover by replacing missing wearable with a new one.
|
// Try to recover by replacing missing wearable with a new one.
|
||||||
@@ -686,7 +701,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
|
|||||||
if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
|
if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
|
||||||
{
|
{
|
||||||
// Wearable link that was never resolved; remove links to it from COF
|
// Wearable link that was never resolved; remove links to it from COF
|
||||||
llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
|
||||||
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false);
|
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -709,7 +724,8 @@ bool LLWearableHoldingPattern::pollMissingWearables()
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
// runway skip here?
|
||||||
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
@@ -724,11 +740,11 @@ bool LLWearableHoldingPattern::pollMissingWearables()
|
|||||||
|
|
||||||
if (!done)
|
if (!done)
|
||||||
{
|
{
|
||||||
llinfos << "polling missing wearables, waiting for items " << mTypesToRecover.size()
|
LL_INFOS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size()
|
||||||
<< " links " << mTypesToLink.size()
|
<< " links " << mTypesToLink.size()
|
||||||
<< " wearables, timed out " << timed_out
|
<< " wearables, timed out " << timed_out
|
||||||
<< " elapsed " << mWaitTime.getElapsedTimeF32()
|
<< " elapsed " << mWaitTime.getElapsedTimeF32()
|
||||||
<< " done " << done << llendl;
|
<< " done " << done << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
@@ -762,14 +778,14 @@ void LLWearableHoldingPattern::handleLateArrivals()
|
|||||||
}
|
}
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "Late arrivals not handled - outfit change no longer valid" << llendl;
|
llwarns << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << llendl;
|
||||||
}
|
}
|
||||||
if (!mIsAllComplete)
|
if (!mIsAllComplete)
|
||||||
{
|
{
|
||||||
llwarns << "Late arrivals not handled - in middle of missing wearables processing" << llendl;
|
llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL;
|
||||||
|
|
||||||
// Update mFoundList using late-arriving wearables.
|
// Update mFoundList using late-arriving wearables.
|
||||||
std::set<LLWearableType::EType> replaced_types;
|
std::set<LLWearableType::EType> replaced_types;
|
||||||
@@ -845,19 +861,19 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable)
|
|||||||
{
|
{
|
||||||
if (!isMostRecent())
|
if (!isMostRecent())
|
||||||
{
|
{
|
||||||
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
mResolved += 1; // just counting callbacks, not successes.
|
mResolved += 1; // just counting callbacks, not successes.
|
||||||
llinfos << "resolved " << mResolved << "/" << getFoundList().size() << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << LL_ENDL;
|
||||||
if (!wearable)
|
if (!wearable)
|
||||||
{
|
{
|
||||||
llwarns << "no wearable found" << llendl;
|
llwarns << self_av_string() << "no wearable found" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mFired)
|
if (mFired)
|
||||||
{
|
{
|
||||||
llwarns << "called after holder fired" << llendl;
|
llwarns << self_av_string() << "called after holder fired" << llendl;
|
||||||
if (wearable)
|
if (wearable)
|
||||||
{
|
{
|
||||||
mLateArrivals.insert(wearable);
|
mLateArrivals.insert(wearable);
|
||||||
@@ -883,7 +899,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable)
|
|||||||
// Failing this means inventory or asset server are corrupted in a way we don't handle.
|
// Failing this means inventory or asset server are corrupted in a way we don't handle.
|
||||||
if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType))
|
if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType))
|
||||||
{
|
{
|
||||||
llwarns << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl;
|
llwarns << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1554,7 +1570,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
|
|||||||
const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid);
|
const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid);
|
||||||
const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND";
|
const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND";
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1685,7 +1701,7 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||||||
removeDuplicateItems(gest_items);
|
removeDuplicateItems(gest_items);
|
||||||
|
|
||||||
// Create links to new COF contents.
|
// Create links to new COF contents.
|
||||||
llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "creating LLUpdateAppearanceOnDestroy" << LL_ENDL;
|
||||||
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append);
|
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append);
|
||||||
|
|
||||||
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
||||||
@@ -1696,24 +1712,24 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||||||
bool keep_outfit_links = append;
|
bool keep_outfit_links = append;
|
||||||
purgeCategory(cof, keep_outfit_links);
|
purgeCategory(cof, keep_outfit_links);
|
||||||
gInventory.notifyObservers();
|
gInventory.notifyObservers();
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "Linking body items" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Linking body items" << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
linkAll(cof, body_items, link_waiter);
|
linkAll(cof, body_items, link_waiter);
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "Linking wear items" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Linking wear items" << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
linkAll(cof, wear_items, link_waiter);
|
linkAll(cof, wear_items, link_waiter);
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "Linking obj items" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Linking obj items" << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
linkAll(cof, obj_items, link_waiter);
|
linkAll(cof, obj_items, link_waiter);
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||||
llinfos << "Linking gesture items" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Linking gesture items" << LL_ENDL;
|
||||||
#endif
|
#endif
|
||||||
linkAll(cof, gest_items, link_waiter);
|
linkAll(cof, gest_items, link_waiter);
|
||||||
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
||||||
}
|
}
|
||||||
@@ -1741,7 +1757,7 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||||||
// createBaseOutfitLink(category, link_waiter);
|
// createBaseOutfitLink(category, link_waiter);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "waiting for LLUpdateAppearanceOnDestroy" << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
|
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
|
||||||
@@ -1954,7 +1970,7 @@ void LLAppearanceMgr::enforceItemRestrictions()
|
|||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
LLViewerInventoryItem *item = *it;
|
LLViewerInventoryItem *item = *it;
|
||||||
llinfos << "purging duplicate or excess item " << item->getName() << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "purging duplicate or excess item " << item->getName() << LL_ENDL;
|
||||||
gInventory.purgeObject(item->getUUID());
|
gInventory.purgeObject(item->getUUID());
|
||||||
}
|
}
|
||||||
gInventory.notifyObservers();
|
gInventory.notifyObservers();
|
||||||
@@ -1971,7 +1987,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
|
|||||||
|
|
||||||
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
|
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
|
||||||
|
|
||||||
llinfos << "starting" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
|
||||||
|
|
||||||
//checking integrity of the COF in terms of ordering of wearables,
|
//checking integrity of the COF in terms of ordering of wearables,
|
||||||
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
|
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
|
||||||
@@ -2125,7 +2141,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
|
|||||||
{
|
{
|
||||||
LLFoundData& found = *it;
|
LLFoundData& found = *it;
|
||||||
|
|
||||||
lldebugs << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl;
|
lldebugs << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl;
|
||||||
|
|
||||||
// Fetch the wearables about to be worn.
|
// Fetch the wearables about to be worn.
|
||||||
LLWearableList::instance().getAsset(found.mAssetID,
|
LLWearableList::instance().getAsset(found.mAssetID,
|
||||||
@@ -2214,8 +2230,8 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
|
|||||||
|
|
||||||
gAgentWearables.notifyLoadingStarted();
|
gAgentWearables.notifyLoadingStarted();
|
||||||
|
|
||||||
llinfos << "wearInventoryCategory( " << category->getName()
|
LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName()
|
||||||
<< " )" << llendl;
|
<< " )" << LL_ENDL;
|
||||||
|
|
||||||
callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
|
callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
|
||||||
&LLAppearanceMgr::instance(),
|
&LLAppearanceMgr::instance(),
|
||||||
@@ -2224,7 +2240,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
|
|||||||
|
|
||||||
void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)
|
void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)
|
||||||
{
|
{
|
||||||
llinfos << "starting" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
|
||||||
|
|
||||||
// We now have an outfit ready to be copied to agent inventory. Do
|
// We now have an outfit ready to be copied to agent inventory. Do
|
||||||
// it, and wear that outfit normally.
|
// it, and wear that outfit normally.
|
||||||
@@ -2307,8 +2323,8 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
|
|||||||
// wearables being dirty.
|
// wearables being dirty.
|
||||||
if(!category) return;
|
if(!category) return;
|
||||||
|
|
||||||
llinfos << "wearInventoryCategoryOnAvatar( " << category->getName()
|
LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar '" << category->getName()
|
||||||
<< " )" << llendl;
|
<< "'" << LL_ENDL;
|
||||||
|
|
||||||
if (gAgentCamera.cameraCustomizeAvatar())
|
if (gAgentCamera.cameraCustomizeAvatar())
|
||||||
{
|
{
|
||||||
@@ -2321,7 +2337,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
|
|||||||
|
|
||||||
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
|
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
|
||||||
{
|
{
|
||||||
llinfos << "Wearing category " << name << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
|
||||||
//inc_busy_count();
|
//inc_busy_count();
|
||||||
|
|
||||||
LLInventoryModel::cat_array_t cat_array;
|
LLInventoryModel::cat_array_t cat_array;
|
||||||
@@ -2651,7 +2667,7 @@ const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
|
|||||||
|
|
||||||
void LLAppearanceMgr::copyLibraryGestures()
|
void LLAppearanceMgr::copyLibraryGestures()
|
||||||
{
|
{
|
||||||
llinfos << "Copying library gestures" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL;
|
||||||
|
|
||||||
// Copy gestures
|
// Copy gestures
|
||||||
LLUUID lib_gesture_cat_id =
|
LLUUID lib_gesture_cat_id =
|
||||||
@@ -2707,11 +2723,11 @@ void LLAppearanceMgr::copyLibraryGestures()
|
|||||||
LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
|
LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
|
||||||
if (cat_id.isNull())
|
if (cat_id.isNull())
|
||||||
{
|
{
|
||||||
llwarns << "failed to find gesture folder for " << folder_name << llendl;
|
llwarns << self_av_string() << "failed to find gesture folder for " << folder_name << llendl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << LL_ENDL;
|
||||||
callAfterCategoryFetch(cat_id,
|
callAfterCategoryFetch(cat_id,
|
||||||
boost::bind(&LLAppearanceMgr::shallowCopyCategory,
|
boost::bind(&LLAppearanceMgr::shallowCopyCategory,
|
||||||
&LLAppearanceMgr::instance(),
|
&LLAppearanceMgr::instance(),
|
||||||
@@ -2725,7 +2741,7 @@ void LLAppearanceMgr::autopopulateOutfits()
|
|||||||
// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account)
|
// 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.
|
// then auto-populate outfits from the library into the My Outfits folder.
|
||||||
|
|
||||||
llinfos << "avatar fully visible" << llendl;
|
LL_INFOS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL;
|
||||||
|
|
||||||
static bool check_populate_my_outfits = true;
|
static bool check_populate_my_outfits = true;
|
||||||
if (check_populate_my_outfits &&
|
if (check_populate_my_outfits &&
|
||||||
@@ -3454,9 +3470,8 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
|
|||||||
{
|
{
|
||||||
asset_id = linked_item->getAssetUUID();
|
asset_id = linked_item->getAssetUUID();
|
||||||
}
|
}
|
||||||
llinfos << msg << " " << i <<" " << (item ? item->getName() : "(nullitem)") << " " << asset_id.asString() << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << msg << " " << i <<" " << (item ? item->getName() : "(nullitem)") << " " << asset_id.asString() << LL_ENDL;
|
||||||
}
|
}
|
||||||
llinfos << llendl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAppearanceMgr::LLAppearanceMgr():
|
LLAppearanceMgr::LLAppearanceMgr():
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ using namespace LLVOAvatarDefines;
|
|||||||
static const S32 BAKE_UPLOAD_ATTEMPTS = 7;
|
static const S32 BAKE_UPLOAD_ATTEMPTS = 7;
|
||||||
static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt
|
static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt
|
||||||
|
|
||||||
|
// runway consolidate
|
||||||
|
extern std::string self_av_string();
|
||||||
|
|
||||||
class LLTexLayerInfo
|
class LLTexLayerInfo
|
||||||
{
|
{
|
||||||
friend class LLTexLayer;
|
friend class LLTexLayer;
|
||||||
@@ -495,7 +498,7 @@ void LLTexLayerSetBuffer::doUpload()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C;
|
LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C;
|
||||||
compressedImage->setRate(0.f);
|
//compressedImage->setRate(0.f);
|
||||||
const char* comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // writes into baked_color_data. 5 channels (rgb, heightfield/alpha, mask)
|
const char* comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // writes into baked_color_data. 5 channels (rgb, heightfield/alpha, mask)
|
||||||
if (compressedImage->encode(baked_image, comment_text))
|
if (compressedImage->encode(baked_image, comment_text))
|
||||||
{
|
{
|
||||||
@@ -578,7 +581,7 @@ void LLTexLayerSetBuffer::doUpload()
|
|||||||
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
|
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
|
||||||
args["RESOLUTION"] = lod_str;
|
args["RESOLUTION"] = lod_str;
|
||||||
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUploadNotification",args);
|
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUploadNotification",args);
|
||||||
llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -632,7 +635,7 @@ void LLTexLayerSetBuffer::doUpdate()
|
|||||||
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
|
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
|
||||||
args["RESOLUTION"] = lod_str;
|
args["RESOLUTION"] = lod_str;
|
||||||
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUpdateNotification",args);
|
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUpdateNotification",args);
|
||||||
llinfos << "Locally updating [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUpdateTimer.getElapsedTimeF32() << " ]" << llendl;
|
LL_DEBUGS("Avatar") << self_av_string() << "Locally updating [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUpdateTimer.getElapsedTimeF32() << " ]" << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
#include "lldynamictexture.h"
|
#include "lldynamictexture.h"
|
||||||
#include "llvoavatardefines.h"
|
#include "llvoavatardefines.h"
|
||||||
#include "lltexlayerparams.h"
|
#include "lltexlayerparams.h"
|
||||||
#include "lllocaltextureobject.h"
|
|
||||||
|
|
||||||
class LLVOAvatar;
|
class LLVOAvatar;
|
||||||
class LLVOAvatarSelf;
|
class LLVOAvatarSelf;
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public:
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class LLViewerJointMesh : public LLViewerJoint
|
class LLViewerJointMesh : public LLViewerJoint
|
||||||
{
|
{
|
||||||
|
friend class LLVOAvatar;
|
||||||
protected:
|
protected:
|
||||||
LLColor4 mColor; // color value
|
LLColor4 mColor; // color value
|
||||||
// LLColor4 mSpecular; // specular color (always white for now)
|
// LLColor4 mSpecular; // specular color (always white for now)
|
||||||
|
|||||||
@@ -1044,6 +1044,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||||||
mNeedsSkin(FALSE),
|
mNeedsSkin(FALSE),
|
||||||
mLastSkinTime(0.f),
|
mLastSkinTime(0.f),
|
||||||
mUpdatePeriod(1),
|
mUpdatePeriod(1),
|
||||||
|
mFirstFullyVisible(TRUE),
|
||||||
mFullyLoaded(FALSE),
|
mFullyLoaded(FALSE),
|
||||||
mPreviousFullyLoaded(FALSE),
|
mPreviousFullyLoaded(FALSE),
|
||||||
mFullyLoadedInitialized(FALSE),
|
mFullyLoadedInitialized(FALSE),
|
||||||
@@ -1051,6 +1052,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||||||
mLoadedCallbacksPaused(FALSE),
|
mLoadedCallbacksPaused(FALSE),
|
||||||
mHasPelvisOffset( FALSE ),
|
mHasPelvisOffset( FALSE ),
|
||||||
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")),
|
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")),
|
||||||
|
mLastRezzedStatus(-1),
|
||||||
mFirstSetActualBoobGravRan( false ),
|
mFirstSetActualBoobGravRan( false ),
|
||||||
mSupportsPhysics( false ),
|
mSupportsPhysics( false ),
|
||||||
// <edit>
|
// <edit>
|
||||||
@@ -1137,33 +1139,45 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||||||
mLastPelvisFixup = 0.0f;
|
mLastPelvisFixup = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
std::string LLVOAvatar::avString() const
|
||||||
// LLVOAvatar::~LLVOAvatar()
|
{
|
||||||
//------------------------------------------------------------------------
|
std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
|
||||||
|
return " Avatar '" + getFullname() + "' " + viz_string + " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment)
|
||||||
|
{
|
||||||
|
LL_INFOS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
|
||||||
|
<< "sec ]"
|
||||||
|
<< avString()
|
||||||
|
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
|
||||||
|
<< " Notification " << notification_name
|
||||||
|
<< " : " << comment
|
||||||
|
<< llendl;
|
||||||
|
|
||||||
|
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
||||||
|
{
|
||||||
|
LLSD args;
|
||||||
|
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
||||||
|
args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
|
||||||
|
args["NAME"] = getFullname();
|
||||||
|
LLNotificationsUtil::add(notification_name,args);
|
||||||
|
}
|
||||||
|
}
|
||||||
LLVOAvatar::~LLVOAvatar()
|
LLVOAvatar::~LLVOAvatar()
|
||||||
{
|
{
|
||||||
//App teardown is a mess. Avatar destruction can be unpredictable due to all potential refs to the smartptr.
|
//App teardown is a mess. Avatar destruction can be unpredictable due to all potential refs to the smartptr.
|
||||||
//Cannot guarantee that LLNotificationUtil will be usable during shutdown chain.
|
//Cannot guarantee that LLNotificationUtil will be usable during shutdown chain.
|
||||||
if (!LLApp::isQuitting() && gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
if (!LLApp::isQuitting())
|
||||||
{
|
{
|
||||||
if (!mFullyLoaded)
|
if (!mFullyLoaded)
|
||||||
{
|
{
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left after " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds as cloud." << llendl;
|
debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud");
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezLeftCloudNotification",args);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left." << llendl;
|
debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezLeftNotification",args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
|
lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
|
||||||
|
|
||||||
@@ -1248,6 +1262,55 @@ BOOL LLVOAvatar::isFullyBaked()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL LLVOAvatar::isFullyTextured() const
|
||||||
|
{
|
||||||
|
for (U32 i = 0; i < (U32)mMeshLOD.size(); i++)
|
||||||
|
{
|
||||||
|
LLViewerJoint* joint = (LLViewerJoint*) mMeshLOD[i];
|
||||||
|
if (i==MESH_ID_SKIRT && !isWearingWearableType(LLWearableType::WT_SKIRT))
|
||||||
|
{
|
||||||
|
continue; // don't care about skirt textures if we're not wearing one.
|
||||||
|
}
|
||||||
|
if (!joint)
|
||||||
|
{
|
||||||
|
continue; // nonexistent LOD OK.
|
||||||
|
}
|
||||||
|
std::vector<LLViewerJointMesh*>::iterator meshIter = joint->mMeshParts.begin();
|
||||||
|
if (meshIter != joint->mMeshParts.end())
|
||||||
|
{
|
||||||
|
LLViewerJointMesh *mesh = (LLViewerJointMesh *) *meshIter;
|
||||||
|
if (!mesh)
|
||||||
|
{
|
||||||
|
continue; // nonexistent mesh OK
|
||||||
|
}
|
||||||
|
if (mesh->mTexture.notNull() && mesh->mTexture->hasGLTexture())
|
||||||
|
{
|
||||||
|
continue; // Mesh exists and has a baked texture.
|
||||||
|
}
|
||||||
|
if (mesh->mLayerSet && mesh->mLayerSet->hasComposite())
|
||||||
|
{
|
||||||
|
continue; // Mesh exists and has a composite texture.
|
||||||
|
}
|
||||||
|
// Fail
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL LLVOAvatar::hasGray() const
|
||||||
|
{
|
||||||
|
return !getIsCloud() && !isFullyTextured();
|
||||||
|
}
|
||||||
|
|
||||||
|
S32 LLVOAvatar::getRezzedStatus() const
|
||||||
|
{
|
||||||
|
if (getIsCloud()) return 0;
|
||||||
|
if (isFullyTextured()) return 2;
|
||||||
|
llassert(hasGray());
|
||||||
|
return 1; // gray
|
||||||
|
}
|
||||||
|
|
||||||
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
|
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
|
||||||
{
|
{
|
||||||
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
|
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
|
||||||
@@ -1294,6 +1357,31 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
|
||||||
|
{
|
||||||
|
counts.clear();
|
||||||
|
counts.resize(3);
|
||||||
|
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||||
|
iter != LLCharacter::sInstances.end(); ++iter)
|
||||||
|
{
|
||||||
|
LLVOAvatar* inst = (LLVOAvatar*) *iter;
|
||||||
|
if (!inst)
|
||||||
|
continue;
|
||||||
|
S32 rez_status = inst->getRezzedStatus();
|
||||||
|
counts[rez_status]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
std::string LLVOAvatar::rezStatusToString(S32 rez_status)
|
||||||
|
{
|
||||||
|
if (rez_status==0) return "cloud";
|
||||||
|
if (rez_status==1) return "gray";
|
||||||
|
if (rez_status==2) return "textured";
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLVOAvatar::getMeshInfo (mesh_info_t* mesh_info)
|
void LLVOAvatar::getMeshInfo (mesh_info_t* mesh_info)
|
||||||
{
|
{
|
||||||
@@ -2669,18 +2757,12 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||||||
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
|
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
|
||||||
|
|
||||||
// Print out arrival information once we have name of avatar.
|
// Print out arrival information once we have name of avatar.
|
||||||
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
if (has_name && getNVPair("FirstName"))
|
||||||
{
|
{
|
||||||
if (has_name && getNVPair("FirstName"))
|
mDebugExistenceTimer.reset();
|
||||||
{
|
debugAvatarRezTime("AvatarRezArrivedNotification","avatar arrived");
|
||||||
mDebugExistenceTimer.reset();
|
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezArrivedNotification",args);
|
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' arrived." << llendl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(retval & LLViewerObject::INVALID_UPDATE)
|
if(retval & LLViewerObject::INVALID_UPDATE)
|
||||||
{
|
{
|
||||||
if(isSelf())
|
if(isSelf())
|
||||||
@@ -3258,16 +3340,16 @@ void LLVOAvatar::idleUpdateLoadingEffect()
|
|||||||
// update visibility when avatar is partially loaded
|
// update visibility when avatar is partially loaded
|
||||||
if (updateIsFullyLoaded()) // changed?
|
if (updateIsFullyLoaded()) // changed?
|
||||||
{
|
{
|
||||||
if (isFullyLoaded() && isSelf())
|
if (isFullyLoaded() && mFirstFullyVisible && isSelf())
|
||||||
{
|
{
|
||||||
static bool first_fully_visible = true;
|
LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
|
||||||
if (first_fully_visible)
|
mFirstFullyVisible = FALSE;
|
||||||
{
|
LLAppearanceMgr::instance().onFirstFullyVisible();
|
||||||
llinfos << "self isFullyLoaded, first_fully_visible" << llendl;
|
}
|
||||||
|
if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
|
||||||
first_fully_visible = false;
|
{
|
||||||
LLAppearanceMgr::instance().onFirstFullyVisible();
|
LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
|
||||||
}
|
mFirstFullyVisible = FALSE;
|
||||||
}
|
}
|
||||||
if (isFullyLoaded())
|
if (isFullyLoaded())
|
||||||
{
|
{
|
||||||
@@ -3576,26 +3658,15 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
|||||||
bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
|
bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
|
||||||
bool is_cloud = getIsCloud();
|
bool is_cloud = getIsCloud();
|
||||||
|
|
||||||
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
if (is_appearance != mNameAppearance)
|
||||||
{
|
{
|
||||||
if (is_appearance != mNameAppearance)
|
if (is_appearance)
|
||||||
{
|
{
|
||||||
if (is_appearance)
|
debugAvatarRezTime("AvatarRezEnteredAppearanceNotification","entered appearance mode");
|
||||||
{
|
}
|
||||||
LLSD args;
|
else
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
{
|
||||||
args["NAME"] = getFullname();
|
debugAvatarRezTime("AvatarRezLeftAppearanceNotification","left appearance mode");
|
||||||
LLNotificationsUtil::add("AvatarRezEnteredAppearanceNotification",args);
|
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' entered appearance mode." << llendl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezLeftAppearanceNotification",args);
|
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left appearance mode." << llendl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4617,7 +4688,7 @@ void LLVOAvatar::updateVisibility()
|
|||||||
LLNameValue* firstname = getNVPair("FirstName");
|
LLNameValue* firstname = getNVPair("FirstName");
|
||||||
if (firstname)
|
if (firstname)
|
||||||
{
|
{
|
||||||
llinfos << "Avatar " << firstname->getString() << " updating visiblity" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " updating visibility" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4789,7 +4860,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
|
|||||||
LLNameValue* firstname = getNVPair("FirstName");
|
LLNameValue* firstname = getNVPair("FirstName");
|
||||||
if (firstname)
|
if (firstname)
|
||||||
{
|
{
|
||||||
llinfos << "Avatar " << firstname->getString() << " in render" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " in render" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -7366,10 +7437,10 @@ BOOL LLVOAvatar::isVisible() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Determine if we have enough avatar data to render
|
// Determine if we have enough avatar data to render
|
||||||
BOOL LLVOAvatar::getIsCloud()
|
BOOL LLVOAvatar::getIsCloud() const
|
||||||
{
|
{
|
||||||
// Do we have a shape?
|
// Do we have a shape?
|
||||||
if (visualParamWeightsAreDefault())
|
if ((const_cast<LLVOAvatar*>(this))->visualParamWeightsAreDefault())
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -7388,11 +7459,53 @@ BOOL LLVOAvatar::getIsCloud()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLVOAvatar::updateRezzedStatusTimers()
|
||||||
|
{
|
||||||
|
// State machine for rezzed status. Statuses are 0 = cloud, 1 = gray, 2 = textured.
|
||||||
|
// Purpose is to collect time data for each period of cloud or cloud+gray.
|
||||||
|
S32 rez_status = getRezzedStatus();
|
||||||
|
if (rez_status != mLastRezzedStatus)
|
||||||
|
{
|
||||||
|
LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL;
|
||||||
|
/*bool is_cloud_or_gray = (rez_status==0 || rez_status==1);
|
||||||
|
bool was_cloud_or_gray = (mLastRezzedStatus==0 || mLastRezzedStatus==1);
|
||||||
|
bool is_cloud = (rez_status==0);
|
||||||
|
bool was_cloud = (mLastRezzedStatus==0);
|
||||||
|
|
||||||
|
]// Non-cloud to cloud
|
||||||
|
if (is_cloud && !was_cloud)
|
||||||
|
{
|
||||||
|
// start cloud timer.
|
||||||
|
getPhases().startPhase("cloud");
|
||||||
|
}
|
||||||
|
else if (was_cloud && !is_cloud)
|
||||||
|
{
|
||||||
|
// stop cloud timer, which will capture stats.
|
||||||
|
getPhases().stopPhase("cloud");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Non-cloud-or-gray to cloud-or-gray
|
||||||
|
if (is_cloud_or_gray && !was_cloud_or_gray)
|
||||||
|
{
|
||||||
|
// start cloud-or-gray timer.
|
||||||
|
getPhases().startPhase("cloud-or-gray");
|
||||||
|
}
|
||||||
|
else if (was_cloud_or_gray && !is_cloud_or_gray)
|
||||||
|
{
|
||||||
|
// stop cloud-or-gray timer, which will capture stats.
|
||||||
|
getPhases().stopPhase("cloud-or-gray");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
mLastRezzedStatus = rez_status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// call periodically to keep isFullyLoaded up to date.
|
// call periodically to keep isFullyLoaded up to date.
|
||||||
// returns true if the value has changed.
|
// returns true if the value has changed.
|
||||||
BOOL LLVOAvatar::updateIsFullyLoaded()
|
BOOL LLVOAvatar::updateIsFullyLoaded()
|
||||||
{
|
{
|
||||||
const BOOL loading = getIsCloud();
|
const BOOL loading = getIsCloud();
|
||||||
|
updateRezzedStatusTimers();
|
||||||
updateRuthTimer(loading);
|
updateRuthTimer(loading);
|
||||||
return processFullyLoadedChange(loading);
|
return processFullyLoadedChange(loading);
|
||||||
}
|
}
|
||||||
@@ -7407,27 +7520,19 @@ void LLVOAvatar::updateRuthTimer(bool loading)
|
|||||||
if (mPreviousFullyLoaded)
|
if (mPreviousFullyLoaded)
|
||||||
{
|
{
|
||||||
mRuthTimer.reset();
|
mRuthTimer.reset();
|
||||||
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
debugAvatarRezTime("AvatarRezCloudNotification","became cloud");
|
||||||
{
|
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' became cloud." << llendl;
|
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezCloudNotification",args);
|
|
||||||
}
|
|
||||||
mRuthDebugTimer.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const F32 LOADING_TIMEOUT__SECONDS = 120.f;
|
const F32 LOADING_TIMEOUT__SECONDS = 120.f;
|
||||||
if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
|
if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
|
||||||
{
|
{
|
||||||
llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
|
LL_DEBUGS("Avatar") << avString()
|
||||||
|
<< "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
|
||||||
<< "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
|
<< "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
|
||||||
<< "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
|
<< "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
|
||||||
<< "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
|
<< "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
|
||||||
<< "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
|
<< "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
|
||||||
<< llendl;
|
<< LL_ENDL;
|
||||||
|
|
||||||
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
|
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
|
||||||
mRuthTimer.reset();
|
mRuthTimer.reset();
|
||||||
@@ -7444,20 +7549,13 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
|
|||||||
|
|
||||||
mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE);
|
mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE);
|
||||||
|
|
||||||
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
|
||||||
{
|
{
|
||||||
if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
|
debugAvatarRezTime("AvatarRezNotification","fully loaded");
|
||||||
{
|
|
||||||
llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' resolved in " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl;
|
|
||||||
LLSD args;
|
|
||||||
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
|
|
||||||
args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
|
|
||||||
args["NAME"] = getFullname();
|
|
||||||
LLNotificationsUtil::add("AvatarRezNotification",args);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// did our loading state "change" from last call?
|
// did our loading state "change" from last call?
|
||||||
|
// runway - why are we updating every 30 calls even if nothing has changed?
|
||||||
const S32 UPDATE_RATE = 30;
|
const S32 UPDATE_RATE = 30;
|
||||||
BOOL changed =
|
BOOL changed =
|
||||||
((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call
|
((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call
|
||||||
@@ -7909,8 +8007,8 @@ LLColor4 LLVOAvatar::getDummyColor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
||||||
{
|
{
|
||||||
llinfos << (isSelf() ? "Self: " : "Other: ") << context << llendl;
|
LL_DEBUGS("Avatar") << avString() << (isSelf() ? "Self: " : "Other: ") << context << LL_ENDL;
|
||||||
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
|
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
|
||||||
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
|
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
|
||||||
++iter)
|
++iter)
|
||||||
@@ -7920,27 +8018,27 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
|||||||
const LLViewerTexture* te_image = getImage(iter->first,0);
|
const LLViewerTexture* te_image = getImage(iter->first,0);
|
||||||
if( !te_image )
|
if( !te_image )
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": null ptr" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": null ptr" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else if( te_image->getID().isNull() )
|
else if( te_image->getID().isNull() )
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": null UUID" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": null UUID" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else if( te_image->getID() == IMG_DEFAULT )
|
else if( te_image->getID() == IMG_DEFAULT )
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": IMG_DEFAULT" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": IMG_DEFAULT" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else if (te_image->getID() == IMG_INVISIBLE)
|
else if (te_image->getID() == IMG_INVISIBLE)
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": IMG_INVISIBLE" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": IMG_INVISIBLE" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else if( te_image->getID() == IMG_DEFAULT_AVATAR )
|
else if( te_image->getID() == IMG_DEFAULT_AVATAR )
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": IMG_DEFAULT_AVATAR" << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": IMG_DEFAULT_AVATAR" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llinfos << " " << texture_dict->mName << ": " << te_image->getID() << llendl;
|
LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": " << te_image->getID() << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8071,6 +8169,7 @@ void LLVOAvatar::rebuildHUD()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void LLVOAvatar::onFirstTEMessageReceived()
|
void LLVOAvatar::onFirstTEMessageReceived()
|
||||||
{
|
{
|
||||||
|
LL_INFOS("Avatar") << avString() << LL_ENDL;
|
||||||
if( !mFirstTEMessageReceived )
|
if( !mFirstTEMessageReceived )
|
||||||
{
|
{
|
||||||
mFirstTEMessageReceived = TRUE;
|
mFirstTEMessageReceived = TRUE;
|
||||||
@@ -8099,6 +8198,7 @@ void LLVOAvatar::onFirstTEMessageReceived()
|
|||||||
image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ),
|
image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ),
|
||||||
src_callback_list, paused);
|
src_callback_list, paused);
|
||||||
}
|
}
|
||||||
|
LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL;
|
||||||
image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ),
|
image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ),
|
||||||
src_callback_list, paused );
|
src_callback_list, paused );
|
||||||
}
|
}
|
||||||
@@ -8157,14 +8257,16 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
|||||||
|
|
||||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||||
|
|
||||||
// llinfos << "processAvatarAppearance start " << mID << llendl;
|
|
||||||
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
|
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
|
||||||
|
|
||||||
mFirstAppearanceMessageReceived = TRUE;
|
mFirstAppearanceMessageReceived = TRUE;
|
||||||
|
|
||||||
|
LL_INFOS("Avatar") << avString() << "processAvatarAppearance start " << mID
|
||||||
|
<< " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL;
|
||||||
|
|
||||||
|
|
||||||
if( isSelf() )
|
if( isSelf() )
|
||||||
{
|
{
|
||||||
llwarns << "Received AvatarAppearance for self" << llendl;
|
llwarns << avString() << "Received AvatarAppearance for self" << llendl;
|
||||||
if( mFirstTEMessageReceived )
|
if( mFirstTEMessageReceived )
|
||||||
{
|
{
|
||||||
// llinfos << "processAvatarAppearance end " << mID << llendl;
|
// llinfos << "processAvatarAppearance end " << mID << llendl;
|
||||||
@@ -8229,6 +8331,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
|||||||
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
|
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
|
||||||
if( num_blocks > 1 )
|
if( num_blocks > 1 )
|
||||||
{
|
{
|
||||||
|
LL_DEBUGS("Avatar") << avString() << " handle visual params, num_blocks " << num_blocks << LL_ENDL;
|
||||||
BOOL params_changed = FALSE;
|
BOOL params_changed = FALSE;
|
||||||
BOOL interp_params = FALSE;
|
BOOL interp_params = FALSE;
|
||||||
|
|
||||||
@@ -8476,6 +8579,11 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu
|
|||||||
{
|
{
|
||||||
LLUUID *avatar_idp = (LLUUID *)userdata;
|
LLUUID *avatar_idp = (LLUUID *)userdata;
|
||||||
LLVOAvatar *selfp = gObjectList.findAvatar(*avatar_idp);
|
LLVOAvatar *selfp = gObjectList.findAvatar(*avatar_idp);
|
||||||
|
|
||||||
|
if (selfp)
|
||||||
|
{
|
||||||
|
LL_DEBUGS("Avatar") << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << LL_ENDL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!success && selfp)
|
if (!success && selfp)
|
||||||
{
|
{
|
||||||
@@ -8487,13 +8595,20 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLVOAvatar::onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
|
// Static
|
||||||
|
void LLVOAvatar::onBakedTextureLoaded(BOOL success,
|
||||||
|
LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src,
|
||||||
|
S32 discard_level, BOOL final, void* userdata)
|
||||||
{
|
{
|
||||||
//llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl;
|
//llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl;
|
||||||
|
|
||||||
LLUUID id = src_vi->getID();
|
LLUUID id = src_vi->getID();
|
||||||
LLUUID *avatar_idp = (LLUUID *)userdata;
|
LLUUID *avatar_idp = (LLUUID *)userdata;
|
||||||
LLVOAvatar *selfp = gObjectList.findAvatar(*avatar_idp);
|
LLVOAvatar *selfp = gObjectList.findAvatar(*avatar_idp);
|
||||||
|
if (selfp)
|
||||||
|
{
|
||||||
|
LL_DEBUGS("Avatar") << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << " id " << src_vi->getID() << LL_ENDL;
|
||||||
|
}
|
||||||
|
|
||||||
if (selfp && !success)
|
if (selfp && !success)
|
||||||
{
|
{
|
||||||
@@ -8525,6 +8640,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
|
|||||||
LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex, 0 );
|
LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex, 0 );
|
||||||
if (id == image_baked->getID())
|
if (id == image_baked->getID())
|
||||||
{
|
{
|
||||||
|
LL_DEBUGS("Avatar") << avString() << " i " << i << " id " << id << LL_ENDL;
|
||||||
mBakedTextureDatas[i].mIsLoaded = true;
|
mBakedTextureDatas[i].mIsLoaded = true;
|
||||||
mBakedTextureDatas[i].mLastTextureIndex = id;
|
mBakedTextureDatas[i].mLastTextureIndex = id;
|
||||||
mBakedTextureDatas[i].mIsUsed = true;
|
mBakedTextureDatas[i].mIsUsed = true;
|
||||||
@@ -8608,6 +8724,11 @@ void LLVOAvatar::dumpArchetypeXML( void* )
|
|||||||
}
|
}
|
||||||
apr_file_printf( file, "\t</archetype>\n" );
|
apr_file_printf( file, "\t</archetype>\n" );
|
||||||
apr_file_printf( file, "\n</linden_genepool>\n" );
|
apr_file_printf( file, "\n</linden_genepool>\n" );
|
||||||
|
//explictly close the file if it is still open which it should be
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
outfile.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -9492,7 +9613,9 @@ void LLVOAvatar::idleUpdateRenderCost()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setDebugText(llformat("%d", cost));
|
|
||||||
|
std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
|
||||||
|
setDebugText(llformat("%s %d", viz_string.c_str(), cost));
|
||||||
mVisualComplexity = cost;
|
mVisualComplexity = cost;
|
||||||
F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
|
F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
|
||||||
F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f);
|
F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f);
|
||||||
|
|||||||
@@ -326,14 +326,21 @@ public:
|
|||||||
public:
|
public:
|
||||||
BOOL isFullyLoaded() const;
|
BOOL isFullyLoaded() const;
|
||||||
bool visualParamWeightsAreDefault();
|
bool visualParamWeightsAreDefault();
|
||||||
|
virtual BOOL getIsCloud() const;
|
||||||
|
BOOL isFullyTextured() const;
|
||||||
|
BOOL hasGray() const;
|
||||||
|
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = fully textured.
|
||||||
|
void updateRezzedStatusTimers();
|
||||||
|
|
||||||
|
S32 mLastRezzedStatus;
|
||||||
protected:
|
protected:
|
||||||
virtual BOOL getIsCloud();
|
|
||||||
BOOL updateIsFullyLoaded();
|
BOOL updateIsFullyLoaded();
|
||||||
BOOL processFullyLoadedChange(bool loading);
|
BOOL processFullyLoadedChange(bool loading);
|
||||||
|
|
||||||
void updateRuthTimer(bool loading);
|
void updateRuthTimer(bool loading);
|
||||||
F32 calcMorphAmount();
|
F32 calcMorphAmount();
|
||||||
private:
|
private:
|
||||||
|
BOOL mFirstFullyVisible;
|
||||||
BOOL mFullyLoaded;
|
BOOL mFullyLoaded;
|
||||||
BOOL mPreviousFullyLoaded;
|
BOOL mPreviousFullyLoaded;
|
||||||
BOOL mFullyLoadedInitialized;
|
BOOL mFullyLoadedInitialized;
|
||||||
@@ -567,9 +574,10 @@ public:
|
|||||||
virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
|
virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
|
||||||
virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
|
virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
|
||||||
|
|
||||||
protected:
|
|
||||||
BOOL isFullyBaked();
|
BOOL isFullyBaked();
|
||||||
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
|
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
|
||||||
|
static void getNearbyRezzedStats(std::vector<S32>& counts);
|
||||||
|
static std::string rezStatusToString(S32 status);
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Baked textures
|
// Baked textures
|
||||||
@@ -600,9 +608,6 @@ protected:
|
|||||||
bakedtexturedata_vec_t mBakedTextureDatas;
|
bakedtexturedata_vec_t mBakedTextureDatas;
|
||||||
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
|
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
|
||||||
BOOL mLoadedCallbacksPaused;
|
BOOL mLoadedCallbacksPaused;
|
||||||
|
|
||||||
public:
|
|
||||||
const BakedTextureData& getBakedTextureData(LLVOAvatarDefines::ETextureIndex idx) const {return mBakedTextureDatas[idx];}
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Local Textures
|
// Local Textures
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
@@ -980,6 +985,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
std::string getFullname() const; // Returns "FirstName LastName"
|
std::string getFullname() const; // Returns "FirstName LastName"
|
||||||
|
std::string avString() const; // Frequently used string in log messages "Avatar '<full name'"
|
||||||
protected:
|
protected:
|
||||||
static void getAnimLabels(LLDynamicArray<std::string>* labels);
|
static void getAnimLabels(LLDynamicArray<std::string>* labels);
|
||||||
static void getAnimNames(LLDynamicArray<std::string>* names);
|
static void getAnimNames(LLDynamicArray<std::string>* names);
|
||||||
@@ -1078,11 +1084,14 @@ private:
|
|||||||
F32 mAdjustedPixelArea;
|
F32 mAdjustedPixelArea;
|
||||||
std::string mDebugText;
|
std::string mDebugText;
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Avatar Rez Metrics
|
// Avatar Rez Metrics
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
public:
|
public:
|
||||||
|
void debugAvatarRezTime(std::string notification_name, std::string comment = "");
|
||||||
F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); }
|
F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
|
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
|
||||||
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
|
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
|
||||||
|
|||||||
@@ -136,7 +136,8 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
|
|||||||
LLVOAvatar(id, pcode, regionp),
|
LLVOAvatar(id, pcode, regionp),
|
||||||
mScreenp(NULL),
|
mScreenp(NULL),
|
||||||
mLastRegionHandle(0),
|
mLastRegionHandle(0),
|
||||||
mRegionCrossingCount(0)
|
mRegionCrossingCount(0),
|
||||||
|
mInitialBakesLoaded(false)
|
||||||
{
|
{
|
||||||
gAgentWearables.setAvatarObject(this);
|
gAgentWearables.setAvatarObject(this);
|
||||||
gAgentCamera.setAvatarObject(this);
|
gAgentCamera.setAvatarObject(this);
|
||||||
@@ -172,6 +173,7 @@ void LLVOAvatarSelf::initInstance()
|
|||||||
{
|
{
|
||||||
mDebugBakedTextureTimes[i][0] = -1.0f;
|
mDebugBakedTextureTimes[i][0] = -1.0f;
|
||||||
mDebugBakedTextureTimes[i][1] = -1.0f;
|
mDebugBakedTextureTimes[i][1] = -1.0f;
|
||||||
|
mInitialBakeIDs[i] = LLUUID::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2010-12-12 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
// [RLVa:KB] - Checked: 2010-12-12 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||||
@@ -710,6 +712,40 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//virtual
|
||||||
|
U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys,
|
||||||
|
void **user_data,
|
||||||
|
U32 block_num,
|
||||||
|
const EObjectUpdateType update_type,
|
||||||
|
LLDataPacker *dp)
|
||||||
|
{
|
||||||
|
U32 retval = LLVOAvatar::processUpdateMessage(mesgsys,user_data,block_num,update_type,dp);
|
||||||
|
|
||||||
|
if (mInitialBakesLoaded == false && retval == 0x0)
|
||||||
|
{
|
||||||
|
// call update textures to force the images to be created
|
||||||
|
updateMeshTextures();
|
||||||
|
|
||||||
|
// unpack the texture UUIDs to the texture slots
|
||||||
|
retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
|
||||||
|
|
||||||
|
// need to trigger a few operations to get the avatar to use the new bakes
|
||||||
|
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
|
||||||
|
{
|
||||||
|
const LLVOAvatarDefines::ETextureIndex te = mBakedTextureDatas[i].mTextureIndex;
|
||||||
|
LLUUID texture_id = getTEImage(te)->getID();
|
||||||
|
setNewBakedTexture(te, texture_id);
|
||||||
|
mInitialBakeIDs[i] = texture_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
onFirstTEMessageReceived();
|
||||||
|
|
||||||
|
mInitialBakesLoaded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index)
|
void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index)
|
||||||
{
|
{
|
||||||
if (te >= TEX_NUM_INDICES)
|
if (te >= TEX_NUM_INDICES)
|
||||||
@@ -1908,7 +1944,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()
|
|||||||
llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl;
|
llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL LLVOAvatarSelf::getIsCloud()
|
BOOL LLVOAvatarSelf::getIsCloud() const
|
||||||
{
|
{
|
||||||
// do we have our body parts?
|
// do we have our body parts?
|
||||||
if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 ||
|
if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 ||
|
||||||
@@ -2369,6 +2405,18 @@ void LLVOAvatarSelf::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid
|
|||||||
{
|
{
|
||||||
if ( mBakedTextureDatas[i].mTextureIndex == te && mBakedTextureDatas[i].mTexLayerSet)
|
if ( mBakedTextureDatas[i].mTextureIndex == te && mBakedTextureDatas[i].mTexLayerSet)
|
||||||
{
|
{
|
||||||
|
if (mInitialBakeIDs[i] != LLUUID::null)
|
||||||
|
{
|
||||||
|
if (mInitialBakeIDs[i] == uuid)
|
||||||
|
{
|
||||||
|
llinfos << "baked texture correctly loaded at login! " << i << llendl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
llwarns << "baked texture does not match id loaded at login!" << i << llendl;
|
||||||
|
}
|
||||||
|
mInitialBakeIDs[i] = LLUUID::null;
|
||||||
|
}
|
||||||
mBakedTextureDatas[i].mTexLayerSet->cancelUpload();
|
mBakedTextureDatas[i].mTexLayerSet->cancelUpload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2496,6 +2544,20 @@ LLTexLayerSet* LLVOAvatarSelf::getLayerSet(ETextureIndex index) const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLTexLayerSet* LLVOAvatarSelf::getLayerSet(EBakedTextureIndex baked_index) const
|
||||||
|
{
|
||||||
|
/* switch(index)
|
||||||
|
case TEX_HEAD_BAKED:
|
||||||
|
case TEX_HEAD_BODYPAINT:
|
||||||
|
return mHeadLayerSet; */
|
||||||
|
if (baked_index >= 0 && baked_index < BAKED_NUM_INDICES)
|
||||||
|
{
|
||||||
|
return mBakedTextureDatas[baked_index].mTexLayerSet;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLVOAvatarSelf::onCustomizeStart()
|
void LLVOAvatarSelf::onCustomizeStart()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,15 +93,27 @@ public:
|
|||||||
/*virtual*/ void updateVisualParams();
|
/*virtual*/ void updateVisualParams();
|
||||||
/*virtual*/ void idleUpdateAppearanceAnimation();
|
/*virtual*/ void idleUpdateAppearanceAnimation();
|
||||||
|
|
||||||
|
/*virtual*/ U32 processUpdateMessage(LLMessageSystem *mesgsys,
|
||||||
|
void **user_data,
|
||||||
|
U32 block_num,
|
||||||
|
const EObjectUpdateType update_type,
|
||||||
|
LLDataPacker *dp);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// helper function. Passed in param is assumed to be in avatar's parameter list.
|
// helper function. Passed in param is assumed to be in avatar's parameter list.
|
||||||
BOOL setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL upload_bake = FALSE );
|
BOOL setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL upload_bake = FALSE );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Initialization
|
/** Initialization
|
||||||
** **
|
** **
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
private:
|
||||||
|
LLUUID mInitialBakeIDs[6];
|
||||||
|
bool mInitialBakesLoaded;
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
** **
|
** **
|
||||||
** STATE
|
** STATE
|
||||||
@@ -121,7 +133,7 @@ public:
|
|||||||
// Loading state
|
// Loading state
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
public:
|
public:
|
||||||
/*virtual*/ BOOL getIsCloud();
|
/*virtual*/ BOOL getIsCloud() const;
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Region state
|
// Region state
|
||||||
@@ -229,6 +241,7 @@ public:
|
|||||||
void requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i);
|
void requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i);
|
||||||
void requestLayerSetUpdate(LLVOAvatarDefines::ETextureIndex i);
|
void requestLayerSetUpdate(LLVOAvatarDefines::ETextureIndex i);
|
||||||
LLTexLayerSet* getLayerSet(LLVOAvatarDefines::ETextureIndex index) const;
|
LLTexLayerSet* getLayerSet(LLVOAvatarDefines::ETextureIndex index) const;
|
||||||
|
LLTexLayerSet* getLayerSet(LLVOAvatarDefines::EBakedTextureIndex baked_index) const;
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Composites
|
// Composites
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ BOOL LLWearable::isDirty() const
|
|||||||
|
|
||||||
if( a != b )
|
if( a != b )
|
||||||
{
|
{
|
||||||
llwarns << "param ID " << param->getID() << " was changed." << llendl;
|
//llwarns << "param ID " << param->getID() << " was changed." << llendl;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user