FIRE-34884: Update Scale/Positions for new modes
parent
545722434c
commit
aaad4e5254
|
|
@ -377,27 +377,42 @@ void FSPoserAnimator::setJointPosition(LLVOAvatar* avatar, const FSPoserJoint* j
|
|||
if (!jointPose)
|
||||
return;
|
||||
|
||||
FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName());
|
||||
if (style == NONE || !oppositeJointPose)
|
||||
{
|
||||
jointPose->setPositionDelta(position);
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector3 positionDelta = jointPose->getPositionDelta() - position;
|
||||
LLVector3 oppositeJointPosition = oppositeJointPose->getPositionDelta();
|
||||
|
||||
switch (style)
|
||||
{
|
||||
case MIRROR:
|
||||
case MIRROR_DELTA:
|
||||
case SYMPATHETIC_DELTA:
|
||||
case SYMPATHETIC:
|
||||
jointPose->setPositionDelta(position);
|
||||
oppositeJointPose->setPositionDelta(oppositeJointPosition - positionDelta);
|
||||
break;
|
||||
|
||||
case MIRROR:
|
||||
case DELTAMODE:
|
||||
case NONE:
|
||||
default:
|
||||
jointPose->setPositionDelta(position);
|
||||
return;
|
||||
}
|
||||
|
||||
FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName());
|
||||
if (!oppositeJointPose)
|
||||
return;
|
||||
|
||||
LLVector3 oppositeJointPosition = oppositeJointPose->getPositionDelta();
|
||||
|
||||
switch (style)
|
||||
{
|
||||
case MIRROR:
|
||||
case MIRROR_DELTA:
|
||||
oppositeJointPose->setPositionDelta(oppositeJointPosition + positionDelta);
|
||||
break;
|
||||
|
||||
case SYMPATHETIC_DELTA:
|
||||
case SYMPATHETIC:
|
||||
oppositeJointPose->setPositionDelta(oppositeJointPosition - positionDelta);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -751,15 +766,24 @@ void FSPoserAnimator::setJointScale(LLVOAvatar* avatar, const FSPoserJoint* join
|
|||
return;
|
||||
|
||||
jointPose->setScaleDelta(scale);
|
||||
|
||||
if (style == NONE)
|
||||
return;
|
||||
|
||||
FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName());
|
||||
if (!oppositeJointPose)
|
||||
return;
|
||||
|
||||
oppositeJointPose->setScaleDelta(scale);
|
||||
switch (style)
|
||||
{
|
||||
case SYMPATHETIC:
|
||||
case MIRROR:
|
||||
case SYMPATHETIC_DELTA:
|
||||
case MIRROR_DELTA:
|
||||
oppositeJointPose->setScaleDelta(scale);
|
||||
break;
|
||||
|
||||
case DELTAMODE:
|
||||
case NONE:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool FSPoserAnimator::tryGetJointSaveVectors(LLVOAvatar* avatar, const FSPoserJoint& joint, LLVector3* rot, LLVector3* pos,
|
||||
|
|
|
|||
|
|
@ -2,15 +2,6 @@
|
|||
<toggleable_menu
|
||||
layout="topleft"
|
||||
name="Settings">
|
||||
<menu_item_call
|
||||
label="Load Rotations"
|
||||
layout="topleft"
|
||||
tool_tip="Loads just the rotations. Good for poses made for other avatars/shapes"
|
||||
name="rotations">
|
||||
<on_click function="Pose.Menu" parameter="rotation"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
label="Load Selective"
|
||||
tool_tip="Loads only the joints that are off, and turns them on"
|
||||
|
|
@ -28,7 +19,14 @@
|
|||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
label="Load all"
|
||||
label="Load - Rotations Only"
|
||||
layout="topleft"
|
||||
tool_tip="Loads just the rotations. Good for poses made for other avatars/shapes"
|
||||
name="rotations">
|
||||
<on_click function="Pose.Menu" parameter="rotation"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Load"
|
||||
layout="topleft"
|
||||
tool_tip="Loads rotations, positions and scales"
|
||||
name="load_all">
|
||||
|
|
|
|||
Loading…
Reference in New Issue