From fd9df262d5885341281154f1c05063d21bc8d151 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 11 May 2015 18:13:59 -0400 Subject: SL-111 WIP - bug fixes and diagnostic output --- indra/llcharacter/llbvhloader.cpp | 33 +++++++++++++++++-------------- indra/newview/app_settings/logcontrol.xml | 1 - indra/newview/llfloaterbvhpreview.cpp | 5 ----- 3 files changed, 18 insertions(+), 21 deletions(-) (limited to 'indra') 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; jmName << LL_ENDL; + LL_DEBUGS("BVH") << joint->mName << LL_ENDL; for (S32 i=0; imKeys[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 tags - BVH