Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
08f35b6a
Commit
08f35b6a
authored
12 years ago
by
Ansariel
Browse files
Options
Downloads
Patches
Plain Diff
STORM-1899: Avatar hand poses randomly get stuck in spread position
parent
36456692
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/contributions.txt
+1
-0
1 addition, 0 deletions
doc/contributions.txt
indra/llcharacter/llhandmotion.cpp
+55
-5
55 additions, 5 deletions
indra/llcharacter/llhandmotion.cpp
with
56 additions
and
5 deletions
doc/contributions.txt
+
1
−
0
View file @
08f35b6a
...
@@ -174,6 +174,7 @@ Ansariel Hiller
...
@@ -174,6 +174,7 @@ Ansariel Hiller
VWR-26150
VWR-26150
STORM-1685
STORM-1685
STORM-1713
STORM-1713
STORM-1899
Aralara Rajal
Aralara Rajal
Ardy Lay
Ardy Lay
STORM-859
STORM-859
...
...
This diff is collapsed.
Click to expand it.
indra/llcharacter/llhandmotion.cpp
+
55
−
5
View file @
08f35b6a
...
@@ -132,18 +132,68 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
...
@@ -132,18 +132,68 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
{
{
if
(
mNewPose
!=
HAND_POSE_RELAXED
&&
mNewPose
!=
mCurrentPose
)
if
(
mNewPose
!=
HAND_POSE_RELAXED
&&
mNewPose
!=
mCurrentPose
)
{
{
mCharacter
->
setVisualParamWeight
(
gHandPoseNames
[
mNewPose
],
0.
f
);
// Only set param weight for poses other than
// default (HAND_POSE_SPREAD); HAND_POSE_SPREAD
// is not an animatable morph!
if
(
mNewPose
!=
HAND_POSE_SPREAD
)
{
mCharacter
->
setVisualParamWeight
(
gHandPoseNames
[
mNewPose
],
0.
f
);
}
// Reset morph weight for current pose back to its
// full extend or it might be stuck somewhere in the middle if a
// pose is requested and the old pose is requested again shortly
// after while still blending to the other pose!
if
(
mCurrentPose
!=
HAND_POSE_SPREAD
)
{
mCharacter
->
setVisualParamWeight
(
gHandPoseNames
[
mCurrentPose
],
1.
f
);
}
// Update visual params now if we won't blend
if
(
mCurrentPose
==
HAND_POSE_RELAXED
)
{
mCharacter
->
updateVisualParams
();
}
}
}
mNewPose
=
HAND_POSE_RELAXED
;
mNewPose
=
HAND_POSE_RELAXED
;
}
}
else
else
{
{
// this is a new morph we didn't know about before
// Sometimes we seem to get garbage here, with poses that are out of bounds.
if
(
*
requestedHandPose
!=
mNewPose
&&
mNewPose
!=
mCurrentPose
&&
mNewPose
!=
HAND_POSE_SPREAD
)
// So check for a valid pose first.
if
(
*
requestedHandPose
>=
0
&&
*
requestedHandPose
<
NUM_HAND_POSES
)
{
// This is a new morph we didn't know about before:
// Reset morph weight for both current and new pose
// back their starting values while still blending.
if
(
*
requestedHandPose
!=
mNewPose
&&
mNewPose
!=
mCurrentPose
)
{
if
(
mNewPose
!=
HAND_POSE_SPREAD
)
{
mCharacter
->
setVisualParamWeight
(
gHandPoseNames
[
mNewPose
],
0.
f
);
}
// Reset morph weight for current pose back to its full extend
// or it might be stuck somewhere in the middle if a pose is
// requested and the old pose is requested again shortly after
// while still blending to the other pose!
if
(
mCurrentPose
!=
HAND_POSE_SPREAD
)
{
mCharacter
->
setVisualParamWeight
(
gHandPoseNames
[
mCurrentPose
],
1.
f
);
}
// Update visual params now if we won't blend
if
(
mCurrentPose
==
*
requestedHandPose
)
{
mCharacter
->
updateVisualParams
();
}
}
mNewPose
=
*
requestedHandPose
;
}
else
{
{
mCharacter
->
setVisualParamWeight
(
gH
and
P
ose
Names
[
mNewPose
],
0.
f
)
;
llwarns
<<
"Requested h
and
p
ose
out of range. Ignoring requested pose."
<<
llendl
;
}
}
mNewPose
=
*
requestedHandPose
;
}
}
mCharacter
->
removeAnimationData
(
"Hand Pose"
);
mCharacter
->
removeAnimationData
(
"Hand Pose"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment