summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmodel.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-04 23:43:54 -0500
committerDave Parks <davep@lindenlab.com>2011-08-04 23:43:54 -0500
commit575c7f85b20fca57fcd97a2a18bd7ad0c030a935 (patch)
tree10df43813ed4787c5ca41442205ce1bf0062cfe7 /indra/llprimitive/llmodel.cpp
parent7633b3f1f1191443ae153c02d71dd968b46a2334 (diff)
parentdf94d0c778e63ce053cfd1fa4423b180bab6adfb (diff)
merge
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r--indra/llprimitive/llmodel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index def276c808..d8e4d4a173 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1679,6 +1679,19 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO
LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
{
+ //1. If a vertex has been weighted then we'll find it via pos and return it's weight list
+ weight_map::iterator iterPos = mSkinWeights.begin();
+ weight_map::iterator iterEnd = mSkinWeights.end();
+
+ for ( ; iterPos!=iterEnd; ++iterPos )
+ {
+ if ( jointPositionalLookup( iterPos->first, pos ) )
+ {
+ return iterPos->second;
+ }
+ }
+
+ //2. Otherwise we'll use the older implementation
weight_map::iterator iter = mSkinWeights.find(pos);
if (iter != mSkinWeights.end())