From 07850410b543a42b70641e77d64d7c0bd0da4373 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Tue, 19 Mar 2013 02:05:53 +0100 Subject: [PATCH 01/12] SH-3909 Support avatar height offset Adding a new visual param that allows users to manually adjust an offset for how far off the ground (+ or -) their avatar's root bone is. Supports the +-2m range people are used to adjusting in their viewers, but new implementation should support server-generated appearances. Conflicts: indra/newview/character/avatar_lad.xml indra/newview/llagent.cpp indra/newview/llcallingcard.cpp indra/newview/skins/default/xui/en/strings.xml --- indra/llappearance/llavatarappearance.cpp | 9 ++++++++- indra/llappearance/llavatarappearance.h | 1 + indra/newview/character/avatar_lad.xml | 17 +++++++++++++++++ indra/newview/llagent.cpp | 4 ++-- indra/newview/llcallingcard.cpp | 2 +- indra/newview/llvoavatar.cpp | 10 ++++++---- .../newview/skins/default/xui/en-us/strings.xml | 1 + 7 files changed, 36 insertions(+), 8 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index d186ce79b..78024ebfd 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -465,6 +465,10 @@ void LLAvatarAppearance::computeBodySize() LLVector3 foot = mFootLeftp->getPosition(); + F32 old_offset = mAvatarOffset.mV[VZ]; + + 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] - @@ -484,7 +488,10 @@ 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(); diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 21a813cc8..93758b54c 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -165,6 +165,7 @@ protected: //-------------------------------------------------------------------- public: LLVector3 mBodySize; + LLVector3 mAvatarOffset; protected: F32 mPelvisToFoot; diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 23d23b5c2..3afea9027 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -823,6 +823,23 @@ + + + + + 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 ); @@ -4527,7 +4527,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 - LLVector3 body_size = gAgentAvatarp->mBodySize; + LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset; static LLCachedControl x_off("AscentAvatarXModifier"); static LLCachedControl y_off("AscentAvatarYModifier"); diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 34b8785c9..1481f49b4 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -190,7 +190,7 @@ LLVector3d LLAvatarTracker::getGlobalPos() global_pos = avatarp->getPositionGlobal(); // HACK - for making the tracker point above the avatar's head // rather than its groin - global_pos.mdV[VZ] += 0.7f * avatarp->mBodySize.mV[VZ]; + global_pos.mdV[VZ] += 0.7f * (avatarp->mBodySize.mV[VZ] + avatarp->mAvatarOffset.mV[VZ]); mTrackingData->mGlobalPositionEstimate = global_pos; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9b87e221e..c2b95a33f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2489,7 +2489,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 ) @@ -3489,12 +3489,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; @@ -3826,6 +3826,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]); diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index b11c3a9e7..0bb032926 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -3617,6 +3617,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Higher Hip Length Hip Width +Hover In Inner Shadow Color Inner Shadow Opacity From 9ff1c8b8795f48f392db44a43760932fa51c5f84 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 28 Feb 2013 23:32:00 +0000 Subject: [PATCH 02/12] SH-3798 FIX avatar skins look dull Wearable parsing error caused last texture in some assets to fail to parse. Parser now does not throw an error if the wearable does not end in a newline --- indra/llappearance/llwearable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index e6f628436..44e0bdef8 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -504,7 +504,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'); } @@ -826,4 +826,4 @@ std::string terse_F32_to_string(F32 f) r.erase(0, 1); } return r; -} \ No newline at end of file +} From 417973055285ccf76e1de6408e1c1fc9d0d51348 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 15:17:31 -0500 Subject: [PATCH 03/12] Increase number of retries for requestServerAppearanceUpdate() --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a5d67e356..9f648ec66 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3404,7 +3404,7 @@ public: virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return requestAgentUpdateAppearance_timeout; } RequestAgentUpdateAppearanceResponder() { - mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5); + mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10); } virtual ~RequestAgentUpdateAppearanceResponder() From bb528a4398aaeb866ca7960b63e4724c951489af Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 1 Mar 2013 13:50:21 -0500 Subject: [PATCH 04/12] Periodic log messages to explain why user is still clouded, if they are --- indra/newview/llvoavatarself.cpp | 52 ++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index eb8cec7dc..eb73beac5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1977,19 +1977,41 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() BOOL LLVOAvatarSelf::getIsCloud() const { - // do we have our body parts? - if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0) + // Let people know why they're clouded without spamming them into oblivion. + bool do_warn = false; + static LLTimer time_since_notice; + F32 update_freq = 30.0; + if (time_since_notice.getElapsedTimeF32() > update_freq) { - lldebugs << "No body parts" << llendl; + time_since_notice.reset(); + do_warn = true; + } + + // do we have our body parts? + S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE); + S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR); + S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES); + S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN); + if (!shape_count || !hair_count || !eye_count || !skin_count) + { + if (do_warn) + { + llinfos << "Self is clouded due to missing one or more required body parts: " + << (shape_count ? "" : "SHAPE ") + << (hair_count ? "" : "HAIR ") + << (eye_count ? "" : "EYES ") + << (skin_count ? "" : "SKIN ") + << llendl; + } return TRUE; } if (!isTextureDefined(TEX_HAIR, 0)) { - lldebugs << "No hair texture" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because of no hair texture" << llendl; + } return TRUE; } @@ -1998,14 +2020,20 @@ BOOL LLVOAvatarSelf::getIsCloud() const if (!isLocalTextureDataAvailable(getLayerSet(BAKED_LOWER)) && (!isTextureDefined(TEX_LOWER_BAKED, 0))) { - lldebugs << "Lower textures not baked" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because lower textures not baked" << llendl; + } return TRUE; } if (!isLocalTextureDataAvailable(getLayerSet(BAKED_UPPER)) && (!isTextureDefined(TEX_UPPER_BAKED, 0))) { - lldebugs << "Upper textures not baked" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because upper textures not baked" << llendl; + } return TRUE; } @@ -2022,7 +2050,11 @@ BOOL LLVOAvatarSelf::getIsCloud() const const LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 ); if (!baked_img || !baked_img->hasGLTexture()) { - lldebugs << "Texture at index " << i << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because texture at index " << i + << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + } return TRUE; } } From 08666859718406d62c402c3d60898f6d8eec961b Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 6 Mar 2013 17:20:33 -0500 Subject: [PATCH 05/12] SH-3954 SH-3941 SH-3910 FIX local appearance does not update We suppress texture downloads for local textures not needed with server side baking. We need to explicitly re-set texture priority for local textures when entering appearance mode. --- indra/newview/llvoavatarself.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index eb73beac5..b6e00279e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3002,8 +3002,9 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) gAgentAvatarp->idleUpdateAppearanceAnimation(); #endif - gAgentAvatarp->invalidateAll(); - gAgentAvatarp->updateMeshTextures(); + gAgentAvatarp->updateTextures(); // call updateTextureStats + gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates + gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh. } } From 554a03d569e290688c6022e2b7697720600409cc Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 1 Mar 2013 19:39:47 -0500 Subject: [PATCH 06/12] SH-3649 WIP newly created pants do not show up on mac/windows. Added an initializer for the wearable definition version when creating a new wearable. Should fix the issue but need to test. --- indra/newview/llwearablelist.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 507ce57e7..ef1a953f5 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -249,6 +249,8 @@ LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type, perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER); wearable->setPermissions(perm); + wearable->setDefinitionVersion(LLWearable::getCurrentDefinitionVersion()); + // Description and sale info have default values. wearable->setParamsToDefaults(); wearable->setTexturesToDefaults(); From 707f3959f96a5738ce297a85f9cffbcad074b005 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 8 Mar 2013 18:45:33 -0500 Subject: [PATCH 07/12] SH-3941 SH-3954 FIX local appearance does not update properly We were using an indicator of whether there *was* a baked texture to whether we were *using* a baked texture. Switched to one of the (several) proper indicators of whether a baked texture was in use. This should allow local texture data to get marked for download when we enter appearance mode. Local testing confirms that old apperances linger for a second or two, but are soon replaced by the correct local renders. --- indra/newview/llvoavatar.cpp | 2 +- indra/newview/llvoavatarself.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c2b95a33f..3a80cb049 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5064,7 +5064,7 @@ void LLVOAvatar::updateTextures() const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; if (texture_dict->mIsLocalTexture) { - addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); + addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, mBakedTextureDatas[baked_index].mIsUsed); } } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b6e00279e..4848dcfc2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3002,9 +3002,9 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) gAgentAvatarp->idleUpdateAppearanceAnimation(); #endif - gAgentAvatarp->updateTextures(); // call updateTextureStats gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh. + gAgentAvatarp->updateTextures(); // call updateTextureStats } } From 45e6c3f2e47492d27883067ef7edb30b4a028d4b Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 14 Mar 2013 14:43:11 -0400 Subject: [PATCH 08/12] modified_cof_cb() issues a updateAppearanceFromCOF() right before this function - removed extra update call. Sh-3650 & Sh-3985 --- indra/newview/llvoavatarself.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4848dcfc2..707996070 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3027,9 +3027,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) { gAgentCamera.changeCameraToDefault(); gAgentCamera.resetView(); - } - - LLAppearanceMgr::instance().updateAppearanceFromCOF(); + } } } From 7ef75fef4f9e7b59ea336fa2a7e5f69e91b5feab Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 18 Mar 2013 18:10:40 -0400 Subject: [PATCH 09/12] Fix for sh-4014. This was a regression caused by fix for sh-3650. --- indra/newview/llvoavatarself.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 707996070..734a60f22 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3027,7 +3027,12 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) { gAgentCamera.changeCameraToDefault(); gAgentCamera.resetView(); - } + } + + if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion()) + { + LLAppearanceMgr::instance().requestServerAppearanceUpdate(); + } } } From 40133643c0ffa1277f3722b2ad3793bc023f309d Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 22 Mar 2013 21:52:17 +0100 Subject: [PATCH 10/12] Revert "SH-3941 SH-3954 FIX local appearance does not update properly" This causes SUN-57 This reverts commit 707f3959f96a5738ce297a85f9cffbcad074b005. --- indra/newview/llvoavatar.cpp | 2 +- indra/newview/llvoavatarself.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3a80cb049..c2b95a33f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5064,7 +5064,7 @@ void LLVOAvatar::updateTextures() const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; if (texture_dict->mIsLocalTexture) { - addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, mBakedTextureDatas[baked_index].mIsUsed); + addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); } } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 734a60f22..4fff460b0 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3002,9 +3002,9 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) gAgentAvatarp->idleUpdateAppearanceAnimation(); #endif + gAgentAvatarp->updateTextures(); // call updateTextureStats gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh. - gAgentAvatarp->updateTextures(); // call updateTextureStats } } From f1cf73b8af6261ad0cda34f19c564aa00dff72a0 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 22 Mar 2013 22:40:37 +0100 Subject: [PATCH 11/12] Reverted addition of soon to be obsolete way of setting z offset to quick prefs --- .../skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml index 45889993a..51ac9c574 100644 --- a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml +++ b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml @@ -2,7 +2,6 @@ - From ef6549ce3291276e1d6e7962a7bf9c6e77c567b2 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 22 Mar 2013 22:43:31 +0100 Subject: [PATCH 12/12] Set default network buffer size to 6000ms for music streaming --- indra/newview/app_settings/settings_sh.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings_sh.xml b/indra/newview/app_settings/settings_sh.xml index dedf2e435..7d65a20d8 100644 --- a/indra/newview/app_settings/settings_sh.xml +++ b/indra/newview/app_settings/settings_sh.xml @@ -50,7 +50,7 @@ Type U32 Value - 15000 + 6000 SHFMODExDecodeBufferSize