diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-03-10 10:12:25 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-03-10 10:12:25 -0500 |
commit | 05bd94268d99a34b4f4b1556e3088cbf134034f9 (patch) | |
tree | 12a585c5a1c6fd6297f31e5e3b7b312b0cde67b1 /indra/newview/llvoavatar.cpp | |
parent | d56533609431b213810928d204e3720fecd42b82 (diff) |
SL-315 - wip on joint reset
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4d6f0f78b2..9bee4380eb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1807,6 +1807,27 @@ void LLVOAvatar::buildCharacter() void LLVOAvatar::resetSkeleton() { LL_DEBUGS("Avatar") << avString() << LL_ENDL; + + // Reset params + for (LLVisualParam *param = getFirstVisualParam(); + param; + param = getNextVisualParam()) + { + if (param->isAnimating()) + { + continue; + } + param->setLastWeight(param->getDefaultWeight()); + } + + // Reset all bones and collision volumes to their initial skeleton state. + if( !buildSkeleton(sAvatarSkeletonInfo) ) + { + LL_ERRS() << "Error resetting skeleton" << LL_ENDL; + } + + // Apply params + updateVisualParams(); } //----------------------------------------------------------------------------- |