diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-05-11 18:13:59 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-05-11 18:13:59 -0400 |
commit | fd9df262d5885341281154f1c05063d21bc8d151 (patch) | |
tree | 6fd5ea812ef3f511ad64d5fb10e68a191005053c /indra | |
parent | efe5cbc205a9bd5047d1766abaa490a5977a8455 (diff) |
SL-111 WIP - bug fixes and diagnostic output
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llcharacter/llbvhloader.cpp | 33 | ||||
-rwxr-xr-x | indra/newview/app_settings/logcontrol.xml | 1 | ||||
-rwxr-xr-x | indra/newview/llfloaterbvhpreview.cpp | 5 |
3 files changed, 18 insertions, 21 deletions
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 0cd6c2abc1..a80c38705d 100755 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -163,10 +163,10 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error errorLine = 0; mStatus = loadTranslationTable("anim.ini"); loadStatus = mStatus; - LL_INFOS()<<"Load Status 00 : "<< loadStatus << LL_ENDL; + LL_INFOS("BVH") << "Load Status 00 : " << loadStatus << LL_ENDL; if (mStatus == E_ST_NO_XLT_FILE) { - LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; + LL_WARNS("BVH") << "NOTE: No translation table found." << LL_ENDL; loadStatus = mStatus; return; } @@ -174,7 +174,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error { if (mStatus != E_ST_OK) { - LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; + LL_WARNS("BVH") << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; errorLine = getLineNumber(); loadStatus = mStatus; return; @@ -185,12 +185,12 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error S32 error_line; mStatus = loadBVHFile(buffer, error_text, error_line); - LL_INFOS("BVH") << "Raw data from file" << LL_ENDL; + LL_DEBUGS("BVH") << "Raw data from file" << LL_ENDL; dumpBVHInfo(); if (mStatus != E_ST_OK) { - LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; + LL_WARNS("BVH") << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; loadStatus = mStatus; errorLine = getLineNumber(); return; @@ -199,7 +199,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error applyTranslations(); optimize(); - LL_INFOS("BVH") << "Ater optimize" << LL_ENDL; + LL_INFOS("BVH") << "After optimize" << LL_ENDL; dumpBVHInfo(); mInitialized = TRUE; @@ -232,7 +232,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) if (!fp) return E_ST_NO_XLT_FILE; - LL_INFOS() << "NOTE: Loading translation table: " << fileName << LL_ENDL; + LL_INFOS("BVH") << "NOTE: Loading translation table: " << fileName << LL_ENDL; //-------------------------------------------------------------------- // register file to be closed on function exit @@ -677,7 +677,7 @@ void LLBVHLoader::dumpBVHInfo() for (U32 j=0; j<mJoints.size(); j++) { Joint *joint = mJoints[j]; - LL_INFOS() << joint->mName << LL_ENDL; + LL_DEBUGS("BVH") << joint->mName << LL_ENDL; for (S32 i=0; i<mNumFrames; i++) { Key &prevkey = joint->mKeys[llmax(i-1,0)]; @@ -691,9 +691,9 @@ void LLBVHLoader::dumpBVHInfo() (key.mRot[2] != prevkey.mRot[2]) ) { - LL_INFOS() << "FRAME " << i - << " POS " << key.mPos[0] << "," << key.mPos[1] << "," << key.mPos[2] - << " ROT " << key.mRot[0] << "," << key.mRot[1] << "," << key.mRot[2] << LL_ENDL; + LL_DEBUGS("BVH") << "FRAME " << i + << " POS " << key.mPos[0] << "," << key.mPos[1] << "," << key.mPos[2] + << " ROT " << key.mRot[0] << "," << key.mRot[1] << "," << key.mRot[2] << LL_ENDL; } } } @@ -824,14 +824,14 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & //---------------------------------------------------------------- mJoints.push_back( new Joint( jointName ) ); Joint *joint = mJoints.back(); - LL_INFOS() << "Created joint " << jointName << LL_ENDL; - LL_INFOS() << "- index " << mJoints.size()-1 << LL_ENDL; + LL_DEBUGS("BVH") << "Created joint " << jointName << LL_ENDL; + LL_DEBUGS("BVH") << "- index " << mJoints.size()-1 << LL_ENDL; S32 depth = 1; for (S32 j = (S32)parent_joints.size() - 1; j >= 0; j--) { Joint *pjoint = mJoints[parent_joints[j]]; - LL_INFOS() << "- ancestor " << pjoint->mName << LL_ENDL; + LL_DEBUGS("BVH") << "- ancestor " << pjoint->mName << LL_ENDL; if (depth > pjoint->mChildTreeMaxDepth) { pjoint->mChildTreeMaxDepth = depth; @@ -899,6 +899,9 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & strncpy(error_text, line.c_str(), 127); /*Flawfinder: ignore*/ return E_ST_NO_CHANNELS; } + + // FIXME do we want to open up motion of non-hip joints or + // not? Already effectively allowed via .anim upload. int res = sscanf(line.c_str(), " CHANNELS %d", &joint->mNumChannels); if ( res != 1 ) { @@ -1020,7 +1023,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & { floats.push_back(std::stof(*(float_token_iter++))); } - LL_INFOS() << "Got " << floats.size() << " floats " << LL_ENDL; + LL_DEBUGS("BVH") << "Got " << floats.size() << " floats " << LL_ENDL; for (U32 j=0; j<mJoints.size(); j++) { Joint *joint = mJoints[j]; diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 6d5cf6e8f7..de3732f339 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,7 +42,6 @@ </array> <key>tags</key> <array> - <string>BVH</string> <!-- sample entry for debugging specific items <string>Avatar</string> <string>Inventory</string> diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 66c433684b..a800a3ca14 100755 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -285,11 +285,6 @@ BOOL LLFloaterBvhPreview::postBuild() dp.reset(); LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL; BOOL success = motionp && motionp->deserialize(dp); - LL_INFOS("BVH") << "TEST: Serializing motionp" << LL_ENDL; - S32 test_file_size = motionp->getFileSize(); - U8* test_buffer = new U8[test_file_size]; - LLDataPackerBinaryBuffer test_dp(test_buffer, test_file_size); - motionp->serialize(test_dp); LL_INFOS("BVH") << "Done" << LL_ENDL; delete []buffer; |