From 0a6a5f63b45bf3d97c7926b8d415b0b3885f64a1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 5 Apr 2013 13:44:33 -0400 Subject: SH-4061 WIP - spelling fix, allow un-set of missing asset flag for textures --- indra/newview/llvoavatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5695fc04b9..a71bb93ba2 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4408,7 +4408,7 @@ void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerFetchedTexture } const S32 MAX_TEXTURE_UPDATE_INTERVAL = 64 ; //need to call updateTextures() at least every 32 frames. -const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = S32_MAX ; //frames +const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL = S32_MAX ; //frames void LLVOAvatar::checkTextureLoading() { static const F32 MAX_INVISIBLE_WAITING_TIME = 15.f ; //seconds @@ -4471,11 +4471,11 @@ const F32 ADDITIONAL_PRI = 0.5f; void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { //Note: - //if this function is not called for the last MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL frames, + //if this function is not called for the last MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL frames, //the texture pipeline will stop fetching this texture. imagep->resetTextureStats(); - imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); + imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL); imagep->resetMaxVirtualSizeResetCounter() ; mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); -- cgit v1.2.3 From e16435c37cb7410f3ea4596e30fd232ac558bc71 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 8 Apr 2013 13:26:05 -0400 Subject: SH-4061 WIP - added ability to un-set missing asset, do this in the case of FTT_SERVER_BAKE images. This is needed because 'missing' is not necessarily permanent for such images. --- indra/newview/llvoavatar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a71bb93ba2..58da77efbb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1884,6 +1884,10 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU LL_DEBUGS("Avatar") << avString() << "from URL " << url << llendl; result = LLViewerTextureManager::getFetchedTextureFromUrl( url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); + if (result->isMissingAsset()) + { + result->setIsMissingAsset(false); + } } else { -- cgit v1.2.3 From 5976dc144e774ae363cbf774337ccf663015cc6d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 15 Apr 2013 15:12:22 -0400 Subject: SH-4061 WIP - simulated failures/image fetch retries --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cf4cc64ac3..a2ba8f36aa 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7302,7 +7302,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex, 0 ); if (id == image_baked->getID()) { - LL_DEBUGS("Avatar") << avString() << " i " << i << " id " << id << LL_ENDL; + //LL_DEBUGS("Avatar") << avString() << " i " << i << " id " << id << LL_ENDL; mBakedTextureDatas[i].mIsLoaded = true; mBakedTextureDatas[i].mLastTextureID = id; mBakedTextureDatas[i].mIsUsed = true; -- cgit v1.2.3 From d58b9ee54e84b709e063cdbbc349de25feafa59b Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 25 Apr 2013 14:09:42 -0400 Subject: SH-4050 FIX camera goes underground if hover set low enough Changing viewer limit for avatar height to match server limit, camera does not go underground. Also clarified where we do not need avatar offset in the code, through comments --- indra/newview/llvoavatar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0475e9fc89..bf6e28b93d 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2144,7 +2144,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) { LLVector3 tagPos = mRoot->getWorldPosition(); tagPos[VZ] -= mPelvisToFoot; - tagPos[VZ] += ( mBodySize[VZ] + 0.125f ); + tagPos[VZ] += ( mBodySize[VZ] + 0.125f ); // does not need mAvatarOffset -Nyx mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos ); } }//if ( voiceEnabled ) @@ -2885,6 +2885,8 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) local_camera_up.normalize(); local_camera_up = local_camera_up * inv_root_rot; + + // position is based on head position, does not require mAvatarOffset here. - Nyx LLVector3 avatar_ellipsoid(mBodySize.mV[VX] * 0.4f, mBodySize.mV[VY] * 0.4f, mBodySize.mV[VZ] * NAMETAG_VERT_OFFSET_WEIGHT); -- cgit v1.2.3 From af1431731802320e241037486b8bff0003a4d827 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 2 May 2013 13:56:10 -0400 Subject: SH-4060 FIX avatar hover being set to minimum at seemingly random times avatar hover was being temporarily set to -2.0 for the preview render, which was triggering the minimum enforcement, even when the user's requested value is no where near the minimum. Added a flag to disable the minimum enforcement if we are temporarily changing the value. --- indra/newview/llvoavatar.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a56e09cde0..919627c47c 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5214,6 +5214,36 @@ void LLVOAvatar::updateVisualParams() updateHeadOffset(); } +/*virtual*/ +void LLVOAvatar::computeBodySize() +{ + LLAvatarAppearance::computeBodySize(); + + // Certain configurations of avatars can force the overall height (with offset) to go negative. + // Enforce a constraint to make sure we don't go below 0.1 meters. + // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground + if (isSelf() && getWearableData()) + { + LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); + if (shape && shape->getVolitile()) + { + F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); + if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) + { + hover_value = -(mBodySize.mV[VZ] - 1.1f); // avoid floating point rounding making the above check continue to fail. + llassert(mBodySize.mV[VZ] + hover_value >= 1.1f); + + hover_value = llmin(hover_value, 0.0f); // don't force the hover value to be greater than 0. + + mAvatarOffset.mV[VZ] = hover_value; + shape->setVisualParamWeight(AVATAR_HOVER,hover_value, FALSE); + + } + } + } +} + + //----------------------------------------------------------------------------- // isActive() //----------------------------------------------------------------------------- -- cgit v1.2.3 From 668a822ace1a7f1dffd090bbdd68712c31d0ac5c Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 3 May 2013 17:30:36 -0400 Subject: SH-4147 FIX Macro avatars with hover==0 look incorrect on relog Inverted logic meant that we would enforce minimums only while in preview renders, not for actual user adjustments. This seems to fix it. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3189507b53..e2ed6f54cc 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5225,7 +5225,7 @@ void LLVOAvatar::computeBodySize() if (isSelf() && getWearableData()) { LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); - if (shape && shape->getVolitile()) + if (shape && !shape->getVolitile()) { F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) -- cgit v1.2.3 From e6bc0c5d695796c56bdc2a53f5db594e93e58aff Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Mon, 6 May 2013 18:31:17 -0400 Subject: SH-4147 FIX macro avatars with low hover look wrong after relog Preventing hover limit from being applied during startup or shutdown when the rigged mesh may not be fully loaded. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e2ed6f54cc..8e7bed39c4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5222,7 +5222,7 @@ void LLVOAvatar::computeBodySize() // Certain configurations of avatars can force the overall height (with offset) to go negative. // Enforce a constraint to make sure we don't go below 0.1 meters. // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground - if (isSelf() && getWearableData()) + if (isSelf() && getWearableData() && isFullyLoaded() && !LLApp::isQuitting()) { LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); if (shape && !shape->getVolitile()) -- cgit v1.2.3 From faaf8ba5c75c925d9922dda8ce43293222cadb3b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 May 2013 14:54:59 -0400 Subject: SH-4222 FIX, SH-3635 WIP - start of stuck-appearance checker, always increment folder version when a contained item is updated. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8e7bed39c4..6df5fab42b 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6023,7 +6023,7 @@ void LLVOAvatar::startPhase(const std::string& phase_name) return; } } - LL_DEBUGS("Avatar") << "started phase " << phase_name << llendl; + LL_DEBUGS("Avatar") << avString() << " started phase " << phase_name << llendl; getPhases().startPhase(phase_name); } -- cgit v1.2.3 From 7f2cf1fa9cf7c09af8eeab3aa077eb0a9922d631 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 30 May 2013 17:44:51 -0400 Subject: SH-4147 FIX Macro avatar hover gets reset on relog Hover minimum enforcement was getting triggered on relog for macro avatars before the joint offsets were applied when loading the avatar. Added code to verify that all attachments in COF have been rezzed, and all attached objects are not in the process of being rebuilt to the enforcement code. This should verify that we only apply the hover value enforcement when all rigged meshes are actually loaded before enforcing minimum hover value --- indra/newview/llvoavatar.cpp | 56 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 10 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6df5fab42b..310ff47cf5 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5220,24 +5220,60 @@ void LLVOAvatar::computeBodySize() LLAvatarAppearance::computeBodySize(); // Certain configurations of avatars can force the overall height (with offset) to go negative. - // Enforce a constraint to make sure we don't go below 0.1 meters. + // Enforce a constraint to make sure we don't go below 1.1 meters (server-enforced limit) // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground + const LLViewerObject * last_object = NULL; if (isSelf() && getWearableData() && isFullyLoaded() && !LLApp::isQuitting()) { - LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); - if (shape && !shape->getVolitile()) + // Do not force a hover parameter change while we have pending attachments, which may be mesh-based with + // joint offsets. + if (LLAppearanceMgr::instance().getNumAttachmentsInCOF() == getNumAttachments()) { - F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); - if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) + LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); + BOOL loaded = TRUE; + for (attachment_map_t::const_iterator points_iter = mAttachmentPoints.begin(); + points_iter != mAttachmentPoints.end() && loaded; + ++points_iter) { - hover_value = -(mBodySize.mV[VZ] - 1.1f); // avoid floating point rounding making the above check continue to fail. - llassert(mBodySize.mV[VZ] + hover_value >= 1.1f); + const LLViewerJointAttachment *attachment_pt = (*points_iter).second; + if (attachment_pt) + { + for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator attach_iter = attachment_pt->mAttachedObjects.begin(); attach_iter != attachment_pt->mAttachedObjects.end(); attach_iter++) + { + const LLViewerObject* object = (LLViewerObject*)*attach_iter; + if (object) + { + last_object = object; + llwarns << "attachment at point: " << (*points_iter).first << " object exists: " << object->getAttachmentItemID() << llendl; + loaded &=!object->isDrawableState(LLDrawable::REBUILD_ALL); + if (!loaded && shape && !shape->getVolitile()) + { + llwarns << "caught unloaded attachment! skipping enforcement" << llendl; + } + } + } + } + } - hover_value = llmin(hover_value, 0.0f); // don't force the hover value to be greater than 0. + if (last_object) + { + LL_DEBUGS("Avatar") << "scanned at least one object!" << LL_ENDL; + } + if (loaded && shape && !shape->getVolitile()) + { + F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); + if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) + { + hover_value = -(mBodySize.mV[VZ] - 1.1f); // avoid floating point rounding making the above check continue to fail. + llassert(mBodySize.mV[VZ] + hover_value >= 1.1f); + + hover_value = llmin(hover_value, 0.0f); // don't force the hover value to be greater than 0. - mAvatarOffset.mV[VZ] = hover_value; - shape->setVisualParamWeight(AVATAR_HOVER,hover_value, FALSE); + LL_DEBUGS("Avatar") << "changed hover value to: " << hover_value << " from: " << mAvatarOffset.mV[VZ] << LL_ENDL; + mAvatarOffset.mV[VZ] = hover_value; + shape->setVisualParamWeight(AVATAR_HOVER,hover_value, FALSE); + } } } } -- cgit v1.2.3 From 9552f733ef0b581158665a1a464b5be7d4bada2a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 31 May 2013 13:54:32 -0400 Subject: SH-3635 WIP --- indra/newview/llvoavatar.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6df5fab42b..2cbdf93eeb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6013,9 +6013,12 @@ void LLVOAvatar::clearPhases() void LLVOAvatar::startPhase(const std::string& phase_name) { - F32 elapsed; - bool completed; - if (getPhases().getPhaseValues(phase_name, elapsed, completed)) + F32 elapsed = 0.0; + bool completed = false; + bool found = getPhases().getPhaseValues(phase_name, elapsed, completed); + //LL_DEBUGS("Avatar") << avString() << " phase state " << phase_name + // << " found " << found << " elapsed " << elapsed << " completed " << completed << llendl; + if (found) { if (!completed) { @@ -6029,9 +6032,12 @@ void LLVOAvatar::startPhase(const std::string& phase_name) void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) { - F32 elapsed; - bool completed; - if (getPhases().getPhaseValues(phase_name, elapsed, completed)) + F32 elapsed = 0.0; + bool completed = false; + bool found = getPhases().getPhaseValues(phase_name, elapsed, completed); + //LL_DEBUGS("Avatar") << avString() << " phase state " << phase_name + // << " found " << found << " elapsed " << elapsed << " completed " << completed << llendl; + if (found) { if (!completed) { -- cgit v1.2.3 From ca806315a98627b29a4933cbf8b27431ca43dd0f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 5 Jun 2013 15:52:44 -0400 Subject: SH-3635 WIP - logging cleanup, moved some big dumps into separate XML files --- indra/newview/llvoavatar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2cbdf93eeb..1dbcabf2b3 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7416,6 +7416,15 @@ std::string get_sequential_numbered_file_name(const std::string& prefix, return outfilename; } +void dump_sequential_xml(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(content, LLSDFormatter::OPTIONS_PRETTY); + LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; +} + void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_wearables ) { std::string outprefix(prefix); -- cgit v1.2.3 From 56cf4297f3c603b8c39880ee20ce0fd6fb3341e5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 13 Jun 2013 16:07:02 -0400 Subject: SH-4250 WIP - logging tweaks and cleanup --- indra/newview/llvoavatar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4593541f35..46b909c4a1 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1881,7 +1881,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU const std::string url = getImageURL(te,uuid); if (!url.empty()) { - LL_DEBUGS("Avatar") << avString() << "from URL " << url << llendl; + LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << llendl; result = LLViewerTextureManager::getFetchedTextureFromUrl( url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); if (result->isMissingAsset()) @@ -1891,7 +1891,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU } else { - LL_DEBUGS("Avatar") << avString() << "from host " << uuid << llendl; + LL_DEBUGS("Avatar") << avString() << "get old-bake image from host " << uuid << llendl; LLHost host = getObjectHost(); result = LLViewerTextureManager::getFetchedTexture( uuid, FTT_HOST_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); @@ -7093,9 +7093,15 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && mBakedTextureDatas[baked_index].mLastTextureID != IMG_DEFAULT && baked_index != BAKED_SKIRT) { + LL_DEBUGS("Avatar") << avString() << "sb " << (S32) isUsingServerBakes() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << llendl; setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } + else + { + LL_DEBUGS("Avatar") << avString() << "sb " << (S32) isUsingServerBakes() << " baked_index " << (S32) baked_index << " using texture id " + << getTE(mBakedTextureDatas[baked_index].mTextureIndex)->getID() << llendl; + } } // runway - was -- cgit v1.2.3 From 01ffa6788793cdecff313b704422f0e814452489 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 21 Jun 2013 21:21:57 -0400 Subject: SH-4240 FIX Users can set their hover height to 0 Adjusted the startup conditions, and relogging should apply the enforcement as appropriate now. Note that this affects the startup enforcement and should re-test the macro avatar loading bug. --- indra/newview/llvoavatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 46b909c4a1..8c20533b4c 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5223,7 +5223,7 @@ void LLVOAvatar::computeBodySize() // Enforce a constraint to make sure we don't go below 1.1 meters (server-enforced limit) // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground const LLViewerObject * last_object = NULL; - if (isSelf() && getWearableData() && isFullyLoaded() && !LLApp::isQuitting()) + if (isSelf() && getWearableData() && !LLApp::isQuitting()) { // Do not force a hover parameter change while we have pending attachments, which may be mesh-based with // joint offsets. @@ -5246,7 +5246,7 @@ void LLVOAvatar::computeBodySize() last_object = object; llwarns << "attachment at point: " << (*points_iter).first << " object exists: " << object->getAttachmentItemID() << llendl; loaded &=!object->isDrawableState(LLDrawable::REBUILD_ALL); - if (!loaded && shape && !shape->getVolitile()) + if (!loaded && shape && !shape->getVolatile()) { llwarns << "caught unloaded attachment! skipping enforcement" << llendl; } @@ -5259,7 +5259,7 @@ void LLVOAvatar::computeBodySize() { LL_DEBUGS("Avatar") << "scanned at least one object!" << LL_ENDL; } - if (loaded && shape && !shape->getVolitile()) + if (loaded && shape && !shape->getVolatile()) { F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) -- cgit v1.2.3 From 39b734a00199eb7d24edf06f9c496161819ebde7 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 28 Jun 2013 11:59:03 -0400 Subject: SH-4240 FIX users can set hover height to 0 removing minimum height enforcement, as changes are local-only and would not be visible by other users in this repro, unless the user explicitly saved the changes. Since there are many ways to get around the enforcement, and the enforced minimums won't be visible to other users, its simpler to allow users to use the full range of the hover slider. NOTE: this means that a user's avatar can be underground, leading to the camera pointing up at the sky. this is a known issue. --- indra/newview/llvoavatar.cpp | 66 -------------------------------------------- 1 file changed, 66 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8c20533b4c..2fd26eae80 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5214,72 +5214,6 @@ void LLVOAvatar::updateVisualParams() updateHeadOffset(); } -/*virtual*/ -void LLVOAvatar::computeBodySize() -{ - LLAvatarAppearance::computeBodySize(); - - // Certain configurations of avatars can force the overall height (with offset) to go negative. - // Enforce a constraint to make sure we don't go below 1.1 meters (server-enforced limit) - // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground - const LLViewerObject * last_object = NULL; - if (isSelf() && getWearableData() && !LLApp::isQuitting()) - { - // Do not force a hover parameter change while we have pending attachments, which may be mesh-based with - // joint offsets. - if (LLAppearanceMgr::instance().getNumAttachmentsInCOF() == getNumAttachments()) - { - LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); - BOOL loaded = TRUE; - for (attachment_map_t::const_iterator points_iter = mAttachmentPoints.begin(); - points_iter != mAttachmentPoints.end() && loaded; - ++points_iter) - { - const LLViewerJointAttachment *attachment_pt = (*points_iter).second; - if (attachment_pt) - { - for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator attach_iter = attachment_pt->mAttachedObjects.begin(); attach_iter != attachment_pt->mAttachedObjects.end(); attach_iter++) - { - const LLViewerObject* object = (LLViewerObject*)*attach_iter; - if (object) - { - last_object = object; - llwarns << "attachment at point: " << (*points_iter).first << " object exists: " << object->getAttachmentItemID() << llendl; - loaded &=!object->isDrawableState(LLDrawable::REBUILD_ALL); - if (!loaded && shape && !shape->getVolatile()) - { - llwarns << "caught unloaded attachment! skipping enforcement" << llendl; - } - } - } - } - } - - if (last_object) - { - LL_DEBUGS("Avatar") << "scanned at least one object!" << LL_ENDL; - } - if (loaded && shape && !shape->getVolatile()) - { - F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); - if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) - { - hover_value = -(mBodySize.mV[VZ] - 1.1f); // avoid floating point rounding making the above check continue to fail. - llassert(mBodySize.mV[VZ] + hover_value >= 1.1f); - - hover_value = llmin(hover_value, 0.0f); // don't force the hover value to be greater than 0. - - LL_DEBUGS("Avatar") << "changed hover value to: " << hover_value << " from: " << mAvatarOffset.mV[VZ] << LL_ENDL; - - mAvatarOffset.mV[VZ] = hover_value; - shape->setVisualParamWeight(AVATAR_HOVER,hover_value, FALSE); - } - } - } - } -} - - //----------------------------------------------------------------------------- // isActive() //----------------------------------------------------------------------------- -- cgit v1.2.3 From 8f4f7452308d41467b021ae0da821b33f559dd79 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 3 Jul 2013 12:45:56 -0400 Subject: SH-4226 WIP - try to be smarter about when to send appearance update requests, removed many redundant calls --- indra/newview/llvoavatar.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2fd26eae80..74fb51b943 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7014,7 +7014,15 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } - mLastUpdateReceivedCOFVersion = this_update_cof_version; + // No backsies zone - if we get here, the message should be valid and usable. + if (appearance_version > 0) + { + // Note: + // RequestAgentUpdateAppearanceResponder::onRequestRequested() + // assumes that cof version is only updated with server-bake + // appearance messages. + mLastUpdateReceivedCOFVersion = this_update_cof_version; + } setIsUsingServerBakes(appearance_version > 0); @@ -7061,6 +7069,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) LL_DEBUGS("Avatar") << avString() << " handle visual params, num_params " << num_params << LL_ENDL; BOOL params_changed = FALSE; BOOL interp_params = FALSE; + S32 params_changed_count = 0; for( S32 i = 0; i < num_params; i++ ) { @@ -7070,12 +7079,15 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if (is_first_appearance_message || (param->getWeight() != newWeight)) { params_changed = TRUE; + params_changed_count++; if(is_first_appearance_message) { + //LL_DEBUGS("Avatar") << "param slam " << i << " " << newWeight << llendl; param->setWeight(newWeight, FALSE); } else { + //LL_DEBUGS("Avatar") << std::setprecision(5) << " param target " << i << " " << param->getWeight() << " -> " << newWeight << llendl; interp_params = TRUE; param->setAnimationTarget(newWeight, FALSE); } @@ -7087,6 +7099,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl; } + LL_DEBUGS("Avatar") << "Changed " << params_changed_count << " params" << llendl; if (params_changed) { if (interp_params) -- cgit v1.2.3 From a1ece43905db86cb6953ce9848228122637e5708 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 18 Jul 2013 16:31:50 -0400 Subject: SH-3875 FIX Failure to bake face wrinkles Wrinkles have been a deprecated/non-functional feature for a few years now. Removing the user-facing sliders to prevent confusion. --- indra/newview/llvoavatar.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 74fb51b943..96afd2e15d 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6797,7 +6797,8 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, LLVisualParam* param = getFirstVisualParam(); for (S32 i = 0; i < params_for_dump.size(); i++) { - while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT + while( param && ((param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && + (param->getGroup() != VISUAL_PARAM_GROUP_TRANSMIT_NOT_TWEAKABLE)) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT { param = getNextVisualParam(); } @@ -6851,7 +6852,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe { for( S32 i = 0; i < num_blocks; i++ ) { - while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT + while( param && ((param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && + (param->getGroup() != VISUAL_PARAM_GROUP_TRANSMIT_NOT_TWEAKABLE)) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT { param = getNextVisualParam(); } @@ -6872,7 +6874,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe } } - const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT + const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE) + + getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TRANSMIT_NOT_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT if (num_blocks != expected_tweakable_count) { LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl; @@ -7093,7 +7096,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } } } - const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT + const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE) + + getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TRANSMIT_NOT_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT if (num_params != expected_tweakable_count) { LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl; -- cgit v1.2.3 From a1fadad9c0bd1ba261f827d6da572db5621f5bed Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 24 Jul 2013 16:01:36 -0400 Subject: Sh-4321 # Fixes for detach deformations. General code cleanup as well. --- indra/newview/llvoavatar.cpp | 74 +++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 45 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 96afd2e15d..83b7ac9e75 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -106,7 +106,7 @@ extern F32 SPEED_ADJUST_MAX; extern F32 SPEED_ADJUST_MAX_SEC; extern F32 ANIM_SPEED_MAX; extern F32 ANIM_SPEED_MIN; - +extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG; // #define OUTPUT_BREAST_DATA @@ -1234,6 +1234,7 @@ LLTexLayerSet* LLVOAvatar::createTexLayerSet() const LLVector3 LLVOAvatar::getRenderPosition() const { + if (mDrawable.isNull() || mDrawable->getGeneration() < 0) { return getPositionAgent(); @@ -1256,6 +1257,8 @@ const LLVector3 LLVOAvatar::getRenderPosition() const { return getPosition() * mDrawable->getParent()->getRenderMatrix(); } + + } void LLVOAvatar::updateDrawable(BOOL force_damped) @@ -2992,7 +2995,7 @@ bool LLVOAvatar::isVisuallyMuted() const // called on both your avatar and other avatars //------------------------------------------------------------------------ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) -{ +{ // clear debug text mDebugText.clear(); @@ -3540,9 +3543,9 @@ void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount, { mHasPelvisOffset = hasOffset; if ( mHasPelvisOffset ) - { + { //Store off last pelvis to foot value - mLastPelvisToFoot = mPelvisToFoot; + mLastPelvisToFoot = mPelvisToFoot; mPelvisOffset = offsetAmount; mLastPelvisFixup = mPelvisFixup; mPelvisFixup = pelvisFixup; @@ -3552,18 +3555,16 @@ void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount, // postPelvisSetRecalc //------------------------------------------------------------------------ void LLVOAvatar::postPelvisSetRecalc( void ) -{ - computeBodySize(); - mRoot->touch(); - mRoot->updateWorldMatrixChildren(); - dirtyMesh(); - updateHeadOffset(); +{ + mRoot->updateWorldMatrixChildren(); + computeBodySize(); + dirtyMesh(2); } //------------------------------------------------------------------------ -// pelisPoke +// setPelvisOffset //------------------------------------------------------------------------ void LLVOAvatar::setPelvisOffset( F32 pelvisFixupAmount ) -{ +{ mHasPelvisOffset = true; mLastPelvisFixup = mPelvisFixup; mPelvisFixup = pelvisFixupAmount; @@ -4925,22 +4926,6 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) return jointp; } - -//----------------------------------------------------------------------------- -// resetJointPositions -//----------------------------------------------------------------------------- -void LLVOAvatar::resetJointPositions( void ) -{ - avatar_joint_list_t::iterator iter = mSkeleton.begin(); - avatar_joint_list_t::iterator end = mSkeleton.end(); - for (; iter != end; ++iter) - { - (*iter)->restoreOldXform(); - (*iter)->setId( LLUUID::null ); - } - mHasPelvisOffset = false; - mPelvisFixup = mLastPelvisFixup; -} //----------------------------------------------------------------------------- // resetSpecificJointPosition //----------------------------------------------------------------------------- @@ -4967,28 +4952,25 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name ) // resetJointPositionsToDefault //----------------------------------------------------------------------------- void LLVOAvatar::resetJointPositionsToDefault( void ) -{ +{ //Subsequent joints are relative to pelvis avatar_joint_list_t::iterator iter = mSkeleton.begin(); avatar_joint_list_t::iterator end = mSkeleton.end(); for (; iter != end; ++iter) { LLJoint* pJoint = (*iter); - if ( pJoint->doesJointNeedToBeReset() ) - { + if ( pJoint && pJoint->doesJointNeedToBeReset() ) + { pJoint->setId( LLUUID::null ); - //restore joints to default positions, however skip over the pelvis - // *TODO: How does this pointer check skip over pelvis? - if ( pJoint ) - { - pJoint->restoreOldXform(); - } - } + pJoint->restoreOldXform(); + } } + //make sure we don't apply the joint offset mHasPelvisOffset = false; mPelvisFixup = mLastPelvisFixup; - postPelvisSetRecalc(); + + postPelvisSetRecalc(); } //----------------------------------------------------------------------------- // getCharacterPosition() @@ -5604,10 +5586,10 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) { const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj ); if (pSkinData - && pSkinData->mJointNames.size() > 20 // full rig - && pSkinData->mAlternateBindMatrix.size() > 0) - { - LLVOAvatar::resetJointPositionsToDefault(); + && pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig + && pSkinData->mAlternateBindMatrix.size() > 0 ) + { + LLVOAvatar::resetJointPositionsToDefault(); //Need to handle the repositioning of the cam, updating rig data etc during outfit editing //This handles the case where we detach a replacement rig. if ( gAgentCamera.cameraCustomizeAvatar() ) @@ -5625,6 +5607,7 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) //----------------------------------------------------------------------------- BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) { + for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) @@ -5633,7 +5616,9 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) if (attachment->isObjectAttached(viewer_object)) { + cleanupAttachedMesh( viewer_object ); + attachment->removeObject(viewer_object); lldebugs << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << llendl; return TRUE; @@ -6942,7 +6927,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { LL_DEBUGS("Avatar") << "starts" << llendl; - + bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_"; if (gSavedSettings.getBOOL("BlockAvatarAppearanceMessages")) @@ -7153,7 +7138,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } updateMeshTextures(); - //if (enable_verbose_dumps) dumpArchetypeXML(dump_prefix + "process_end"); } -- cgit v1.2.3 From 8b612cab394dc46b52a359b2b24863c49a5bd2d7 Mon Sep 17 00:00:00 2001 From: "prep@lindenlab.com" Date: Tue, 6 Aug 2013 16:44:01 -0500 Subject: Fixes for SH-4321. Also removed some unnecessary transform updates, and unused joint resetting code --- indra/newview/llvoavatar.cpp | 49 +++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 83b7ac9e75..a0a2ce0caf 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1294,6 +1294,8 @@ void LLVOAvatar::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) mImpostorOffset = LLVector3(pos_group.getF32ptr())-getRenderPosition(); mDrawable->setPositionGroup(pos_group); } + + } void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) @@ -3510,6 +3512,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) //mesh vertices need to be reskinned mNeedsSkin = TRUE; + + + return TRUE; } //----------------------------------------------------------------------------- @@ -4927,28 +4932,6 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) return jointp; } //----------------------------------------------------------------------------- -// resetSpecificJointPosition -//----------------------------------------------------------------------------- -void LLVOAvatar::resetSpecificJointPosition( const std::string& name ) -{ - LLJoint* pJoint = mRoot->findJoint( name ); - - if ( pJoint && pJoint->doesJointNeedToBeReset() ) - { - pJoint->restoreOldXform(); - pJoint->setId( LLUUID::null ); - //If we're reseting the pelvis position make sure not to apply offset - if ( name == "mPelvis" ) - { - mHasPelvisOffset = false; - } - } - else - { - llinfos<<"Did not find "<< name.c_str()<doesJointNeedToBeReset() ) + //Reset joints except for pelvis + if ( pJoint && pJoint != pJointPelvis && pJoint->doesJointNeedToBeReset() ) { pJoint->setId( LLUUID::null ); pJoint->restoreOldXform(); } - } - + else + if ( pJoint && pJoint == pJointPelvis && pJoint->doesJointNeedToBeReset() ) + { + pJoint->setId( LLUUID::null ); + pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) ); + pJoint->setJointResetFlag( false ); + } + } + //make sure we don't apply the joint offset mHasPelvisOffset = false; mPelvisFixup = mLastPelvisFixup; - postPelvisSetRecalc(); } //----------------------------------------------------------------------------- @@ -5125,7 +5118,7 @@ BOOL LLVOAvatar::loadSkeletonNode () { attachment->setOriginalPosition(info->mPosition); } - + if (info->mHasRotation) { LLQuaternion rotation; @@ -5195,7 +5188,6 @@ void LLVOAvatar::updateVisualParams() dirtyMesh(); updateHeadOffset(); } - //----------------------------------------------------------------------------- // isActive() //----------------------------------------------------------------------------- @@ -5534,6 +5526,7 @@ void LLVOAvatar::lazyAttach() void LLVOAvatar::resetHUDAttachments() { + for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) -- cgit v1.2.3 From 726a26d4bc3b66dafbc8bdfe238c52a0eff23a74 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 30 Aug 2013 19:05:23 -0400 Subject: SH-4458 FIX "Pant flares rendering as tights after SSA rollout" probably not related to SSA rollout, but we were not triggering the callbacks for baked texture loads, since the avatar object was adding paused callbacks to the callback list without properly setting the flag to indicate paused callbacks. --- indra/newview/llvoavatar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7909570883..0bd51d9c15 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6328,6 +6328,9 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); + + // this could add paused texture callbacks + mLoadedCallbacksPaused |= paused; } } else if (layerset && isUsingLocalAppearance()) @@ -6677,6 +6680,9 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); + + // this could add paused texture callbacks + mLoadedCallbacksPaused |= paused; } } -- cgit v1.2.3 From 25b078f9688a42d3ef01c63ebb9d9dcc9844df21 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 13 Sep 2013 11:18:28 -0400 Subject: log spam cleanup --- indra/newview/llvoavatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0bd51d9c15..93247a3625 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -717,7 +717,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); - lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS("Avatar") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl; mPelvisp = NULL; @@ -813,7 +813,7 @@ LLVOAvatar::~LLVOAvatar() logPendingPhases(); - lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS("Avatar") << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer()); mAttachmentPoints.clear(); @@ -825,7 +825,7 @@ LLVOAvatar::~LLVOAvatar() getPhases().clearPhases(); - lldebugs << "LLVOAvatar Destructor end" << llendl; + LL_DEBUGS("Avatar") << "LLVOAvatar Destructor end" << llendl; } void LLVOAvatar::markDead() -- cgit v1.2.3 From 36bb33b12ab090e2acbc7e00039cdff682882fa4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 18 Sep 2013 17:03:34 -0400 Subject: sunshine cleanup annotations --- indra/newview/llvoavatar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93247a3625..8e293d0c06 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1897,6 +1897,8 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU } else { + // SUNSHINE CLEANUP + llassert(false); LL_DEBUGS("Avatar") << avString() << "get old-bake image from host " << uuid << llendl; LLHost host = getObjectHost(); result = LLViewerTextureManager::getFetchedTexture( @@ -5345,6 +5347,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) //----------------------------------------------------------------------------- // updateSexDependentLayerSets() //----------------------------------------------------------------------------- +// SUNSHINE CLEANUP no upload_bake void LLVOAvatar::updateSexDependentLayerSets( BOOL upload_bake ) { invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); @@ -5829,6 +5832,7 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const // virtual +// SUNSHINE CLEANUP no upload_result void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) { } @@ -5838,6 +5842,7 @@ void LLVOAvatar::invalidateAll() } // virtual +// SUNSHINE CLEANUP no upload_bake void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake ) { if (global_color == mTexSkinColor) @@ -7611,6 +7616,7 @@ void LLVOAvatar::startAppearanceAnimation() } //virtual +// SUNSHINE CLEANUP dead code void LLVOAvatar::bodySizeChanged() { if (isSelf() && !LLAppearanceMgr::instance().isInUpdateAppearanceFromCOF()) -- cgit v1.2.3 From 497d3f4bfc2b6b45574ef871c11c6fb8e6145d63 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 18 Sep 2013 17:04:34 -0400 Subject: sunshine cleanup annotations --- indra/newview/llvoavatar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8e293d0c06..1d25bc1e29 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6896,6 +6896,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe } } +// SUNSHINE CLEANUP - OK to remove the version = 0 case, assume we're at least 1? bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32& appearance_version) { appearance_version = -1; @@ -6926,6 +6927,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 return true; } +// SUNSHINE CLEANUP - if we can assume server baking, we can simplify some code here. //----------------------------------------------------------------------------- // processAvatarAppearance() //----------------------------------------------------------------------------- -- cgit v1.2.3 From 82f147367fb5e4ee4bbe53db01856ea375058825 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 11:10:59 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/newview/llvoavatar.cpp | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1d25bc1e29..bb8682d1fd 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1067,7 +1067,7 @@ void LLVOAvatar::restoreGL() gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); for (U32 i = 0; i < gAgentAvatarp->mBakedTextureDatas.size(); i++) { - gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i), FALSE); + gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i)); } gAgentAvatarp->updateMeshTextures(); } @@ -2132,8 +2132,8 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) if ( mLipSyncActive ) { - if( mOohMorph ) mOohMorph->setWeight(mOohMorph->getMinWeight(), FALSE); - if( mAahMorph ) mAahMorph->setWeight(mAahMorph->getMinWeight(), FALSE); + if( mOohMorph ) mOohMorph->setWeight(mOohMorph->getMinWeight()); + if( mAahMorph ) mAahMorph->setWeight(mAahMorph->getMinWeight()); mLipSyncActive = false; LLCharacter::updateVisualParams(); @@ -2296,7 +2296,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() { if (param->isTweakable()) { - param->stopAnimating(FALSE); + param->stopAnimating(); } } updateVisualParams(); @@ -2319,7 +2319,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() { if (param->isTweakable()) { - param->animate(morph_amt, FALSE); + param->animate(morph_amt); } } } @@ -2372,7 +2372,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) F32 ooh_weight = mOohMorph->getMinWeight() + ooh_morph_amount * (mOohMorph->getMaxWeight() - mOohMorph->getMinWeight()); - mOohMorph->setWeight( ooh_weight, FALSE ); + mOohMorph->setWeight( ooh_weight); } if( mAahMorph ) @@ -2380,7 +2380,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) F32 aah_weight = mAahMorph->getMinWeight() + aah_morph_amount * (mAahMorph->getMaxWeight() - mAahMorph->getMinWeight()); - mAahMorph->setWeight( aah_weight, FALSE ); + mAahMorph->setWeight( aah_weight); } mLipSyncActive = true; @@ -5348,11 +5348,11 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) // updateSexDependentLayerSets() //----------------------------------------------------------------------------- // SUNSHINE CLEANUP no upload_bake -void LLVOAvatar::updateSexDependentLayerSets( BOOL upload_bake ) +void LLVOAvatar::updateSexDependentLayerSets() { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); - invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake ); - invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet); + invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet); + invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet); } //----------------------------------------------------------------------------- @@ -5832,8 +5832,8 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const // virtual -// SUNSHINE CLEANUP no upload_result -void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) +// SUNSHINE CLEANUP no upload_result, no-op +void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset) { } @@ -5843,18 +5843,18 @@ void LLVOAvatar::invalidateAll() // virtual // SUNSHINE CLEANUP no upload_bake -void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake ) +void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) { if (global_color == mTexSkinColor) { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); - invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake ); - invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet); + invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet); + invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet); } else if (global_color == mTexHairColor) { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); - invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet); + invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet); // ! BACKWARDS COMPATIBILITY ! // Fix for dealing with avatars from viewers that don't bake hair. @@ -5876,7 +5876,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL else if (global_color == mTexEyeColor) { // llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl; - invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet); } updateMeshTextures(); } @@ -7078,13 +7078,13 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if(is_first_appearance_message) { //LL_DEBUGS("Avatar") << "param slam " << i << " " << newWeight << llendl; - param->setWeight(newWeight, FALSE); + param->setWeight(newWeight); } else { //LL_DEBUGS("Avatar") << std::setprecision(5) << " param target " << i << " " << param->getWeight() << " -> " << newWeight << llendl; interp_params = TRUE; - param->setAnimationTarget(newWeight, FALSE); + param->setAnimationTarget(newWeight); } } } @@ -7107,7 +7107,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) ESex new_sex = getSex(); if( old_sex != new_sex ) { - updateSexDependentLayerSets( FALSE ); + updateSexDependentLayerSets(); } } @@ -7650,7 +7650,7 @@ void LLVOAvatar::setIsUsingServerBakes(BOOL newval) mUseServerBakes = newval; LLVisualParam* appearance_version_param = getVisualParam(11000); llassert(appearance_version_param); - appearance_version_param->setWeight(newval ? 1.0 : 0.0, false); + appearance_version_param->setWeight(newval ? 1.0 : 0.0); } // virtual -- cgit v1.2.3 From d58e7cfbfcec163345e87c0c5e5f74d01075246b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 13:59:20 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/newview/llvoavatar.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bb8682d1fd..987beedd9e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2300,10 +2300,6 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() } } updateVisualParams(); - if (isSelf()) - { - gAgent.sendAgentSetAppearance(); - } } else { @@ -4123,6 +4119,7 @@ bool LLVOAvatar::allBakedTexturesCompletelyDownloaded() const return allTexturesCompletelyDownloaded(baked_ids); } +// SUNSHINE CLEANUP void LLVOAvatar::bakedTextureOriginCounts(S32 &sb_count, // server-bake, has origin URL. S32 &host_count, // host-based bake, has host. S32 &both_count, // error - both host and URL set. @@ -7617,17 +7614,6 @@ void LLVOAvatar::startAppearanceAnimation() } } -//virtual -// SUNSHINE CLEANUP dead code -void LLVOAvatar::bodySizeChanged() -{ - if (isSelf() && !LLAppearanceMgr::instance().isInUpdateAppearanceFromCOF()) - { // notify simulator of change in size - // but not if we are in the middle of updating appearance - gAgent.sendAgentSetAppearance(); - } -} - BOOL LLVOAvatar::isUsingServerBakes() const { #if 1 -- cgit v1.2.3 From 9a8afee83f40e7239d98e6cc8cf3297408f51920 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 17:52:58 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/newview/llvoavatar.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 987beedd9e..63fdff2320 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5344,7 +5344,6 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) //----------------------------------------------------------------------------- // updateSexDependentLayerSets() //----------------------------------------------------------------------------- -// SUNSHINE CLEANUP no upload_bake void LLVOAvatar::updateSexDependentLayerSets() { invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet); @@ -5829,7 +5828,6 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const // virtual -// SUNSHINE CLEANUP no upload_result, no-op void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset) { } @@ -5839,7 +5837,6 @@ void LLVOAvatar::invalidateAll() } // virtual -// SUNSHINE CLEANUP no upload_bake void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) { if (global_color == mTexSkinColor) -- cgit v1.2.3 From 029642b2bc3a0bc0bec45af5df5d1e0b1b928b91 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 23 Sep 2013 16:48:49 -0400 Subject: SH-3455 WIP - post-SSA cleanup, including removal of mUseServerBakes and related methods --- indra/newview/llvoavatar.cpp | 74 +++++++++----------------------------------- 1 file changed, 15 insertions(+), 59 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 63fdff2320..34ca8199be 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -707,7 +707,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastRezzedStatus(-1), mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), - mUseServerBakes(FALSE), // FIXME DRANO consider using boost::optional, defaulting to unknown. mLastUpdateRequestCOFVersion(-1), mLastUpdateReceivedCOFVersion(-1) { @@ -3013,7 +3012,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) isSelf() ? (all_local_downloaded ? "L" : "l") : "-", all_baked_downloaded ? "B" : "b", mUseLocalAppearance, mIsEditingAppearance, - mUseServerBakes, central_bake_version); + 1, central_bake_version); std::string origin_string = bakedTextureOriginInfo(); debug_line += " [" + origin_string + "]"; S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion(); @@ -4388,19 +4387,6 @@ void LLVOAvatar::updateTextures() { const S32 boost_level = getAvatarBakedBoostLevel(); imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); - // Spam if this is a baked texture, not set to default image, without valid host info - if (isIndexBakedTexture((ETextureIndex)texture_index) - && imagep->getID() != IMG_DEFAULT_AVATAR - && imagep->getID() != IMG_INVISIBLE - && !isUsingServerBakes() - && !imagep->getTargetHost().isOk()) - { - LL_WARNS_ONCE("Texture") << "LLVOAvatar::updateTextures No host for texture " - << imagep->getID() << " for avatar " - << (isSelf() ? "" : getID().asString()) - << " on host " << getRegion()->getHost() << llendl; - } - addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level ); } } @@ -4532,22 +4518,19 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) { llassert(isIndexBakedTexture(ETextureIndex(te))); std::string url = ""; - if (isUsingServerBakes()) + const std::string& appearance_service_url = LLAppearanceMgr::instance().getAppearanceServiceURL(); + if (appearance_service_url.empty()) { - const std::string& appearance_service_url = LLAppearanceMgr::instance().getAppearanceServiceURL(); - if (appearance_service_url.empty()) - { - // Probably a server-side issue if we get here: - llwarns << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << llendl; - return url; - } + // Probably a server-side issue if we get here: + llwarns << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << llendl; + return url; + } - const LLAvatarAppearanceDictionary::TextureEntry* texture_entry = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te); - if (texture_entry != NULL) - { - url = appearance_service_url + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString(); - //llinfos << "baked texture url: " << url << llendl; - } + const LLAvatarAppearanceDictionary::TextureEntry* texture_entry = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te); + if (texture_entry != NULL) + { + url = appearance_service_url + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString(); + //llinfos << "baked texture url: " << url << llendl; } return url; } @@ -6070,7 +6053,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse } record["grid_x"] = LLSD::Integer(grid_x); record["grid_y"] = LLSD::Integer(grid_y); - record["is_using_server_bakes"] = ((bool) isUsingServerBakes()); + record["is_using_server_bakes"] = true; record["is_self"] = isSelf(); if (isAgentAvatarValid()) @@ -7013,8 +6996,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) mLastUpdateReceivedCOFVersion = this_update_cof_version; } - setIsUsingServerBakes(appearance_version > 0); - applyParsedTEMessage(contents.mTEContents); // prevent the overwriting of valid baked textures with invalid baked textures @@ -7024,13 +7005,13 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && mBakedTextureDatas[baked_index].mLastTextureID != IMG_DEFAULT && baked_index != BAKED_SKIRT) { - LL_DEBUGS("Avatar") << avString() << "sb " << (S32) isUsingServerBakes() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << llendl; + LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << llendl; setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } else { - LL_DEBUGS("Avatar") << avString() << "sb " << (S32) isUsingServerBakes() << " baked_index " << (S32) baked_index << " using texture id " + LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using texture id " << getTE(mBakedTextureDatas[baked_index].mTextureIndex)->getID() << llendl; } } @@ -7611,31 +7592,6 @@ void LLVOAvatar::startAppearanceAnimation() } } -BOOL LLVOAvatar::isUsingServerBakes() const -{ -#if 1 - // Sanity check - visual param for appearance version should match mUseServerBakes - LLVisualParam* appearance_version_param = getVisualParam(11000); - llassert(appearance_version_param); - F32 wt = appearance_version_param->getWeight(); - F32 expect_wt = mUseServerBakes ? 1.0 : 0.0; - if (!is_approx_equal(wt,expect_wt)) - { - llwarns << "wt " << wt << " differs from expected " << expect_wt << llendl; - } -#endif - - return mUseServerBakes; -} - -void LLVOAvatar::setIsUsingServerBakes(BOOL newval) -{ - mUseServerBakes = newval; - LLVisualParam* appearance_version_param = getVisualParam(11000); - llassert(appearance_version_param); - appearance_version_param->setWeight(newval ? 1.0 : 0.0); -} - // virtual void LLVOAvatar::removeMissingBakedTextures() { -- cgit v1.2.3 From da398cb12f05f32441e4ca843448ea8f4e2acc95 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 23 Sep 2013 18:15:25 -0400 Subject: SH-3455 WIP - post-SSA cleanup --- indra/newview/llvoavatar.cpp | 52 +++++++------------------------------------- 1 file changed, 8 insertions(+), 44 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 34ca8199be..68ab25abca 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1884,24 +1884,17 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU if (!result) { const std::string url = getImageURL(te,uuid); - if (!url.empty()) + if (url.empty()) { - LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << llendl; - result = LLViewerTextureManager::getFetchedTextureFromUrl( - url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); - if (result->isMissingAsset()) - { - result->setIsMissingAsset(false); - } + llwarns << "unable to determine URL for te " << te << " uuid " << uuid << llendl; + return NULL; } - else + LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << llendl; + result = LLViewerTextureManager::getFetchedTextureFromUrl( + url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); + if (result->isMissingAsset()) { - // SUNSHINE CLEANUP - llassert(false); - LL_DEBUGS("Avatar") << avString() << "get old-bake image from host " << uuid << llendl; - LLHost host = getObjectHost(); - result = LLViewerTextureManager::getFetchedTexture( - uuid, FTT_HOST_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); + result->setIsMissingAsset(false); } } return result; @@ -4118,35 +4111,6 @@ bool LLVOAvatar::allBakedTexturesCompletelyDownloaded() const return allTexturesCompletelyDownloaded(baked_ids); } -// SUNSHINE CLEANUP -void LLVOAvatar::bakedTextureOriginCounts(S32 &sb_count, // server-bake, has origin URL. - S32 &host_count, // host-based bake, has host. - S32 &both_count, // error - both host and URL set. - S32 &neither_count) // error - neither set. -{ - sb_count = host_count = both_count = neither_count = 0; - - std::set baked_ids; - collectBakedTextureUUIDs(baked_ids); - for (std::set::const_iterator it = baked_ids.begin(); it != baked_ids.end(); ++it) - { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); - bool has_url = false, has_host = false; - if (!imagep->getUrl().empty()) - { - has_url = true; - } - if (imagep->getTargetHost().isOk()) - { - has_host = true; - } - if (has_url && !has_host) sb_count++; - else if (has_host && !has_url) host_count++; - else if (has_host && has_url) both_count++; - else if (!has_host && !has_url) neither_count++; - } -} - std::string LLVOAvatar::bakedTextureOriginInfo() { std::string result; -- cgit v1.2.3 From 19ba8d8413c4541da2d76656776545334a09a38f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 24 Sep 2013 15:39:43 -0400 Subject: SH-3455 WIP - removed some handling for appearance version < 1 --- indra/newview/llvoavatar.cpp | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 68ab25abca..49bbf97a23 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6837,7 +6837,6 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe } } -// SUNSHINE CLEANUP - OK to remove the version = 0 case, assume we're at least 1? bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32& appearance_version) { appearance_version = -1; @@ -6848,19 +6847,18 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 { llwarns << "inconsistent appearance_version settings - field: " << contents.mAppearanceVersion << ", param: " << contents.mParamAppearanceVersion << llendl; - return false; } - if (contents.mParamAppearanceVersion >= 0) // use visual param if available. + if (contents.mParamAppearanceVersion > 0) // use visual param if available. { appearance_version = contents.mParamAppearanceVersion; } - if (contents.mAppearanceVersion >= 0) + else if (contents.mAppearanceVersion > 0) { appearance_version = contents.mAppearanceVersion; } - if (appearance_version < 0) // still not set, go with 0. + else // still not set, go with 0. { - appearance_version = 0; + appearance_version = 1; } LL_DEBUGS("Avatar") << "appearance version info - field " << contents.mAppearanceVersion << " param: " << contents.mParamAppearanceVersion @@ -6899,6 +6897,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) llwarns << "bad appearance version info, discarding" << llendl; return; } + llassert(appearance_version > 0); + S32 this_update_cof_version = contents.mCOFVersion; S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion; @@ -6908,15 +6908,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version << " last_update_request_cof_version " << last_update_request_cof_version << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl; - - if (getRegion() && (getRegion()->getCentralBakeVersion()==0)) - { - llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl; - } - if( mFirstTEMessageReceived && (appearance_version == 0)) - { - return; - } } else { @@ -6925,7 +6916,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) // Check for stale update. if (isSelf() - && (appearance_version>0) && (this_update_cof_version < last_update_request_cof_version)) { llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version @@ -6939,6 +6929,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } + // SUNSHINE CLEANUP - is this case OK now? S32 num_params = contents.mParamWeights.size(); if (num_params <= 1) { @@ -6950,15 +6941,13 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } - // No backsies zone - if we get here, the message should be valid and usable. - if (appearance_version > 0) - { - // Note: - // RequestAgentUpdateAppearanceResponder::onRequestRequested() - // assumes that cof version is only updated with server-bake - // appearance messages. - mLastUpdateReceivedCOFVersion = this_update_cof_version; - } + // No backsies zone - if we get here, the message should be valid and usable, will process. + + // Note: + // RequestAgentUpdateAppearanceResponder::onRequestRequested() + // assumes that cof version is only updated with server-bake + // appearance messages. + mLastUpdateReceivedCOFVersion = this_update_cof_version; applyParsedTEMessage(contents.mTEContents); -- cgit v1.2.3 From 230db3e83b4c018d381ad5f4fe77e7f7f384f397 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 4 Oct 2013 12:08:15 -0400 Subject: SH-3455 WIP --- indra/newview/llvoavatar.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 49bbf97a23..df54f26ae7 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6856,7 +6856,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 { appearance_version = contents.mAppearanceVersion; } - else // still not set, go with 0. + else // still not set, go with 1. { appearance_version = 1; } @@ -6866,7 +6866,6 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 return true; } -// SUNSHINE CLEANUP - if we can assume server baking, we can simplify some code here. //----------------------------------------------------------------------------- // processAvatarAppearance() //----------------------------------------------------------------------------- @@ -6898,11 +6897,15 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } llassert(appearance_version > 0); + if (appearance_version > 1) + { + llwarns << "unsupported appearance version " << appearance_version << ", discarding appearance message" << llendl; + return; + } S32 this_update_cof_version = contents.mCOFVersion; S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion; - // Only now that we have result of appearance_version can we decide whether to bail out. if( isSelf() ) { LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version @@ -6941,7 +6944,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } - // No backsies zone - if we get here, the message should be valid and usable, will process. + // No backsies zone - if we get here, the message should be valid and usable, will be processed. // Note: // RequestAgentUpdateAppearanceResponder::onRequestRequested() -- cgit v1.2.3 From b486f6a72c94468f4667d364636d56ea545be188 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 11 Oct 2013 16:52:45 -0400 Subject: SH-4458 SH-3652 FIX Pants flare does not load properly upon an avatar returning Viewer added a new callback when the avatar returned without resetting the timer for last reference to the saved raw image. This created a time window in which new callbacks could get cleared out due to the raw image getting destroyed. Since the callback was removed, pants flare was not properly applied. Appears to be working now. --- indra/newview/llvoavatar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93247a3625..110f571397 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6316,6 +6316,8 @@ void LLVOAvatar::updateMeshTextures() // we'll consider it loaded and use it (rather than // doing compositing). useBakedTexture( baked_img->getID() ); + mLoadedCallbacksPaused |= !isVisible(); + checkTextureLoading(); } else { @@ -6331,6 +6333,7 @@ void LLVOAvatar::updateMeshTextures() // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; + checkTextureLoading(); } } else if (layerset && isUsingLocalAppearance()) -- cgit v1.2.3 From 487ca1bad37883be0325b564ab557a8f77575388 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 14 May 2014 17:50:59 -0400 Subject: v-r -> s-e merge WIP --- indra/newview/llvoavatar.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f5538efc24..9f42776d78 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1996,10 +1996,10 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU if (url.empty()) { - llwarns << "unable to determine URL for te " << te << " uuid " << uuid << llendl; + LL_WARNS() << "unable to determine URL for te " << te << " uuid " << uuid << LL_ENDL; return NULL; } - LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << llendl; + LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL; result = LLViewerTextureManager::getFetchedTextureFromUrl( url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); if (result->isMissingAsset()) @@ -4665,7 +4665,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) if (appearance_service_url.empty()) { // Probably a server-side issue if we get here: - llwarns << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << llendl; + LL_WARNS() << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << LL_ENDL; return url; } @@ -4673,7 +4673,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) if (texture_entry != NULL) { url = appearance_service_url + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString(); - //llinfos << "baked texture url: " << url << llendl; + //LL_INFOS() << "baked texture url: " << url << LL_ENDL; } return url; } @@ -6055,7 +6055,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) } else if (global_color == mTexEyeColor) { -// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl; +// LL_INFOS() << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << LL_ENDL; invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet); } updateMeshTextures(); @@ -6151,7 +6151,7 @@ void LLVOAvatar::startPhase(const std::string& phase_name) bool completed = false; bool found = getPhases().getPhaseValues(phase_name, elapsed, completed); //LL_DEBUGS("Avatar") << avString() << " phase state " << phase_name - // << " found " << found << " elapsed " << elapsed << " completed " << completed << llendl; + // << " found " << found << " elapsed " << elapsed << " completed " << completed << LL_ENDL; if (found) { if (!completed) @@ -7146,7 +7146,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) llassert(appearance_version > 0); if (appearance_version > 1) { - llwarns << "unsupported appearance version " << appearance_version << ", discarding appearance message" << llendl; + LL_WARNS() << "unsupported appearance version " << appearance_version << ", discarding appearance message" << LL_ENDL; return; } @@ -7157,7 +7157,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version << " last_update_request_cof_version " << last_update_request_cof_version - << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl; + << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL; } else { @@ -7208,14 +7208,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && mBakedTextureDatas[baked_index].mLastTextureID != IMG_DEFAULT && baked_index != BAKED_SKIRT) { - LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << llendl; + LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL; setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } else { LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using texture id " - << getTE(mBakedTextureDatas[baked_index].mTextureIndex)->getID() << llendl; + << getTE(mBakedTextureDatas[baked_index].mTextureIndex)->getID() << LL_ENDL; } } @@ -7256,7 +7256,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if(is_first_appearance_message) { - //LL_DEBUGS("Avatar") << "param slam " << i << " " << newWeight << llendl; + //LL_DEBUGS("Avatar") << "param slam " << i << " " << newWeight << LL_ENDL; param->setWeight(newWeight); } else @@ -7273,7 +7273,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << LL_ENDL; } - LL_DEBUGS("Avatar") << "Changed " << params_changed_count << " params" << llendl; + LL_DEBUGS("Avatar") << "Changed " << params_changed_count << " params" << LL_ENDL; if (params_changed) { if (interp_params) -- cgit v1.2.3