WIP:Added pelvis offset to skinning info
parent
3559789967
commit
16ff507190
|
|
@ -57,6 +57,7 @@ const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
|
|||
|
||||
LLModel::LLModel(LLVolumeParams& params, F32 detail)
|
||||
: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0)
|
||||
, mPelvisOffset( 0.0f )
|
||||
{
|
||||
mDecompID = -1;
|
||||
}
|
||||
|
|
@ -1497,6 +1498,7 @@ LLSD LLModel::writeModel(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ( upload_joints && high->mAlternateBindMatrix.size() > 0 )
|
||||
{
|
||||
for (U32 i = 0; i < high->mJointList.size(); ++i)
|
||||
|
|
@ -1509,6 +1511,8 @@ LLSD LLModel::writeModel(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
mdl["skin"]["pelvis_offset"] = high->mPelvisOffset;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ public:
|
|||
LLVector3 mNormalizedScale;
|
||||
LLVector3 mNormalizedTranslation;
|
||||
|
||||
float mPelvisOffset;
|
||||
// convex hull decomposition
|
||||
S32 mDecompID;
|
||||
convex_hull_decomposition mConvexHullDecomp;
|
||||
|
|
|
|||
|
|
@ -1162,7 +1162,12 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat
|
|||
info.mAlternateBindMatrix.push_back(mat);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (skin.has("pelvis_offset"))
|
||||
{
|
||||
info.mPelvisOffset = skin["pelvis_offset"].asReal();
|
||||
}
|
||||
|
||||
mSkinInfoQ.push(info);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ public:
|
|||
std::vector<LLMatrix4> mAlternateBindMatrix;
|
||||
|
||||
LLMatrix4 mBindShapeMatrix;
|
||||
float mPelvisOffset;
|
||||
};
|
||||
|
||||
class LLMeshDecomposition
|
||||
|
|
|
|||
Loading…
Reference in New Issue