diff options
| author | prep linden <prep@lindenlab.com> | 2010-09-24 13:11:53 -0400 |
|---|---|---|
| committer | prep linden <prep@lindenlab.com> | 2010-09-24 13:11:53 -0400 |
| commit | c7f5a9419b4b93efdc04ebfbb8e05a2ef0e09142 (patch) | |
| tree | d4bd4000daf955114e9dc1ed96a873b620115299 /indra/llprimitive/llmodel.cpp | |
| parent | e0588af08737177f8a1bc519376073e14b886434 (diff) | |
Added support for joint offsets
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
| -rwxr-xr-x | indra/llprimitive/llmodel.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 349c844470..f3f9c29157 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1342,6 +1342,21 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL mdl["skin"]["bind_shape_matrix"][i*4+j] = high->mBindShapeMatrix.mMatrix[i][j]; } } + + if ( high->mAlternateBindMatrix.size() > 0 ) + { + for (U32 i = 0; i < high->mJointList.size(); ++i) + { + for (U32 j = 0; j < 4; j++) + { + for (U32 k = 0; k < 4; k++) + { + mdl["skin"]["alt_inverse_bind_matrix"][i][j*4+k] = high->mAlternateBindMatrix[i].mMatrix[j][k]; + } + } + } + } + } if (!decomp.empty()) |
