Update 3 of SSB + RLVa

Tank_Master 2013-03-05 18:57:27 -08:00
commit 63adc57b38
34 changed files with 557 additions and 190 deletions

View File

@ -1,2 +1,2 @@
42a8488a18e787a7e801671a4a522d2383484ddd
bc935b340692666dc2e1dc528f125832ac1095a3
d2202f2501db50084ca884bcb97a03c7b1c2ec4e
f501c2356b74bc8c5a48bdf42621a2d4f5bea808

View File

@ -1 +1 @@
033229d48fcb4b8e62f23369b3cbb7821905c691
336854c58a54210c0b5046e4dd8af49acc1a9159

View File

@ -1 +1 @@
033229d48fcb4b8e62f23369b3cbb7821905c691
336854c58a54210c0b5046e4dd8af49acc1a9159

View File

@ -1 +1 @@
c074ad77128f42a50c2e5606ba69b67c9252c7fc
9ea58fa9198ff25fa7ff9446a1bbe52b01076f16

View File

@ -1 +1 @@
87a6fc812214b9f4c52fdf6337c202e084e3af91
230637f9ff30c055fed20e05cbcfb2420cdecef0

View File

@ -1334,9 +1334,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>e0dbab27a77d6a864658da4526d7a9c8</string>
<string>088a1c30e499289e94bc1738fd3d6a25</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/270227/arch/Linux/installer/llappearanceutility_source-0.1-linux-20130211.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/270564/arch/Linux/installer/llappearanceutility_source-0.1-linux-20130219.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>

View File

@ -462,6 +462,13 @@ void LLAvatarAppearance::computeBodySize()
LLVector3 foot = mFootLeftp->getPosition();
F32 old_offset = mAvatarOffset.mV[VZ];
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
mAvatarOffset.mV[VZ] = getAvatarOffset();
// [/RLVa:KB]
// mAvatarOffset.mV[VZ] = getVisualParamWeight(11001);
mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] -
knee.mV[VZ] * hip_scale.mV[VZ] -
ankle.mV[VZ] * knee_scale.mV[VZ] -
@ -481,13 +488,23 @@ void LLAvatarAppearance::computeBodySize()
new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
if (new_body_size != mBodySize)
mAvatarOffset.mV[VX] = 0.0f;
mAvatarOffset.mV[VY] = 0.0f;
if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ])
{
mBodySize = new_body_size;
bodySizeChanged();
}
}
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
F32 LLAvatarAppearance::getAvatarOffset() /*const*/
{
return getVisualParamWeight(11001);
}
// [/RLVa:KB]
//-----------------------------------------------------------------------------
// parseSkeletonFile()
//-----------------------------------------------------------------------------

View File

@ -145,6 +145,9 @@ protected:
virtual void buildCharacter();
virtual BOOL loadAvatar();
virtual void bodySizeChanged() = 0;
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
virtual F32 getAvatarOffset() /*const*/;
// [/RLVa:KB]
BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &current_volume_num, S32 &current_joint_num);
BOOL allocateCharacterJoints(U32 num);
@ -160,6 +163,7 @@ protected:
//--------------------------------------------------------------------
public:
LLVector3 mBodySize;
LLVector3 mAvatarOffset;
protected:
F32 mPelvisToFoot;

View File

@ -455,7 +455,7 @@ BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer,
}
while (input_stream.good() && buffer[0]=='\0');
return input_stream.good();
return (buffer[0] != '\0');
}

View File

@ -1267,7 +1267,7 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name
mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER);
}
tec.face_count = getNumTEs();
tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES);
U8 *cur_ptr = tec.packed_buffer;
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_data, 16, tec.face_count, MVT_LLUUID);

View File

@ -3750,6 +3750,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>DebugForceAppearanceRequestFailure</key>
<map>
<key>Comment</key>
<string>Request wrong cof version to test the failure path for server appearance update requests.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DebugHideEmptySystemFolders</key>
<map>
<key>Comment</key>
@ -9608,7 +9619,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<integer>1</integer>
<key>Backup</key>
<integer>0</integer>
</map>

View File

@ -1095,6 +1095,23 @@
scale="0 0 .5" />
</param_skeleton>
</param>
<param
id="11001"
group="0"
name="Hover"
wearable="shape"
edit_group="shape_body"
edit_group_order="4"
label_min="Lower"
label_max="Higher"
value_min="-2"
value_max="2"
value_default="0"
camera_distance="2.5">
<param_skeleton />
</param>
</skeleton>
<mesh

View File

@ -2663,7 +2663,7 @@ void LLAgent::setStartPosition( U32 location_id )
if (isAgentAvatarValid())
{
// the z height is at the agent's feet
agent_pos.mV[VZ] -= 0.5f * gAgentAvatarp->mBodySize.mV[VZ];
agent_pos.mV[VZ] -= 0.5f * (gAgentAvatarp->mBodySize.mV[VZ] + gAgentAvatarp->mAvatarOffset.mV[VZ]);
}
agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET );
@ -4818,10 +4818,6 @@ void LLAgent::requestLeaveGodMode()
sendReliableMessage();
}
extern void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
extern std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
// For debugging, trace agent state at times appearance message are sent out.
void LLAgent::dumpSentAppearance(const std::string& dump_prefix)
{
@ -4914,11 +4910,7 @@ void LLAgent::sendAgentSetAppearance()
// NOTE -- when we start correcting all of the other Havok geometry
// to compensate for the COLLISION_TOLERANCE ugliness we will have
// to tweak this number again
// const LLVector3 body_size = gAgentAvatarp->mBodySize;
// [RLVa:KB] - Checked: 2010-10-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
LLVector3 body_size = gAgentAvatarp->mBodySize;
body_size.mV[VZ] += RlvSettings::getAvatarOffsetZ();
// [/RLVa:KB]
const LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset;
msg->addVector3Fast(_PREHASH_Size, body_size);
// To guard against out of order packets

View File

@ -50,6 +50,7 @@
#include "llviewerregion.h"
#include "llwearablelist.h"
#include "llsdutil.h"
#include "llsdserialize.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvhelper.h"
@ -218,7 +219,7 @@ public:
void addItem(const LLUUID& item_id)
{
LL_DEBUGS("Avatar") << "item_id " << item_id << llendl;
if (!requestOperation(item_id))
{
LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << llendl;
@ -1785,7 +1786,7 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
gInventory.purgeObject(item->getUUID());
}
#else
gInventory.purgeObject(item->getUUID());
gInventory.purgeObject(item->getUUID());
}
#endif
}
@ -2055,8 +2056,6 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
removeDuplicateItems(gest_items);
// Create links to new COF contents.
LL_DEBUGS("Avatar") << self_av_string() << "creating LLCallAfterInventoryLinkMgr" << LL_ENDL;
LLInventoryModel::item_array_t all_items;
all_items += body_items;
all_items += wear_items;
@ -2071,26 +2070,22 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
// [/SL:KB]
// Will link all the above items.
bool update_base_outfit_ordering = !append;
LLCallAfterInventoryLinkMgr *link_waiter =
// new LLCallAfterInventoryLinkMgr(all_items,cof,"update_appearance_on_destroy",
// [SL:KB]
new LLCallAfterInventoryLinkMgr(items_add,cof,"update_appearance_on_destroy",
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
// [SL:KB] - Checked: 2013-03-05 (RLVa-1.4.8)
linkAll(cof, items_add, link_waiter);
// [/SL:KB]
boost::bind(&LLAppearanceMgr::updateAppearanceFromCOF,
LLAppearanceMgr::getInstance(),
update_base_outfit_ordering));
// linkAll(cof,all_items,link_waiter);
// Add link to outfit if category is an outfit.
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if ( (!append) && (idOutfit.notNull()) )
{
link_waiter->addItem(idOutfit);
createBaseOutfitLink(idOutfit, link_waiter);
}
// [/SL:KB]
// if (!append)
// {
// link_waiter->addItem(category);
// createBaseOutfitLink(category, link_waiter);
// }
//
// Remove current COF contents. Have to do this after creating
@ -3503,7 +3498,7 @@ class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder
public:
RequestAgentUpdateAppearanceResponder()
{
mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5);
mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10);
}
virtual ~RequestAgentUpdateAppearanceResponder()
@ -3517,6 +3512,10 @@ public:
if (content["success"].asBoolean())
{
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_ok", content);
}
}
else
{
@ -3527,8 +3526,13 @@ public:
// Error
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << llendl;
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl;
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content);
debugCOF(content);
}
onFailure(status);
}
@ -3547,11 +3551,109 @@ public:
{
llwarns << "giving up after too many retries" << llendl;
}
}
void dumpContents(const std::string outprefix, const LLSD& content)
{
std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
std::ofstream ofs(fullpath.c_str(), std::ios_base::out);
ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY);
LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL;
}
void debugCOF(const LLSD& content)
{
LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl;
std::set<LLUUID> ais_items, local_items;
const LLSD& cof_raw = content["cof_raw"];
for (LLSD::array_const_iterator it = cof_raw.beginArray();
it != cof_raw.endArray(); ++it)
{
const LLSD& item = *it;
if (item["parent_id"].asUUID() == LLAppearanceMgr::instance().getCOF())
{
ais_items.insert(item["item_id"].asUUID());
if (item["type"].asInteger() == 24) // link
{
LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
<< llendl;
}
else if (item["type"].asInteger() == 25) // folder link
{
LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
<< llendl;
}
else
{
LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
<< llendl;
}
}
}
LL_DEBUGS("Avatar") << llendl;
LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << llendl;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(),
cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
for (S32 i=0; i<item_array.count(); i++)
{
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
local_items.insert(inv_item->getUUID());
LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID()
<< " linked_item_id: " << inv_item->getLinkedUUID()
<< " name: " << inv_item->getName()
<< llendl;
}
LL_DEBUGS("Avatar") << llendl;
for (std::set<LLUUID>::iterator it = local_items.begin(); it != local_items.end(); ++it)
{
if (ais_items.find(*it) == ais_items.end())
{
LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl;
}
}
for (std::set<LLUUID>::iterator it = ais_items.begin(); it != ais_items.end(); ++it)
{
if (local_items.find(*it) == local_items.end())
{
LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl;
}
}
}
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
};
LLSD LLAppearanceMgr::dumpCOF() const
{
LLSD result = LLSD::emptyArray();
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(getCOF(),cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
for (S32 i=0; i<item_array.count(); i++)
{
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
LLSD item;
item["item_id"] = inv_item->getUUID();
item["linked_item_id"] = inv_item->getLinkedUUID();
item["name"] = inv_item->getName();
item["description"] = inv_item->getActualDescription();
item["type"] = inv_item->getActualType();
result.append(item);
}
return result;
}
void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr responder_ptr)
{
if (gAgentAvatarp->isEditingAppearance())
@ -3563,6 +3665,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
if (!gAgent.getRegion())
{
llwarns << "Region not set, cannot request server appearance update" << llendl;
return;
}
if (gAgent.getRegion()->getCentralBakeVersion()==0)
{
@ -3578,7 +3681,15 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
LLSD body;
S32 cof_version = getCOFVersion();
body["cof_version"] = cof_version;
LL_DEBUGS("Avatar") << "my_cof_version " << cof_version << llendl;
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
body["cof_version"] = cof_version+999;
}
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
body["debug_cof"] = dumpCOF();
}
LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
//LLCurl::ResponderPtr responder_ptr;
if (!responder_ptr.get())
@ -3590,6 +3701,81 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
mLastUpdateRequestCOFVersion = cof_version;
}
class LLIncrementCofVersionResponder : public LLHTTPClient::Responder
{
public:
LLIncrementCofVersionResponder() : LLHTTPClient::Responder()
{
mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5);
}
virtual ~LLIncrementCofVersionResponder()
{
}
virtual void result(const LLSD &pContent)
{
llinfos << "Successfully incremented agent's COF." << llendl;
S32 new_version = pContent["category"]["version"].asInteger();
LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance();
// cof_version should have increased
llassert(new_version > app_mgr->mLastUpdateRequestCOFVersion);
app_mgr->mLastUpdateRequestCOFVersion = new_version;
}
virtual void error(U32 pStatus, const std::string& pReason)
{
llwarns << "While attempting to increment the agent's cof we got an error because '"
<< pReason << "' [status:" << pStatus << "]" << llendl;
F32 seconds_to_wait;
if (mRetryPolicy->shouldRetry(pStatus,seconds_to_wait))
{
llinfos << "retrying" << llendl;
doAfterInterval(boost::bind(&LLAppearanceMgr::incrementCofVersion,
LLAppearanceMgr::getInstance(),
LLHTTPClient::ResponderPtr(this)),
seconds_to_wait);
}
else
{
llwarns << "giving up after too many retries" << llendl;
}
}
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
};
void LLAppearanceMgr::incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr)
{
// If we don't have a region, report it as an error
if (gAgent.getRegion() == NULL)
{
llwarns << "Region not set, cannot request cof_version increment" << llendl;
return;
}
std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion");
if (url.empty())
{
llwarns << "No cap for IncrementCofVersion." << llendl;
return;
}
llinfos << "Requesting cof_version be incremented via capability to: "
<< url << llendl;
LLSD headers;
LLSD body = LLSD::emptyMap();
if (!responder_ptr.get())
{
responder_ptr = LLHTTPClient::ResponderPtr(new LLIncrementCofVersionResponder());
}
LLHTTPClient::get(url, body, responder_ptr, headers, 30.0f);
}
void show_created_outfit(LLUUID& folder_id, bool show_panel = true)
{
if (!LLApp::isRunning())
@ -4032,9 +4218,9 @@ public:
}
virtual void 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.
// What we do here is get the complete information on the
// items in the requested category, and set up an observer
// that will wait for that to happen.
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(mComplete.front(),
@ -4048,9 +4234,8 @@ public:
<< llendl;
//dec_busy_count();
gInventory.removeObserver(this);
doOnIdleOneTime(mCallable);
// lets notify observers that loading is finished.
gAgentWearables.notifyLoadingFinished();
delete this;
return;
}

View File

@ -111,6 +111,9 @@ public:
const LLUUID getCOF() const;
S32 getCOFVersion() const;
// Debugging - get truncated LLSD summary of COF contents.
LLSD dumpCOF() const;
// COF version of last viewer-initiated appearance update request.
S32 mLastUpdateRequestCOFVersion;
S32 getLastUpdateRequestCOFVersion() const;
@ -158,7 +161,7 @@ public:
// Find COF entries referencing the given item.
LLInventoryModel::item_array_t findCOFItemLinks(const LLUUID& item_id);
// Remove COF entries
void removeCOFItemLinks(const LLUUID& item_id);
void removeCOFLinksOfType(LLWearableType::EType type);
@ -214,6 +217,11 @@ public:
void requestServerAppearanceUpdate(LLCurl::ResponderPtr responder_ptr = NULL);
void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL);
// *HACK Remove this after server side texture baking is deployed on all sims.
void incrementCofVersionLegacy();
protected:
LLAppearanceMgr();
~LLAppearanceMgr();

View File

@ -310,6 +310,8 @@ LLTimer gLogoutTimer;
static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg.
F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
S32 gPendingMetricsUploads = 0;
BOOL gDisconnected = FALSE;
// used to restore texture state after a mode switch
@ -5182,6 +5184,13 @@ void LLAppViewer::idleShutdown()
return;
}
if (gPendingMetricsUploads > 0
&& gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME
&& !logoutRequestSent())
{
return;
}
// All floaters are closed. Tell server we want to quit.
if( !logoutRequestSent() )
{

View File

@ -368,6 +368,8 @@ extern LLFrameTimer gLoggedInTime;
extern F32 gLogoutMaxTime;
extern LLTimer gLogoutTimer;
extern S32 gPendingMetricsUploads;
extern F32 gSimLastTime;
extern F32 gSimFrames;

View File

@ -192,7 +192,8 @@ LLVector3d LLAvatarTracker::getGlobalPos()
global_pos = object->getPositionGlobal();
// HACK - for making the tracker point above the avatar's head
// rather than its groin
global_pos.mdV[VZ] += 0.7f * ((LLVOAvatar *)object)->mBodySize.mV[VZ];
LLVOAvatar* av = (LLVOAvatar*)object;
global_pos.mdV[VZ] += 0.7f * (av->mBodySize.mV[VZ] + av->mAvatarOffset.mV[VZ]);
mTrackingData->mGlobalPositionEstimate = global_pos;
}

View File

@ -63,30 +63,22 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
void LLFloaterSidePanelContainer::onClickCloseBtn()
{
llinfos << "close clicked" << llendl;
LLPanelOutfitEdit* panel_outfit_edit =
dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
if (panel_outfit_edit && panel_outfit_edit->getVisible())
if (panel_outfit_edit)
{
LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
if (parent == this)
if (parent == this )
{
LLSidepanelAppearance* panel_appearance =
dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
panel_appearance->showOutfitsInventoryPanel();
LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
if ( panel_appearance )
{
panel_appearance->getWearable()->onClose();
panel_appearance->showOutfitsInventoryPanel();
}
}
}
if ( panel_outfit_edit )
{
LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
if ( panel_appearance )
{
panel_appearance->getWearable()->onClose();
panel_appearance->showOutfitsInventoryPanel();
}
}
LLFloater::onClickCloseBtn();
}

View File

@ -584,7 +584,6 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat
{
return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end());
}
// Bundle up a bunch of requests to send all at once.
// static
void LLInventoryModelBackgroundFetch::bulkFetch()

View File

@ -52,6 +52,7 @@
#include "lltexturectrl.h"
#include "lltextureentry.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llviewerregion.h"
#include "llviewertexturelist.h"
#include "llagentcamera.h"
#include "llmorphview.h"
@ -882,8 +883,8 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c
//static
void LLPanelEditWearable::onBackButtonClicked(void* userdata)
{
LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
{
LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
if ( panel->isDirty() )
{
LLAppearanceMgr::instance().setOutfitDirty( true );
@ -1045,6 +1046,11 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
}
}
void LLPanelEditWearable::incrementCofVersionLegacy()
{
}
void LLPanelEditWearable::saveChanges(bool force_save_as)
{
if (!mWearablePtr || !isDirty())
@ -1073,10 +1079,10 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
if (force_save_as)
{
// the name of the wearable has changed, re-save wearable with new name
LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
// the name of the wearable has changed, re-save wearable with new name
LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
mNameEditor->setText(mWearableItem->getName());
mNameEditor->setText(mWearableItem->getName());
}
else
{
@ -1096,8 +1102,18 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
// Remove old link
gInventory.purgeObject(link_item->getUUID());
}
gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
}
if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion() > 0)
{
LLAppearanceMgr::getInstance()->incrementCofVersion();
}
else
{
// *HACK This should be removed when all regions support the IncrementCOFVersion capability.
incrementCofVersionLegacy();
}
}
void LLPanelEditWearable::revertChanges()

View File

@ -78,7 +78,6 @@ public:
virtual void setVisible(BOOL visible);
private:
typedef std::map<F32, LLViewerVisualParam*> value_map_t;
@ -96,7 +95,7 @@ private:
void toggleTypeSpecificControls(LLWearableType::EType type);
void updateTypeSpecificControls(LLWearableType::EType type);
//alpha mask checkboxes
// alpha mask checkboxes
void configureAlphaCheckbox(LLAvatarAppearanceDefines::ETextureIndex te, const std::string& name);
void onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te);
void updateAlphaCheckboxes();
@ -106,7 +105,7 @@ private:
// callback for HeightUnits parameter.
bool changeHeightUnits(const LLSD& new_value);
// updates current metric and replacemet metric label text
// updates current metric and replacement metric label text
void updateMetricLayout(BOOL new_value);
// updates avatar height label
@ -116,6 +115,9 @@ private:
void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel);
// *HACK Remove this when serverside texture baking is available on all regions.
void incrementCofVersionLegacy();
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLViewerWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;
@ -130,7 +132,7 @@ private:
LLTextBox *mTxtAvatarHeight;
// localized and parametrized strings that used to build avatar_height_label
// localized and parameterized strings that used to build avatar_height_label
std::string mMeters;
std::string mFeet;
std::string mHeigth;
@ -153,7 +155,7 @@ private:
LLPanel *mPanelEyes;
LLPanel *mPanelHair;
//clothes
// clothes
LLPanel *mPanelShirt;
LLPanel *mPanelPants;
LLPanel *mPanelShoes;

View File

@ -2943,12 +2943,17 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
else
{
// FIXME SH-3860 - this creates a race condition, where COF
// changes (base outfit link added) after appearance update
// request has been submitted.
sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit);
bool do_copy = true;
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append);
// Need to fetch cof contents before we can wear.
callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(),
boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append));
lldebugs << "initial outfit category id: " << cat_id << llendl;
}

View File

@ -593,7 +593,7 @@ void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCatego
{
copyCategory(other);
mOwnerID = other->mOwnerID;
mVersion = other->mVersion;
setVersion(other->getVersion());
mDescendentCount = other->mDescendentCount;
mDescendentsRequested = other->mDescendentsRequested;
}
@ -661,9 +661,19 @@ void LLViewerInventoryCategory::removeFromServer( void )
gAgent.sendReliableMessage();
}
S32 LLViewerInventoryCategory::getVersion() const
{
return mVersion;
}
void LLViewerInventoryCategory::setVersion(S32 version)
{
mVersion = version;
}
bool LLViewerInventoryCategory::fetch()
{
if((VERSION_UNKNOWN == mVersion)
if((VERSION_UNKNOWN == getVersion())
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
LL_DEBUGS("InventoryFetch") << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
@ -1136,6 +1146,11 @@ void link_inventory_item(
}
}
#if 1 // debugging stuff
LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id);
lldebugs << "cat: " << cat << llendl;
#endif
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LinkInventoryItem);
msg->nextBlock(_PREHASH_AgentData);

View File

@ -205,13 +205,13 @@ public:
// Version handling
enum { VERSION_UNKNOWN = -1, VERSION_INITIAL = 1 };
S32 getVersion() const { return mVersion; }
void setVersion(S32 version) { mVersion = version; }
S32 getVersion() const;
void setVersion(S32 version);
// Returns true if a fetch was issued.
bool fetch();
// used to help make cacheing more robust - for example, if
// used to help make caching more robust - for example, if
// someone is getting 4 packets but logs out after 3. the viewer
// may never know the cache is wrong.
enum { DESCENDENT_COUNT_UNKNOWN = -1 };
@ -219,7 +219,7 @@ public:
void setDescendentCount(S32 descendents) { mDescendentCount = descendents; }
// file handling on the viewer. These are not meant for anything
// other than cacheing.
// other than caching.
bool exportFileLocal(LLFILE* fp) const;
bool importFileLocal(LLFILE* fp);
void determineFolderType();

View File

@ -144,7 +144,8 @@ public:
LLUUID mCacheID;
CapabilityMap mCapabilities;
CapabilityMap mSecondCapabilitiesTracker;
LLEventPoll* mEventPoll;
S32 mSeedCapMaxAttempts;
@ -221,7 +222,7 @@ public:
}
}
void result(const LLSD& content)
void result(const LLSD& content)
{
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region was removed
@ -239,6 +240,7 @@ public:
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
regionp->setCapability(iter->first, iter->second);
LL_DEBUGS2("AppInit", "Capabilities") << "got capability for "
<< iter->first << LL_ENDL;
@ -267,6 +269,59 @@ private:
S32 mID;
};
class BaseCapabilitiesCompleteTracker : public LLHTTPClient::Responder
{
LOG_CLASS(BaseCapabilitiesCompleteTracker);
public:
BaseCapabilitiesCompleteTracker( U64 region_handle)
: mRegionHandle(region_handle)
{ }
virtual ~BaseCapabilitiesCompleteTracker()
{ }
void error(U32 statusNum, const std::string& reason)
{ }
void result(const LLSD& content)
{
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if( !regionp )
{
return ;
}
LLSD::map_const_iterator iter;
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
regionp->setCapabilityDebug(iter->first, iter->second);
//llinfos<<"BaseCapabilitiesCompleteTracker New Caps "<<iter->first<<" "<< iter->second<<llendl;
}
if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() )
{
llinfos<<"BaseCapabilitiesCompleteTracker "<<"Sim sent duplicate seed caps that differs in size - most likely content."<<llendl;
//todo#add cap debug versus original check?
/*CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
while (iter!=regionp->getRegionImpl()->mCapabilities.end() )
{
llinfos<<"BaseCapabilitiesCompleteTracker Original "<<iter->first<<" "<< iter->second<<llendl;
++iter;
}
*/
regionp->getRegionImplNC()->mSecondCapabilitiesTracker.clear();
}
}
static BaseCapabilitiesCompleteTracker* build( U64 region_handle )
{
return new BaseCapabilitiesCompleteTracker( region_handle );
}
private:
U64 mRegionHandle;
};
LLViewerRegion::LLViewerRegion(const U64 &handle,
const LLHost &host,
@ -1587,11 +1642,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("EventQueueGet");
if (gSavedSettings.getBOOL("UseHTTPInventory"))
{
{
capabilityNames.append("FetchLib2");
capabilityNames.append("FetchLibDescendents2");
capabilityNames.append("FetchInventory2");
capabilityNames.append("FetchInventoryDescendents2");
capabilityNames.append("IncrementCOFVersion");
}
capabilityNames.append("GetDisplayNames");
@ -1606,7 +1662,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("LandResources");
capabilityNames.append("MapLayer");
capabilityNames.append("MapLayerGod");
capabilityNames.append("MeshUploadFlag");
capabilityNames.append("MeshUploadFlag");
capabilityNames.append("NavMeshGenerationStatus");
capabilityNames.append("NewFileAgentInventory");
capabilityNames.append("ObjectMedia");
@ -1646,7 +1702,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");
// Please add new capabilities alphabetically to reduce
// merge conflicts.
}
@ -1654,8 +1710,14 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
void LLViewerRegion::setSeedCapability(const std::string& url)
{
if (getCapability("Seed") == url)
{
// llwarns << "Ignoring duplicate seed capability" << llendl;
{
//llwarns << "Ignoring duplicate seed capability" << llendl;
//Instead of just returning we build up a second set of seed caps and compare them
//to the "original" seed cap received and determine why there is problem!
LLSD capabilityNames = LLSD::emptyArray();
mImpl->buildCapabilityNames( capabilityNames );
LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle() ),
LLSD(), CAP_REQUEST_TIMEOUT );
return;
}
@ -1791,6 +1853,11 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u
}
}
void LLViewerRegion::setCapabilityDebug(const std::string& name, const std::string& url)
{
mImpl->mSecondCapabilitiesTracker[name] = url;
}
bool LLViewerRegion::isSpecialCapabilityName(const std::string &name)
{
return name == "EventQueueGet" || name == "UntrustedSimulatorMessage";

View File

@ -244,6 +244,7 @@ public:
void failedSeedCapability();
S32 getNumSeedCapRetries();
void setCapability(const std::string& name, const std::string& url);
void setCapabilityDebug(const std::string& name, const std::string& url);
// implements LLCapabilityProvider
virtual std::string getCapability(const std::string& name) const;
@ -348,7 +349,9 @@ public:
void getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions );
void getNeighboringRegionsStatus( std::vector<S32>& regions );
const LLViewerRegionImpl * getRegionImpl() const { return mImpl; }
LLViewerRegionImpl * getRegionImplNC() { return mImpl; }
public:
struct CompareDistance
{

View File

@ -1056,6 +1056,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
{
//discard all oversized textures.
destroyRawImage();
llwarns << "oversized, setting as missing" << llendl;
setIsMissingAsset();
mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
}
@ -1367,6 +1368,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
// An inappropriately-sized image was uploaded (through a non standard client)
// We treat these images as missing assets which causes them to
// be renderd as 'missing image' and to stop requesting data
llwarns << "!size_ok, setting as missing" << llendl;
setIsMissingAsset();
destroyRawImage();
return FALSE;
@ -1853,6 +1855,7 @@ bool LLViewerFetchedTexture::updateFetch()
<< mFullWidth << ", height= "
<< mFullHeight << llendl;
destroyRawImage();
llwarns << "oversize, setting as missing" << llendl;
setIsMissingAsset();
mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
mIsFetching = FALSE ;
@ -1882,7 +1885,7 @@ bool LLViewerFetchedTexture::updateFetch()
// We finished but received no data
if (current_discard < 0)
{
llinfos << "Discarding image, no data received" << llendl;
llwarns << "!mIsFetching, setting as missing" << llendl;
setIsMissingAsset();
desired_discard = -1;
}

View File

@ -1518,7 +1518,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **
LLViewerFetchedTexture* image = gTextureList.findImage( image_id );
if( image )
{
llinfos << "Discarding image not in asset database" << llendl;
llwarns << "not in db" << llendl;
image->setIsMissingAsset();
}
}

View File

@ -209,11 +209,6 @@ enum ERenderName
RENDER_NAME_FADE
};
// Utility func - FIXME move out of avatar.
std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@ -234,6 +229,24 @@ struct LLTextureMaskData
**
**/
struct LLAppearanceMessageContents
{
LLAppearanceMessageContents():
mAppearanceVersion(-1),
mParamAppearanceVersion(-1),
mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
{
}
LLTEContents mTEContents;
S32 mAppearanceVersion;
S32 mParamAppearanceVersion;
S32 mCOFVersion;
// For future use:
//U32 appearance_flags = 0;
std::vector<F32> mParamWeights;
std::vector<LLVisualParam*> mParams;
};
//-----------------------------------------------------------------------------
// class LLBodyNoiseMotion
//-----------------------------------------------------------------------------
@ -1929,7 +1942,8 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
return;
}
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))
&& !(gSavedSettings.getBOOL("DisableAllRenderTypes")))
{
return;
}
@ -2131,7 +2145,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
{
LLVector3 tagPos = mRoot->getWorldPosition();
tagPos[VZ] -= mPelvisToFoot;
tagPos[VZ] += ( mBodySize[VZ] + 0.125f );
tagPos[VZ] += ( mBodySize[VZ] + mAvatarOffset[VZ] + 0.125f );
mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
}
}//if ( voiceEnabled )
@ -3072,12 +3086,12 @@ LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
local_camera_up.normalize();
local_camera_up = local_camera_up * ~root_rot;
local_camera_up.scaleVec(mBodySize * 0.5f);
local_camera_at.scaleVec(mBodySize * 0.5f);
local_camera_up.scaleVec((mBodySize + mAvatarOffset) * 0.5f);
local_camera_at.scaleVec((mBodySize + mAvatarOffset) * 0.5f);
LLVector3 name_position = mRoot->getWorldPosition();
name_position[VZ] -= mPelvisToFoot;
name_position[VZ] += (mBodySize[VZ]* 0.55f);
name_position[VZ] += ((mBodySize[VZ] + mAvatarOffset[VZ])* 0.55f);
name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
name_position += pixel_up_vec * 15.f;
@ -3396,6 +3410,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
root_pos = gAgent.getPosGlobalFromAgent(getRenderPosition());
root_pos.mdV[VZ] += getVisualParamWeight(11001);
resolveHeightGlobal(root_pos, ground_under_pelvis, normal);
F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]);
@ -4387,22 +4403,40 @@ std::string LLVOAvatar::bakedTextureOriginInfo()
std::set<LLUUID> baked_ids;
collectBakedTextureUUIDs(baked_ids);
for (std::set<LLUUID>::const_iterator it = baked_ids.begin(); it != baked_ids.end(); ++it)
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it);
bool has_url = false, has_host = false;
if (!imagep->getUrl().empty())
ETextureIndex texture_index = mBakedTextureDatas[i].mTextureIndex;
LLViewerFetchedTexture *imagep =
LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE);
if (!imagep ||
imagep->getID() == IMG_DEFAULT ||
imagep->getID() == IMG_DEFAULT_AVATAR)
{
has_url = true;
result += "-";
}
if (imagep->getTargetHost().isOk())
else
{
has_host = true;
bool has_url = false, has_host = false;
if (!imagep->getUrl().empty())
{
has_url = true;
}
if (imagep->getTargetHost().isOk())
{
has_host = true;
}
S32 discard = imagep->getDiscardLevel();
if (has_url && !has_host) result += discard ? "u" : "U"; // server-bake texture with url
else if (has_host && !has_url) result += discard ? "h" : "H"; // old-style texture on sim
else if (has_host && has_url) result += discard ? "x" : "X"; // both origins?
else if (!has_host && !has_url) result += discard ? "n" : "N"; // no origin?
if (discard != 0)
{
result += llformat("(%d/%d)",discard,imagep->getDesiredDiscardLevel());
}
}
if (has_url && !has_host) result += "u"; // server-bake texture with url
else if (has_host && !has_url) result += "h"; // old-style texture on sim
else if (has_host && has_url) result += "?"; // both origins?
else if (!has_host && !has_url) result += "n"; // no origin?
}
return result;
}
@ -6276,6 +6310,7 @@ void LLVOAvatar::updateRezzedStatusTimers()
for (S32 i = 1; i < 4; i++)
{
startPhase("load_" + LLVOAvatar::rezStatusToString(i));
startPhase("first_load_" + LLVOAvatar::rezStatusToString(i));
}
}
if (rez_status < mLastRezzedStatus)
@ -6292,6 +6327,7 @@ void LLVOAvatar::updateRezzedStatusTimers()
for (S32 i = llmax(mLastRezzedStatus+1,1); i <= rez_status; i++)
{
stopPhase("load_" + LLVOAvatar::rezStatusToString(i));
stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);
}
if (rez_status == 3)
{
@ -6521,6 +6557,8 @@ LLMotion* LLVOAvatar::findMotion(const LLUUID& id) const
return mMotionController.findMotion(id);
}
// This is a semi-deprecated debugging tool - meshes will not show as
// colorized if using deferred rendering.
void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
{
if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@ -6635,29 +6673,7 @@ void LLVOAvatar::updateMeshTextures()
LLViewerTexLayerSet* layerset = getTexLayerSet(i);
if (use_lkg_baked_layer[i] && !isUsingLocalAppearance() )
{
LLViewerFetchedTexture* baked_img;
#ifndef LL_RELEASE_FOR_DOWNLOAD
LLViewerFetchedTexture* existing_baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID);
#endif
ETextureIndex te = ETextureIndex(mBakedTextureDatas[i].mTextureIndex);
const std::string url = getImageURL(te, mBakedTextureDatas[i].mLastTextureID);
if (!url.empty())
{
baked_img = LLViewerTextureManager::getFetchedTextureFromUrl(url, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, mBakedTextureDatas[i].mLastTextureID);
}
else
{
// Baked textures should be requested from the sim this avatar is on. JC
const LLHost target_host = getObjectHost();
if (!target_host.isOk())
{
llwarns << "updateMeshTextures: invalid host for object: " << getID() << llendl;
}
baked_img = LLViewerTextureManager::getFetchedTextureFromHost( mBakedTextureDatas[i].mLastTextureID, target_host );
}
llassert(baked_img == existing_baked_img);
LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID);
mBakedTextureDatas[i].mIsUsed = TRUE;
debugColorizeSubMeshes(i,LLColor4::red);
@ -7120,10 +7136,11 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
const std::vector<F32>& params_for_dump,
const LLTEContents& tec)
const LLAppearanceMessageContents& contents)
{
std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml");
const std::vector<F32>& params_for_dump = contents.mParamWeights;
const LLTEContents& tec = contents.mTEContents;
LLAPRFile outfile;
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
@ -7138,7 +7155,12 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl;
}
apr_file_printf(file, "<header>\n");
apr_file_printf(file, "\t\t<cof_version %i />\n", contents.mCOFVersion);
apr_file_printf(file, "\t\t<appearance_version %i />\n", contents.mAppearanceVersion);
apr_file_printf(file, "</header>\n");
apr_file_printf(file, "\n<params>\n");
LLVisualParam* param = getFirstVisualParam();
for (S32 i = 0; i < params_for_dump.size(); i++)
{
@ -7151,32 +7173,18 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
dump_visual_param(file, viewer_param, value);
param = getNextVisualParam();
}
apr_file_printf(file, "</params>\n");
apr_file_printf(file, "\n<textures>\n");
for (U32 i = 0; i < tec.face_count; i++)
{
std::string uuid_str;
((LLUUID*)tec.image_data)[i].toString(uuid_str);
apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", i, uuid_str.c_str());
}
apr_file_printf(file, "</textures>\n");
}
struct LLAppearanceMessageContents
{
LLAppearanceMessageContents():
mAppearanceVersion(-1),
mParamAppearanceVersion(-1),
mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
{
}
LLTEContents mTEContents;
S32 mAppearanceVersion;
S32 mParamAppearanceVersion;
S32 mCOFVersion;
// For future use:
//U32 appearance_flags = 0;
std::vector<F32> mParamWeights;
std::vector<LLVisualParam*> mParams;
};
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
{
parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, contents.mTEContents);
@ -7315,7 +7323,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
parseAppearanceMessage(mesgsys, contents);
if (enable_verbose_dumps)
{
dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents.mParamWeights, contents.mTEContents);
dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents);
}
S32 appearance_version;
@ -7540,6 +7548,7 @@ void LLVOAvatar::getAnimNames( LLDynamicArray<std::string>* names )
names->put( "enter_away_from_keyboard_state" );
}
// static
void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
if (!userdata) return;
@ -7558,7 +7567,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
if (!aux_src->getData())
{
llerrs << "No auxiliary source data for onBakedTextureMasksLoaded" << llendl;
llerrs << "No auxiliary source (morph mask) data for image id " << id << llendl;
return;
}
@ -7610,7 +7619,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
}
if (!found_texture_id)
{
llinfos << "onBakedTextureMasksLoaded(): unexpected image id: " << id << llendl;
llinfos << "unexpected image id: " << id << llendl;
}
self->dirtyMesh();
}
@ -7618,7 +7627,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
// this can happen when someone uses an old baked texture possibly provided by
// viewer-side baked texture caching
llwarns << "Masks loaded callback but NO aux source!" << llendl;
llwarns << "Masks loaded callback but NO aux source, id " << id << llendl;
}
}

View File

@ -940,8 +940,7 @@ private:
public:
void dumpArchetypeXML(const std::string& prefix, bool group_by_wearables = false);
void dumpAppearanceMsgParams( const std::string& dump_prefix,
const std::vector<F32>& paramsForDump,
const LLTEContents& tec);
const LLAppearanceMessageContents& contents);
static void dumpBakedStatus();
const std::string getBakedStatusForPrintout() const;
void dumpAvatarTEs(const std::string& context) const;
@ -992,5 +991,9 @@ protected: // Shared with LLVOAvatarSelf
extern const F32 SELF_ADDITIONAL_PRI;
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
#endif // LL_VOAVATAR_H

View File

@ -2552,6 +2552,7 @@ public:
const std::string& reason,
const LLSD& content)
{
gPendingMetricsUploads--; // if we add retry, this should be moved to the isGoodStatus case.
if (isGoodStatus(status))
{
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
@ -2564,11 +2565,6 @@ public:
}
}
// virtual
void error(U32 status_num, const std::string & reason)
{
}
// virtual
void result(const LLSD & content)
{
@ -2713,6 +2709,7 @@ void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics()
}
if (!caps_url.empty())
{
gPendingMetricsUploads++;
LLCurlRequest::headers_t headers;
LLHTTPClient::post(caps_url,
msg,
@ -2872,34 +2869,33 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe
{
if (!isIndexLocalTexture(type)) return;
if (getLocalTextureID(type, index) != IMG_DEFAULT_AVATAR)
if (!covered_by_baked)
{
imagep->setNoDelete();
if (imagep->getDiscardLevel() != 0)
if (getLocalTextureID(type, index) != IMG_DEFAULT_AVATAR)
{
F32 desired_pixels;
desired_pixels = llmin(mPixelArea, (F32)getTexImageArea());
// DRANO what priority should wearable-based textures have?
if (isUsingLocalAppearance())
imagep->setNoDelete();
if (imagep->getDiscardLevel() != 0)
{
F32 desired_pixels;
desired_pixels = llmin(mPixelArea, (F32)getTexImageArea());
imagep->setBoostLevel(getAvatarBoostLevel());
imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ;
}
imagep->resetTextureStats();
imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL);
imagep->addTextureStats( desired_pixels / texel_area_ratio );
imagep->forceUpdateBindStats() ;
if (imagep->getDiscardLevel() < 0)
{
mHasGrey = TRUE; // for statistics gathering
imagep->resetTextureStats();
imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL);
imagep->addTextureStats( desired_pixels / texel_area_ratio );
imagep->forceUpdateBindStats() ;
if (imagep->getDiscardLevel() < 0)
{
mHasGrey = TRUE; // for statistics gathering
}
}
}
}
else
{
// texture asset is missing
mHasGrey = TRUE; // for statistics gathering
else
{
// texture asset is missing
mHasGrey = TRUE; // for statistics gathering
}
}
}
@ -3408,8 +3404,6 @@ void LLVOAvatarSelf::dumpScratchTextureByteCount()
llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl;
}
void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
{
apr_file_t* file = outfile.getFileHandle();
@ -3442,3 +3436,10 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
}
apr_file_printf( file, "\n</wearable_info>\n" );
}
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
F32 LLVOAvatarSelf::getAvatarOffset() /*const*/
{
return (isUsingServerBakes()) ? LLAvatarAppearance::getAvatarOffset() : RlvSettings::getAvatarOffsetZ();
}
// [/RLVa:KB]

View File

@ -359,6 +359,11 @@ public:
public:
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
protected:
/*virtual*/ F32 getAvatarOffset() /*const*/;
// [/RLVa:KB]
/** Appearance
** **
*******************************************************************************/

View File

@ -3956,6 +3956,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Higher">Higher</string>
<string name="Hip Length">Hip Length</string>
<string name="Hip Width">Hip Width</string>
<string name="Hover">Hover</string>
<string name="In">In</string>
<string name="In Shdw Color">Inner Shadow Color</string>
<string name="In Shdw Opacity">Inner Shadow Opacity</string>