summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-xindra/llcharacter/llbvhloader.cpp33
-rwxr-xr-xindra/llcharacter/llbvhloader.h2
-rwxr-xr-xindra/llcharacter/lljoint.h4
3 files changed, 8 insertions, 31 deletions
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index cc2505a5ab..a3c95fa8c9 100755
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -123,39 +123,17 @@ LLQuaternion::Order bvhStringToOrder( char *str )
// LLBVHLoader()
//-----------------------------------------------------------------------------
-LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::deque<std::string>& legal_joint_names)
+LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map )
{
reset();
errorLine = 0;
// Recognize all names we've been told are legal.
- for (std::deque<std::string>::iterator joint_name_it = legal_joint_names.begin();
- joint_name_it != legal_joint_names.end(); ++joint_name_it)
+ std::map<std::string, std::string>::iterator iter;
+ for (iter = joint_alias_map.begin(); iter != joint_alias_map.end(); iter++)
{
- const std::string& name = *joint_name_it;
-
- makeTranslation(name, name);
+ makeTranslation( iter->first , iter->second );
}
-
- mStatus = loadAliases("joint_aliases.xml"); //Load joint name aliases
- loadStatus = mStatus;
- LL_INFOS("BVH") << "Load Status 00 : " << loadStatus << LL_ENDL;
- if (mStatus == E_ST_NO_XLT_FILE)
- {
- LL_WARNS("BVH") << "NOTE: No translation table found." << LL_ENDL;
- loadStatus = mStatus;
- return;
- }
- else
- {
- if (mStatus != E_ST_OK)
- {
- LL_WARNS("BVH") << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL;
- errorLine = getLineNumber();
- loadStatus = mStatus;
- return;
- }
- }
char error_text[128]; /* Flawfinder: ignore */
S32 error_line;
@@ -478,8 +456,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
return E_ST_NO_CHANNELS;
}
- // FIXME BENTO do we want to open up motion of non-hip joints or
- // not? Already effectively allowed via .anim upload.
+ // Animating position (via mNumChannels = 6) is only supported for mPelvis.
int res = sscanf(line.c_str(), " CHANNELS %d", &joint->mNumChannels);
if ( res != 1 )
{
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h
index a0207750ed..01a7c8ad16 100755
--- a/indra/llcharacter/llbvhloader.h
+++ b/indra/llcharacter/llbvhloader.h
@@ -230,7 +230,7 @@ public:
// Constructor
// LLBVHLoader(const char* buffer);
LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine);
- LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::deque<std::string>& legal_joint_names);
+ LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map );
~LLBVHLoader();
/*
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 113742ad74..8d380cdc82 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -40,9 +40,9 @@
#include "xform.h"
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
-// BENTO JOINT COUNT LIMIT
+// BENTO JOINT COUNT LIMIT - need to set this to final skeleton size + 2
const U32 LL_CHARACTER_MAX_JOINTS = 152; // must be divisible by 4!
-const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 132;
+const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
// FIXME BENTO - these should be higher than the joint_num of any
// other joint, to avoid conflicts in updateMotionsByType()