From ddaa0d84ccbd68eeacb81361360bfcdd5d3dfe4a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 29 Apr 2022 19:06:22 +0300 Subject: SL-17206 FIXED Unable to move an avatar after fall on the ground --- indra/llcharacter/llkeyframemotion.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index fe9de30f0a..f2584ee6f3 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1343,6 +1343,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id) return FALSE; } + //SL-17206 hack to alter Female_land loop setting, while current behavior won't be changed serverside + LLUUID const female_land_anim("ca1baf4d-0a18-5a1f-0330-e4bd1e71f09e"); + if (female_land_anim == asset_id) + { + LL_WARNS() << "Animation(" << female_land_anim << ") won't be looped." << LL_ENDL; + mJointMotionList->mLoop = FALSE; + } + //------------------------------------------------------------------------- // get easeIn and easeOut //------------------------------------------------------------------------- -- cgit v1.2.3 From f7edcab9c3187a2dc797db614ba0302ed7eed578 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 7 Dec 2018 21:27:12 +0000 Subject: SL-288, SL-10163 - allow joint aliases, but otherwise reject upload of animations containing invalid joint names # Conflicts: # indra/newview/llviewerassetupload.cpp # indra/newview/llvoavatar.cpp --- indra/llcharacter/llkeyframemotion.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index f2584ee6f3..daff69c73a 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1221,8 +1221,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 //----------------------------------------------------------------------------- // deserialize() +// +// allow_invalid_joints should be true when handling existing content, to avoid breakage. +// During upload, we should be more restrictive and reject such animations. //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id) +BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints) { BOOL old_version = FALSE; mJointMotionList = new LLKeyframeMotion::JointMotionList; @@ -1464,7 +1467,10 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id) { LL_WARNS() << "invalid joint name: " << joint_name << " for animation " << asset_id << LL_ENDL; - //return FALSE; + if (!allow_invalid_joints) + { + return FALSE; + } } joint_motion->mJointName = joint_name; -- cgit v1.2.3 From 307db06310d6d3dc5a38da5543d0f074266fb12a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 6 Dec 2018 21:58:14 +0000 Subject: SL-10163 - allow joint aliases in animation uploads. Names are canonicalized before sending to simulator. # Conflicts: # indra/newview/llviewerassetupload.cpp # indra/newview/llvoavatar.cpp # scripts/content_tools/anim_tool.py --- indra/llcharacter/llkeyframemotion.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index daff69c73a..1eee736b48 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1453,6 +1453,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (joint) { S32 joint_num = joint->getJointNum(); + joint_name = joint->getName(); // canonical name in case this is an alias. // LL_INFOS() << " joint: " << joint_name << LL_ENDL; if ((joint_num >= (S32)LL_CHARACTER_MAX_ANIMATED_JOINTS) || (joint_num < 0)) { @@ -2109,8 +2110,9 @@ U32 LLKeyframeMotion::getFileSize() //----------------------------------------------------------------------------- // dumpToFile() //----------------------------------------------------------------------------- -void LLKeyframeMotion::dumpToFile(const std::string& name) +bool LLKeyframeMotion::dumpToFile(const std::string& name) { + bool succ = false; if (isLoaded()) { std::string outfile_base; @@ -2127,10 +2129,24 @@ void LLKeyframeMotion::dumpToFile(const std::string& name) const LLUUID& id = getID(); outfile_base = id.asString(); } - std::string outfilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfile_base + ".anim"); + + if (gDirUtilp->getExtension(outfile_base).empty()) + { + outfile_base += ".anim"; + } + std::string outfilename; + if (gDirUtilp->getDirName(outfile_base).empty()) + { + outfilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfile_base); + } + else + { + outfilename = outfile_base; + } if (LLFile::isfile(outfilename)) { - return; + LL_WARNS() << outfilename << " already exists, write failed" << LL_ENDL; + return false; } S32 file_size = getFileSize(); @@ -2144,11 +2160,13 @@ void LLKeyframeMotion::dumpToFile(const std::string& name) outfile.open(outfilename, LL_APR_WPB); if (outfile.getFileHandle()) { - outfile.write(buffer, file_size); + S32 wrote_bytes = outfile.write(buffer, file_size); + succ = (wrote_bytes == file_size); } } delete [] buffer; } + return succ; } //----------------------------------------------------------------------------- -- cgit v1.2.3 From ef7254a68ab09abc15cc3f51406a1cebf652f205 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 May 2022 16:15:14 +0300 Subject: SL-17206 Unable to move an avatar after a strong fall on the ground --- indra/llcharacter/llkeyframemotion.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 1eee736b48..13030df483 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1348,9 +1348,10 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo //SL-17206 hack to alter Female_land loop setting, while current behavior won't be changed serverside LLUUID const female_land_anim("ca1baf4d-0a18-5a1f-0330-e4bd1e71f09e"); - if (female_land_anim == asset_id) + LLUUID const formal_female_land_anim("6a9a173b-61fa-3ad5-01fa-a851cfc5f66a"); + if (female_land_anim == asset_id || formal_female_land_anim == asset_id) { - LL_WARNS() << "Animation(" << female_land_anim << ") won't be looped." << LL_ENDL; + LL_WARNS() << "Animation(" << asset_id << ") won't be looped." << LL_ENDL; mJointMotionList->mLoop = FALSE; } -- cgit v1.2.3