Skip to content
Snippets Groups Projects
Commit ada91584 authored by Aura Linden's avatar Aura Linden
Browse files

Fix for aliasing of mPelvis name in BVH uploads SL-285

parent 062aea86
No related branches found
No related tags found
No related merge requests found
...@@ -672,12 +672,19 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & ...@@ -672,12 +672,19 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
//--------------------------------------------------------------- //---------------------------------------------------------------
// we require the root joint be "hip" - DEV-26188 // we require the root joint be "hip" - DEV-26188
//--------------------------------------------------------------- //---------------------------------------------------------------
const char* FORCED_ROOT_NAME = "hip"; if (mJoints.size() == 0 )
if ( (mJoints.size() == 0 ) && ( !strstr(jointName, FORCED_ROOT_NAME) ) ) {
{ //The root joint of the BVH file must be hip (mPelvis) or an alias of mPelvis.
strncpy(error_text, line.c_str(), 127); /* Flawfinder: ignore */ const char* FORCED_ROOT_NAME = "hip";
return E_ST_BAD_ROOT;
} TranslationMap::iterator hip_joint = mTranslations.find( FORCED_ROOT_NAME );
TranslationMap::iterator root_joint = mTranslations.find( jointName );
if ( hip_joint == mTranslations.end() || root_joint == mTranslations.end() || root_joint->second.mOutName != hip_joint->second.mOutName )
{
strncpy(error_text, line.c_str(), 127); /* Flawfinder: ignore */
return E_ST_BAD_ROOT;
}
}
//---------------------------------------------------------------- //----------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment