Cleanup to logically group physics params in avatar_lad.xml.

Added more controls for belly & butt.
Cleaned up code around physics parameter initialization.
master
Loren Shih 2011-03-30 19:28:03 -04:00
parent 23fe1a4787
commit 993ad22f9f
3 changed files with 310 additions and 130 deletions

View File

@ -11952,41 +11952,35 @@ render_pass="bump">
<param
id="1130"
group="0"
name="Belly_Physics_UpDown_Spring"
label="Belly Physics UpDown Spring"
name="Belly_Physics_Mass"
label="Belly Physics Mass"
wearable="physics"
edit_group="physics_belly"
label_min="Less"
label_max="More"
value_default=".1"
value_min="0"
value_min=".1"
value_max="1">
<param_driver />
</param>
<param
id="1131"
group="0"
name="Belly_Physics_UpDown_Gain"
label="Belly Physics UpDown Gain"
name="Belly_Physics_Smoothing"
label="Belly Physics Smoothing"
wearable="physics"
edit_group="physics_belly"
label_min="Less"
label_max="More"
value_default="10"
value_default="2"
value_min="1"
value_max="100">
value_max="10">
<param_driver />
</param>
<param
id="1132"
group="0"
name="Belly_Physics_UpDown_Damping"
label="Belly Physics UpDown Damping"
name="Belly_Physics_Gravity"
label="Belly Physics Gravity"
wearable="physics"
edit_group="physics"
label_min="Less"
label_max="More"
value_default=".05"
edit_group="physics_belly"
value_default="0"
value_min="0"
value_max=".1">
<param_driver />
@ -11994,12 +11988,58 @@ render_pass="bump">
<param
id="1133"
group="0"
name="Belly_Physics_UpDown_Spring"
label="Belly Physics UpDown Spring"
wearable="physics"
edit_group="physics_belly"
value_default=".1"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="1134"
group="0"
name="Belly_Physics_UpDown_Gain"
label="Belly Physics UpDown Gain"
wearable="physics"
edit_group="physics_belly"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="1135"
group="0"
name="Belly_Physics_UpDown_Damping"
label="Belly Physics UpDown Damping"
wearable="physics"
edit_group="physics"
value_default=".05"
value_min="0"
value_max=".1">
<param_driver />
</param>
<param
id="1136"
group="0"
name="Belly_Physics_UpDown_Drag"
label="Belly Physics UpDown Drag"
wearable="physics"
edit_group="physics_belly"
value_default=".15"
value_min="0"
value_max=".5">
<param_driver />
</param>
<param
id="1137"
group="0"
name="Belly_Physics_UpDown_Max_Velocity"
label="Belly Physics UpDown Max Speed"
wearable="physics"
edit_group="physics_belly"
label_min="Less"
label_max="More"
value_default="0"
value_min="0"
value_max="10">
@ -12009,41 +12049,35 @@ render_pass="bump">
<param
id="1140"
group="0"
name="Butt_Physics_UpDown_Spring"
label="Butt Physics UpDown Spring"
name="Butt_Physics_Mass"
label="Butt Physics Mass"
wearable="physics"
edit_group="physics_butt"
label_min="Less"
label_max="More"
value_default=".1"
value_min="0"
value_min=".1"
value_max="1">
<param_driver />
</param>
<param
id="1141"
group="0"
name="Butt_Physics_UpDown_Gain"
label="Butt Physics UpDown Gain"
name="Butt_Physics_Smoothing"
label="Butt Physics Smoothing"
wearable="physics"
edit_group="physics_butt"
label_min="Less"
label_max="More"
value_default="10"
value_default="2"
value_min="1"
value_max="100">
value_max="10">
<param_driver />
</param>
<param
id="1142"
group="0"
name="Butt_Physics_UpDown_Damping"
label="Butt Physics UpDown Damping"
wearable="physics_butt"
edit_group="physics"
label_min="Less"
label_max="More"
value_default=".05"
name="Butt_Physics_Gravity"
label="Butt Physics Gravity"
wearable="physics"
edit_group="physics_butt"
value_default="0"
value_min="0"
value_max=".1">
<param_driver />
@ -12051,12 +12085,119 @@ render_pass="bump">
<param
id="1143"
group="0"
name="Butt_Physics_UpDown_Spring"
label="Butt Physics UpDown Spring"
wearable="physics"
edit_group="physics_butt"
value_default=".1"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="1144"
group="0"
name="Butt_Physics_UpDown_Gain"
label="Butt Physics UpDown Gain"
wearable="physics"
edit_group="physics_butt"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="1145"
group="0"
name="Butt_Physics_UpDown_Damping"
label="Butt Physics UpDown Damping"
wearable="physics"
edit_group="physics"
value_default=".05"
value_min="0"
value_max=".1">
<param_driver />
</param>
<param
id="1146"
group="0"
name="Butt_Physics_UpDown_Drag"
label="Butt Physics UpDown Drag"
wearable="physics"
edit_group="physics_butt"
value_default=".15"
value_min="0"
value_max=".5">
<param_driver />
</param>
<param
id="1147"
group="0"
name="Butt_Physics_UpDown_Max_Velocity"
label="Butt Physics UpDown Max Speed"
wearable="physics"
edit_group="physics_butt"
label_min="Less"
label_max="More"
value_default="0"
value_min="0"
value_max="10">
<param_driver />
</param>
<param
id="1143"
group="0"
name="Butt_Physics_LeftRight_Spring"
label="Butt Physics LeftRight Spring"
wearable="physics"
edit_group="physics_butt"
value_default=".1"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="1144"
group="0"
name="Butt_Physics_LeftRight_Gain"
label="Butt Physics LeftRight Gain"
wearable="physics"
edit_group="physics_butt"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="1145"
group="0"
name="Butt_Physics_LeftRight_Damping"
label="Butt Physics LeftRight Damping"
wearable="physics"
edit_group="physics"
value_default=".05"
value_min="0"
value_max=".1">
<param_driver />
</param>
<param
id="1146"
group="0"
name="Butt_Physics_LeftRight_Drag"
label="Butt Physics LeftRight Drag"
wearable="physics"
edit_group="physics_butt"
value_default=".15"
value_min="0"
value_max=".5">
<param_driver />
</param>
<param
id="1147"
group="0"
name="Butt_Physics_LeftRight_Max_Velocity"
label="Butt Physics LeftRight Max Speed"
wearable="physics"
edit_group="physics_butt"
value_default="0"
value_min="0"
value_max="10">

View File

@ -238,102 +238,130 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
mMotions.clear();
controller_map_t controller_breast_inout;
controller_breast_inout["Mass"] = "Breast_Physics_Mass";
controller_breast_inout["Smoothing"] = "Breast_Physics_Smoothing";
controller_breast_inout["Gravity"] = "Breast_Physics_Gravity";
controller_breast_inout["Damping"] = "Breast_Physics_Side_Damping";
controller_breast_inout["Drag"] = "Breast_Physics_Side_Drag";
controller_breast_inout["MaxSpeed"] = "Breast_Physics_Side_Max_Velocity";
controller_breast_inout["Spring"] = "Breast_Physics_Side_Spring";
controller_breast_inout["Gain"] = "Breast_Physics_Side_Gain";
LLPhysicsMotion *motion_breast_inout = new LLPhysicsMotion("Breast_Physics_Side_Controller",
"",
"mChest",
character,
LLVector3(-1,0,0),
controller_breast_inout);
if (!motion_breast_inout->initialize())
return STATUS_FAILURE;
addMotion(motion_breast_inout);
controller_map_t controller_breast_updown;
controller_breast_updown["Mass"] = "Breast_Physics_Mass";
controller_breast_updown["Smoothing"] = "Breast_Physics_Smoothing";
controller_breast_updown["Gravity"] = "Breast_Physics_Gravity";
controller_breast_updown["Damping"] = "Breast_Physics_UpDown_Damping";
controller_breast_updown["Drag"] = "Breast_Physics_UpDown_Drag";
controller_breast_updown["MaxSpeed"] = "Breast_Physics_UpDown_Max_Velocity";
controller_breast_updown["Spring"] = "Breast_Physics_UpDown_Spring";
controller_breast_updown["Gain"] = "Breast_Physics_UpDown_Gain";
LLPhysicsMotion *motion_breast_updown = new LLPhysicsMotion("Breast_Physics_UpDown_Controller",
"",
"mChest",
character,
LLVector3(0,0,1),
controller_breast_updown);
if (!motion_breast_updown->initialize())
// Breast Cleavage
{
llassert_always(FALSE);
return STATUS_FAILURE;
controller_map_t controller;
controller["Mass"] = "Breast_Physics_Mass";
controller["Smoothing"] = "Breast_Physics_Smoothing";
controller["Gravity"] = "Breast_Physics_Gravity";
controller["Damping"] = "Breast_Physics_Side_Damping";
controller["Drag"] = "Breast_Physics_Side_Drag";
controller["MaxSpeed"] = "Breast_Physics_Side_Max_Velocity";
controller["Spring"] = "Breast_Physics_Side_Spring";
controller["Gain"] = "Breast_Physics_Side_Gain";
LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_Side_Controller",
"",
"mChest",
character,
LLVector3(-1,0,0),
controller);
if (!motion->initialize())
{
llassert_always(FALSE);
return STATUS_FAILURE;
}
addMotion(motion);
}
addMotion(motion_breast_updown);
controller_map_t controller_butt_updown;
controller_butt_updown["Damping"] = "Butt_Physics_Updown_Damping";
controller_butt_updown["MaxSpeed"] = "Butt_Physics_Updown_Max_Velocity";
controller_butt_updown["Spring"] = "Butt_Physics_Updown_Spring";
controller_butt_updown["Gain"] = "Butt_Physics_Updown_Gain";
LLPhysicsMotion *motion_butt_updown = new LLPhysicsMotion("Butt_Physics_UpDown_Controller",
"",
"mPelvis",
character,
LLVector3(0,0,1),
controller_butt_updown);
if (!motion_butt_updown->initialize())
// Breast Bounce
{
llassert_always(FALSE);
return STATUS_FAILURE;
controller_map_t controller;
controller["Mass"] = "Breast_Physics_Mass";
controller["Smoothing"] = "Breast_Physics_Smoothing";
controller["Gravity"] = "Breast_Physics_Gravity";
controller["Damping"] = "Breast_Physics_UpDown_Damping";
controller["Drag"] = "Breast_Physics_UpDown_Drag";
controller["MaxSpeed"] = "Breast_Physics_UpDown_Max_Velocity";
controller["Spring"] = "Breast_Physics_UpDown_Spring";
controller["Gain"] = "Breast_Physics_UpDown_Gain";
LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_UpDown_Controller",
"",
"mChest",
character,
LLVector3(0,0,1),
controller);
if (!motion->initialize())
{
llassert_always(FALSE);
return STATUS_FAILURE;
}
addMotion(motion);
}
// Butt Bounce
{
controller_map_t controller;
controller["Mass"] = "Butt_Physics_Mass";
controller["Smoothing"] = "Butt_Physics_Smoothing";
controller["Gravity"] = "Butt_Physics_Gravity";
controller["Damping"] = "Butt_Physics_UpDown_Damping";
controller["Drag"] = "Butt_Physics_UpDown_Drag";
controller["MaxSpeed"] = "Butt_Physics_UpDown_Max_Velocity";
controller["Spring"] = "Butt_Physics_UpDown_Spring";
controller["Gain"] = "Butt_Physics_UpDown_Gain";
LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_UpDown_Controller",
"",
"mPelvis",
character,
LLVector3(0,0,1),
controller);
if (!motion->initialize())
{
llassert_always(FALSE);
return STATUS_FAILURE;
}
addMotion(motion);
}
addMotion(motion_butt_updown);
controller_map_t controller_butt_leftright;
controller_butt_leftright["Damping"] = "Butt_Physics_Updown_Damping";
controller_butt_leftright["MaxSpeed"] = "Butt_Physics_Updown_Max_Velocity";
controller_butt_leftright["Spring"] = "Butt_Physics_Updown_Spring";
controller_butt_leftright["Gain"] = "Butt_Physics_Updown_Gain";
LLPhysicsMotion *motion_butt_leftright = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller",
"",
"mPelvis",
character,
LLVector3(0,1,0),
controller_butt_leftright);
if (!motion_butt_leftright->initialize())
// Butt LeftRight
{
llassert_always(FALSE);
return STATUS_FAILURE;
controller_map_t controller;
controller["Mass"] = "Butt_Physics_Mass";
controller["Smoothing"] = "Butt_Physics_Smoothing";
controller["Gravity"] = "Butt_Physics_Gravity";
controller["Damping"] = "Butt_Physics_LeftRight_Damping";
controller["Drag"] = "Butt_Physics_LeftRight_Drag";
controller["MaxSpeed"] = "Butt_Physics_LeftRight_Max_Velocity";
controller["Spring"] = "Butt_Physics_LeftRight_Spring";
controller["Gain"] = "Butt_Physics_LeftRight_Gain";
LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller",
"",
"mPelvis",
character,
LLVector3(0,1,0),
controller);
if (!motion->initialize())
{
llassert_always(FALSE);
return STATUS_FAILURE;
}
addMotion(motion);
}
addMotion(motion_butt_leftright);
controller_map_t controller_belly_updown;
controller_belly_updown["Damping"] = "Belly_Physics_Updown_Damping";
controller_belly_updown["MaxSpeed"] = "Belly_Physics_Updown_Max_Velocity";
controller_belly_updown["Spring"] = "Belly_Physics_Updown_Spring";
controller_belly_updown["Gain"] = "Belly_Physics_Updown_Gain";
LLPhysicsMotion *motion_belly_updown = new LLPhysicsMotion("Belly_Physics_UpDown_Controller",
"",
"mChest",
character,
LLVector3(0,0,-1),
controller_belly_updown);
if (!motion_belly_updown->initialize())
// Belly Bounce
{
llassert_always(FALSE);
return STATUS_FAILURE;
controller_map_t controller;
controller["Mass"] = "Belly_Physics_Mass";
controller["Smoothing"] = "Belly_Physics_Smoothing";
controller["Gravity"] = "Belly_Physics_Gravity";
controller["Damping"] = "Belly_Physics_UpDown_Damping";
controller["Drag"] = "Belly_Physics_UpDown_Drag";
controller["MaxSpeed"] = "Belly_Physics_UpDown_Max_Velocity";
controller["Spring"] = "Belly_Physics_UpDown_Spring";
controller["Gain"] = "Belly_Physics_UpDown_Gain";
LLPhysicsMotion *motion = new LLPhysicsMotion("Belly_Physics_UpDown_Controller",
"",
"mPelvis",
character,
LLVector3(0,0,-1),
controller);
if (!motion->initialize())
{
llassert_always(FALSE);
return STATUS_FAILURE;
}
addMotion(motion);
}
addMotion(motion_belly_updown);
return STATUS_SUCCESS;
}

View File

@ -2514,28 +2514,39 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Breast Physics Mass">Breast Mass</string>
<string name="Breast Physics Smoothing">Breast Smoothing</string>
<string name="Breast Physics Gravity">Breast Gravity</string>
<string name="Breast Physics Side Spring">Breast Side Spring</string>
<string name="Breast Physics Side Gain">Breast Side Gain</string>
<string name="Breast Physics Side Damping">Breast Side Damping</string>
<string name="Breast Physics Side Drag">Breast Side Drag</string>
<string name="Breast Physics Side Max Speed">Breast Side Max Speed</string>
<string name="Breast Physics UpDown Spring">Breast UpDown Spring</string>
<string name="Breast Physics UpDown Gain">Breast UpDown Gain</string>
<string name="Breast Physics UpDown Damping">Breast UpDown Damping</string>
<string name="Breast Physics UpDown Drag">Breast UpDown Drag</string>
<string name="Breast Physics UpDown Max Speed">Breast UpDown Max Speed</string>
<string name="Belly Physics UpDown Spring">Belly Updown Spring</string>
<string name="Belly Physics UpDown Gain">Belly Updown Gain</string>
<string name="Belly Physics UpDown Damping">Belly Updown Damping</string>
<string name="Belly Physics UpDown Max Speed">Belly Updown Max Speed</string>
<string name="Belly Physics Mass">Belly Mass</string>
<string name="Belly Physics Smoothing">Belly Smoothing</string>
<string name="Belly Physics Gravity">Belly Gravity</string>
<string name="Belly Physics UpDown Spring">Belly UpDown Spring</string>
<string name="Belly Physics UpDown Gain">Belly UpDown Gain</string>
<string name="Belly Physics UpDown Damping">Belly UpDown Damping</string>
<string name="Belly Physics UpDown Drag">Belly UpDown Drag</string>
<string name="Belly Physics UpDown Max Speed">Belly UpDown Max Speed</string>
<string name="Butt Physics Mass">Butt Mass</string>
<string name="Butt Physics Smoothing">Butt Smoothing</string>
<string name="Butt Physics Gravity">Butt Gravity</string>
<string name="Butt Physics UpDown Spring">Butt UpDown Spring</string>
<string name="Butt Physics UpDown Gain">Butt UpDown Gain</string>
<string name="Butt Physics UpDown Damping">Butt UpDown Damping</string>
<string name="Butt Physics UpDown Drag">Butt UpDown Drag</string>
<string name="Butt Physics UpDown Max Speed">Butt UpDown Max Speed</string>
<string name="Butt Physics LeftRight Spring">Butt LeftRight Spring</string>
<string name="Butt Physics LeftRight Gain">Butt LeftRight Gain</string>
<string name="Butt Physics LeftRight Damping">Butt LeftRight Damping</string>
<string name="Butt Physics LeftRight Drag">Butt LeftRight Drag</string>
<string name="Butt Physics LeftRight Max Speed">Butt LeftRight Max Speed</string>
<string name="Bushy Eyebrows">Bushy Eyebrows</string>
<string name="Bushy Hair">Bushy Hair</string>