diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 2291e46db5..056a4425e1 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -599,7 +599,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact LLDataPackerBinaryBuffer dp(anim_data, anim_file_size); - if (!deserialize(dp)) + if (!deserialize(dp, getID())) { LL_WARNS() << "Failed to decode asset for animation " << getName() << ":" << getID() << LL_ENDL; mAssetStatus = ASSET_FETCH_FAILED; @@ -1224,7 +1224,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 //----------------------------------------------------------------------------- // deserialize() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) +BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id) { BOOL old_version = FALSE; mJointMotionList = new LLKeyframeMotion::JointMotionList; @@ -1238,14 +1238,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU16(version, "version")) { - LL_WARNS() << "can't read version number" << LL_ENDL; + LL_WARNS() << "can't read version number for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (!dp.unpackU16(sub_version, "sub_version")) { - LL_WARNS() << "can't read sub version number" << LL_ENDL; + LL_WARNS() << "can't read sub version number for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1257,17 +1257,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION) { #if LL_RELEASE - LL_WARNS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; + LL_WARNS() << "Bad animation version " << version << "." << sub_version + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; #else - LL_ERRS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; + LL_ERRS() << "Bad animation version " << version << "." << sub_version + << " for animation " << asset_id << LL_ENDL; #endif } if (!dp.unpackS32(temp_priority, "base_priority")) { - LL_WARNS() << "can't read animation base_priority" << LL_ENDL; + LL_WARNS() << "can't read animation base_priority" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1280,7 +1283,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY) { - LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority << LL_ENDL; + LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1290,7 +1294,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackF32(mJointMotionList->mDuration, "duration")) { - LL_WARNS() << "can't read duration" << LL_ENDL; + LL_WARNS() << "can't read duration" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1298,7 +1303,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (mJointMotionList->mDuration > MAX_ANIM_DURATION || !llfinite(mJointMotionList->mDuration)) { - LL_WARNS() << "invalid animation duration" << LL_ENDL; + LL_WARNS() << "invalid animation duration" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1308,14 +1314,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name")) { - LL_WARNS() << "can't read optional_emote_animation" << LL_ENDL; + LL_WARNS() << "can't read optional_emote_animation" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if(mJointMotionList->mEmoteName==mID.asString()) { - LL_WARNS() << "Malformed animation mEmoteName==mID" << LL_ENDL; + LL_WARNS() << "Malformed animation mEmoteName==mID" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1326,7 +1334,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mLoopInPoint, "loop_in_point") || !llfinite(mJointMotionList->mLoopInPoint)) { - LL_WARNS() << "can't read loop point" << LL_ENDL; + LL_WARNS() << "can't read loop point" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1334,14 +1343,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mLoopOutPoint, "loop_out_point") || !llfinite(mJointMotionList->mLoopOutPoint)) { - LL_WARNS() << "can't read loop point" << LL_ENDL; + LL_WARNS() << "can't read loop point" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (!dp.unpackS32(mJointMotionList->mLoop, "loop")) { - LL_WARNS() << "can't read loop" << LL_ENDL; + LL_WARNS() << "can't read loop" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1352,7 +1363,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mEaseInDuration, "ease_in_duration") || !llfinite(mJointMotionList->mEaseInDuration)) { - LL_WARNS() << "can't read easeIn" << LL_ENDL; + LL_WARNS() << "can't read easeIn" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1360,7 +1372,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mEaseOutDuration, "ease_out_duration") || !llfinite(mJointMotionList->mEaseOutDuration)) { - LL_WARNS() << "can't read easeOut" << LL_ENDL; + LL_WARNS() << "can't read easeOut" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1371,14 +1384,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 word; if (!dp.unpackU32(word, "hand_pose")) { - LL_WARNS() << "can't read hand pose" << LL_ENDL; + LL_WARNS() << "can't read hand pose" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if(word > LLHandMotion::NUM_HAND_POSES) { - LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << LL_ENDL; + LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1391,20 +1406,23 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 num_motions = 0; if (!dp.unpackU32(num_motions, "num_joints")) { - LL_WARNS() << "can't read number of joints" << LL_ENDL; + LL_WARNS() << "can't read number of joints" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (num_motions == 0) { - LL_WARNS() << "no joints in animation" << LL_ENDL; + LL_WARNS() << "no joints" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } else if (num_motions > LL_CHARACTER_MAX_ANIMATED_JOINTS) { - LL_WARNS() << "too many joints in animation" << LL_ENDL; + LL_WARNS() << "too many joints" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1426,14 +1444,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) std::string joint_name; if (!dp.unpackString(joint_name, "joint_name")) { - LL_WARNS() << "can't read joint name" << LL_ENDL; + LL_WARNS() << "can't read joint name" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (joint_name == "mScreen" || joint_name == "mRoot") { - LL_WARNS() << "attempted to animate special " << joint_name << " joint" << LL_ENDL; + LL_WARNS() << "attempted to animate special " << joint_name << " joint" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1448,14 +1468,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) // LL_INFOS() << " joint: " << joint_name << LL_ENDL; if ((joint_num >= (S32)LL_CHARACTER_MAX_ANIMATED_JOINTS) || (joint_num < 0)) { - LL_WARNS() << "Joint will be omitted from animation: joint_num " << joint_num << " is outside of legal range [0-" - << LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << joint->getName() << LL_ENDL; + LL_WARNS() << "Joint will be omitted from animation: joint_num " << joint_num + << " is outside of legal range [0-" + << LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << joint->getName() + << " for animation " << asset_id << LL_ENDL; joint = NULL; } } else { - LL_WARNS() << "joint not found: " << joint_name << LL_ENDL; + LL_WARNS() << "invalid joint name: " << joint_name + << " for animation " << asset_id << LL_ENDL; //return FALSE; } @@ -1472,14 +1495,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 joint_priority; if (!dp.unpackS32(joint_priority, "joint_priority")) { - LL_WARNS() << "can't read joint priority." << LL_ENDL; + LL_WARNS() << "can't read joint priority." + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (joint_priority < LLJoint::USE_MOTION_PRIORITY) { - LL_WARNS() << "joint priority unknown - too low." << LL_ENDL; + LL_WARNS() << "joint priority unknown - too low." + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1498,7 +1523,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys") || joint_motion->mRotationCurve.mNumKeys < 0) { - LL_WARNS() << "can't read number of rotation keys" << LL_ENDL; + LL_WARNS() << "can't read number of rotation keys" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1524,7 +1550,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(time, "time") || !llfinite(time)) { - LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read rotation key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1534,7 +1561,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read rotation key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1543,7 +1571,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (time < 0 || time > mJointMotionList->mDuration) { - LL_WARNS() << "invalid frame time" << LL_ENDL; + LL_WARNS() << "invalid frame time" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1578,13 +1607,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(rot_key.mRotation.isFinite()) ) { - LL_WARNS() << "non-finite angle in rotation key" << LL_ENDL; + LL_WARNS() << "non-finite angle in rotation key" + << " for animation " << asset_id << LL_ENDL; success = FALSE; } if (!success) { - LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read rotation key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1597,7 +1628,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys") || joint_motion->mPositionCurve.mNumKeys < 0) { - LL_WARNS() << "can't read number of position keys" << LL_ENDL; + LL_WARNS() << "can't read number of position keys" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1623,7 +1655,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(pos_key.mTime, "time") || !llfinite(pos_key.mTime)) { - LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read position key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1632,7 +1665,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read position key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1667,13 +1701,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(pos_key.mPosition.isFinite()) ) { - LL_WARNS() << "non-finite position in key" << LL_ENDL; + LL_WARNS() << "non-finite position in key" + << " for animation " << asset_id << LL_ENDL; success = FALSE; } if (!success) { - LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; + LL_WARNS() << "can't read position key (" << k << ")" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1695,14 +1731,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 num_constraints = 0; if (!dp.unpackS32(num_constraints, "num_constraints")) { - LL_WARNS() << "can't read number of constraints" << LL_ENDL; + LL_WARNS() << "can't read number of constraints" + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0) { - LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints << LL_ENDL; + LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints + << " for animation " << asset_id << LL_ENDL; } else { @@ -1718,7 +1756,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU8(byte, "chain_length")) { - LL_WARNS() << "can't read constraint chain length" << LL_ENDL; + LL_WARNS() << "can't read constraint chain length" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1727,7 +1766,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions()) { - LL_WARNS() << "invalid constraint chain length" << LL_ENDL; + LL_WARNS() << "invalid constraint chain length" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1735,7 +1775,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU8(byte, "constraint_type")) { - LL_WARNS() << "can't read constraint type" << LL_ENDL; + LL_WARNS() << "can't read constraint type" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1743,7 +1784,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( byte >= NUM_CONSTRAINT_TYPES ) { - LL_WARNS() << "invalid constraint type" << LL_ENDL; + LL_WARNS() << "invalid constraint type" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1754,7 +1796,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U8 bin_data[BIN_DATA_LENGTH+1]; if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "source_volume")) { - LL_WARNS() << "can't read source volume name" << LL_ENDL; + LL_WARNS() << "can't read source volume name" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1766,7 +1809,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) { - LL_WARNS() << "can't read constraint source offset" << LL_ENDL; + LL_WARNS() << "can't read constraint source offset" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1774,7 +1818,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(constraintp->mSourceConstraintOffset.isFinite()) ) { - LL_WARNS() << "non-finite constraint source offset" << LL_ENDL; + LL_WARNS() << "non-finite constraint source offset" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1782,7 +1827,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) { - LL_WARNS() << "can't read target volume name" << LL_ENDL; + LL_WARNS() << "can't read target volume name" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1803,7 +1849,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset")) { - LL_WARNS() << "can't read constraint target offset" << LL_ENDL; + LL_WARNS() << "can't read constraint target offset" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1811,7 +1858,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(constraintp->mTargetConstraintOffset.isFinite()) ) { - LL_WARNS() << "non-finite constraint target offset" << LL_ENDL; + LL_WARNS() << "non-finite constraint target offset" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1819,7 +1867,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) { - LL_WARNS() << "can't read constraint target direction" << LL_ENDL; + LL_WARNS() << "can't read constraint target direction" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1827,7 +1876,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(constraintp->mTargetConstraintDir.isFinite()) ) { - LL_WARNS() << "non-finite constraint target direction" << LL_ENDL; + LL_WARNS() << "non-finite constraint target direction" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1841,7 +1891,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseInStartTime, "ease_in_start") || !llfinite(constraintp->mEaseInStartTime)) { - LL_WARNS() << "can't read constraint ease in start time" << LL_ENDL; + LL_WARNS() << "can't read constraint ease in start time" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1849,7 +1900,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime)) { - LL_WARNS() << "can't read constraint ease in stop time" << LL_ENDL; + LL_WARNS() << "can't read constraint ease in stop time" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1857,7 +1909,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime)) { - LL_WARNS() << "can't read constraint ease out start time" << LL_ENDL; + LL_WARNS() << "can't read constraint ease out start time" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1865,7 +1918,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime)) { - LL_WARNS() << "can't read constraint ease out stop time" << LL_ENDL; + LL_WARNS() << "can't read constraint ease out stop time" + << " for animation " << asset_id << LL_ENDL; delete constraintp; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; @@ -1888,7 +1942,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!parent) { LL_WARNS() << "Joint with no parent: " << joint->getName() - << " Emote: " << mJointMotionList->mEmoteName << LL_ENDL; + << " Emote: " << mJointMotionList->mEmoteName + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1900,7 +1955,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if ( !constraint_joint ) { - LL_WARNS() << "Invalid joint " << j << LL_ENDL; + LL_WARNS() << "Invalid joint " << j + << " for animation " << asset_id << LL_ENDL; delete mJointMotionList; // Mem-leak fix by Drake Arconis return FALSE; } @@ -1913,7 +1969,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } if (constraintp->mJointStateIndices[i] < 0 ) { - LL_WARNS() << "No joint index for constraint " << i << LL_ENDL; + LL_WARNS() << "No joint index for constraint " << i + << " for animation " << asset_id << LL_ENDL; // Mem-leak fix by Drake Arconis //delete constraintp; delete mJointMotionList; @@ -2325,7 +2382,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, // LLDataPackerBinaryBuffer dp(buffer, size); - if (motionp->deserialize(dp)) + if (motionp->deserialize(dp, asset_uuid)) { motionp->mAssetStatus = ASSET_LOADED; } diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index f1fa56d731..15c5c7c6c0 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -151,7 +151,7 @@ public: public: U32 getFileSize(); BOOL serialize(LLDataPacker& dp) const; - BOOL deserialize(LLDataPacker& dp); + BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id); BOOL isLoaded() { return mJointMotionList != NULL; } void dumpToFile(const std::string& name); diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 5e0c343051..f2619cb605 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -374,7 +374,7 @@ BOOL LLFloaterBvhPreview::loadBVH() loaderp->serialize(dp); dp.reset(); LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL; - BOOL success = motionp && motionp->deserialize(dp); + BOOL success = motionp && motionp->deserialize(dp, mMotionID); LL_INFOS("BVH") << "Done" << LL_ENDL; delete []buffer;