merged latest improvements from seraph
commit
67316ada5a
|
|
@ -403,6 +403,7 @@ set(viewer_SOURCE_FILES
|
|||
llscreenchannel.cpp
|
||||
llscriptfloater.cpp
|
||||
llscrollingpanelparam.cpp
|
||||
llscrollingpanelparambase.cpp
|
||||
llsearchcombobox.cpp
|
||||
llsearchhistory.cpp
|
||||
llsecapi.cpp
|
||||
|
|
@ -941,6 +942,7 @@ set(viewer_HEADER_FILES
|
|||
llscreenchannel.h
|
||||
llscriptfloater.h
|
||||
llscrollingpanelparam.h
|
||||
llscrollingpanelparambase.h
|
||||
llsearchcombobox.h
|
||||
llsearchhistory.h
|
||||
llsecapi.h
|
||||
|
|
|
|||
|
|
@ -3798,7 +3798,7 @@
|
|||
id="1092"
|
||||
group="1"
|
||||
name="Belly_Torso_Physics_UpDown_Driven"
|
||||
wearable="shape"
|
||||
wearable="physics"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
|
|
@ -4394,7 +4394,7 @@
|
|||
id="1093"
|
||||
group="1"
|
||||
name="Belly_Legs_Physics_UpDown_Driven"
|
||||
wearable="shape"
|
||||
wearable="physics"
|
||||
edit_group="driven"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
|
|
@ -4444,7 +4444,7 @@
|
|||
id="1089"
|
||||
group="0"
|
||||
name="Butt_Physics_UpDown_Driven"
|
||||
wearable="shape"
|
||||
wearable="physics"
|
||||
edit_group="driven"
|
||||
label_min="Separate"
|
||||
label_max="Join"
|
||||
|
|
@ -4460,7 +4460,7 @@
|
|||
id="1090"
|
||||
group="0"
|
||||
name="Butt_Physics_LeftRight_Driven"
|
||||
wearable="shape"
|
||||
wearable="physics"
|
||||
edit_group="driven"
|
||||
label_min="Separate"
|
||||
label_max="Join"
|
||||
|
|
@ -5189,7 +5189,7 @@
|
|||
id="1094"
|
||||
group="1"
|
||||
name="Belly_Skirt_Physics_UpDown_Driven"
|
||||
wearable="skirt"
|
||||
wearable="physics"
|
||||
edit_group="driven"
|
||||
cross_wearable="true"
|
||||
value_min="-1"
|
||||
|
|
@ -9138,14 +9138,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Mass"
|
||||
label="Breast Physics Mass"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_min=".1"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9156,14 +9154,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Smoothing"
|
||||
label="Breast Physics Smoothing"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="2"
|
||||
value_min="1"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9174,14 +9170,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Gravity"
|
||||
label="Breast Physics Gravity"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9192,14 +9186,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Side_Spring"
|
||||
label="Breast Physics Side Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_min="0"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9210,14 +9202,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Side_Gain"
|
||||
label="Breast Physics Side Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9233,9 +9223,7 @@ render_pass="bump">
|
|||
label_max="More"
|
||||
value_default=".05"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max=".1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9246,14 +9234,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Side_Drag"
|
||||
label="Breast Physics Side Drag"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".15"
|
||||
value_min="0"
|
||||
value_max=".5"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max=".5">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9264,14 +9250,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_Side_Max_Velocity"
|
||||
label="Breast Physics Side Max Speed"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9283,14 +9267,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_UpDown_Spring"
|
||||
label="Breast Physics UpDown Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_min="0"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9301,14 +9283,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_UpDown_Gain"
|
||||
label="Breast Physics UpDown Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9319,7 +9299,7 @@ render_pass="bump">
|
|||
name="Breast_Physics_UpDown_Damping"
|
||||
label="Breast Physics UpDown Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".05"
|
||||
|
|
@ -9337,14 +9317,12 @@ render_pass="bump">
|
|||
name="Breast_Physics_UpDown_Drag"
|
||||
label="Breast Physics UpDown Drag"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".15"
|
||||
value_min="0"
|
||||
value_max=".5"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max=".5">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -9355,32 +9333,27 @@ render_pass="bump">
|
|||
name="Breast_Physics_UpDown_Max_Velocity"
|
||||
label="Breast Physics UpDown Max Speed"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_breasts"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1104"
|
||||
group="0"
|
||||
group="1"
|
||||
wearable="shape"
|
||||
edit_group="shape_legs"
|
||||
edit_group_order="14"
|
||||
edit_group="physics_butt"
|
||||
name="Butt_Physics_UpDown_Controller"
|
||||
label="Butt Physics UpDown Controller"
|
||||
label_min="Down"
|
||||
label_max="Up"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1089" />
|
||||
|
|
@ -9389,19 +9362,16 @@ render_pass="bump">
|
|||
|
||||
<param
|
||||
id="1105"
|
||||
group="0"
|
||||
group="1"
|
||||
wearable="shape"
|
||||
edit_group="shape_legs"
|
||||
edit_group_order="15"
|
||||
edit_group="physics_butt"
|
||||
name="Butt_Physics_LeftRight_Controller"
|
||||
label="Butt Physics LeftRight Controller"
|
||||
label_min="Down"
|
||||
label_max="Up"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1090" />
|
||||
|
|
@ -9443,9 +9413,7 @@ render_pass="bump">
|
|||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="-.3"
|
||||
value_max="1.3"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1.3">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1088" />
|
||||
|
|
@ -10177,9 +10145,9 @@ render_pass="bump">
|
|||
|
||||
<param
|
||||
id="1091"
|
||||
group="0"
|
||||
wearable="shape"
|
||||
edit_group="shape_torso"
|
||||
group="1"
|
||||
wearable="physics"
|
||||
edit_group="physics_belly"
|
||||
edit_group_order="14"
|
||||
name="Belly_Physics_UpDown_Controller"
|
||||
label="Belly Physics UpDown Controller"
|
||||
|
|
@ -10207,14 +10175,12 @@ render_pass="bump">
|
|||
name="Belly_Physics_UpDown_Spring"
|
||||
label="Belly Physics UpDown Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_belly"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_min="0"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10224,14 +10190,12 @@ render_pass="bump">
|
|||
name="Belly_Physics_UpDown_Gain"
|
||||
label="Belly Physics UpDown Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_belly"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10246,9 +10210,7 @@ render_pass="bump">
|
|||
label_max="More"
|
||||
value_default=".05"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max=".1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10258,14 +10220,12 @@ render_pass="bump">
|
|||
name="Belly_Physics_UpDown_Max_Velocity"
|
||||
label="Belly Physics UpDown Max Speed"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_belly"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10275,14 +10235,12 @@ render_pass="bump">
|
|||
name="Butt_Physics_UpDown_Spring"
|
||||
label="Butt Physics UpDown Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_butt"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_min="0"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10292,14 +10250,12 @@ render_pass="bump">
|
|||
name="Butt_Physics_UpDown_Gain"
|
||||
label="Butt Physics UpDown Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_butt"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10308,15 +10264,13 @@ render_pass="bump">
|
|||
group="0"
|
||||
name="Butt_Physics_UpDown_Damping"
|
||||
label="Butt Physics UpDown Damping"
|
||||
wearable="physics"
|
||||
wearable="physics_butt"
|
||||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".05"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max=".1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
@ -10326,14 +10280,12 @@ render_pass="bump">
|
|||
name="Butt_Physics_UpDown_Max_Velocity"
|
||||
label="Butt Physics UpDown Max Speed"
|
||||
wearable="physics"
|
||||
edit_group="physics"
|
||||
edit_group="physics_butt"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,9 @@ enum ESubpart {
|
|||
SUBPART_SKIRT,
|
||||
SUBPART_ALPHA,
|
||||
SUBPART_TATTOO,
|
||||
SUBPART_PHYSICS
|
||||
SUBPART_PHYSICS_BREASTS,
|
||||
SUBPART_PHYSICS_BELLY,
|
||||
SUBPART_PHYSICS_BUTT
|
||||
};
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
|
@ -234,7 +236,7 @@ LLEditWearableDictionary::Wearables::Wearables()
|
|||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1,3,1, TEX_HEAD_TATTOO, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO));
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text",0,0,1, SUBPART_PHYSICS));
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text",0,0,3, SUBPART_PHYSICS_BREASTS, SUBPART_PHYSICS_BELLY, SUBPART_PHYSICS_BUTT));
|
||||
}
|
||||
|
||||
LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type,
|
||||
|
|
@ -305,7 +307,9 @@ LLEditWearableDictionary::Subparts::Subparts()
|
|||
addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
|
||||
addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
|
||||
addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
|
||||
addEntry(SUBPART_PHYSICS, new SubpartEntry(SUBPART_PHYSICS, "mTorso", "physics", "physics_main_param_list", "physics_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_FEMALE));
|
||||
addEntry(SUBPART_PHYSICS_BREASTS, new SubpartEntry(SUBPART_PHYSICS_BREASTS, "mTorso", "physics_breasts", "physics_breasts_param_list", "physics_breasts_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
|
||||
addEntry(SUBPART_PHYSICS_BELLY, new SubpartEntry(SUBPART_PHYSICS_BELLY, "mTorso", "physics_belly", "physics_belly_param_list", "physics_belly_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
|
||||
addEntry(SUBPART_PHYSICS_BUTT, new SubpartEntry(SUBPART_PHYSICS_BUTT, "mTorso", "physics_butt", "physics_butt_param_list", "physics_butt_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
|
||||
}
|
||||
|
||||
LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,
|
||||
|
|
@ -1415,7 +1419,16 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
|
|||
{
|
||||
LLPanel::Params p;
|
||||
p.name("LLScrollingPanelParam");
|
||||
LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp);
|
||||
LLWearable *wearable = this->getWearable();
|
||||
LLScrollingPanelParamBase *panel_param = NULL;
|
||||
if (wearable && wearable->getType() == LLWearableType::WT_PHYSICS) // Hack to show a different panel for physics. Should generalize this later.
|
||||
{
|
||||
panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, TRUE, this->getWearable(), jointp);
|
||||
}
|
||||
else
|
||||
{
|
||||
panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp);
|
||||
}
|
||||
height = panel_list->addPanel( panel_param );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -448,8 +448,16 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
|
|||
const F32 behavior_spring = getParamValue("Spring");
|
||||
const F32 behavior_gain = getParamValue("Gain");
|
||||
const F32 behavior_damping = getParamValue("Damping");
|
||||
const F32 behavior_maxspeed = getParamValue("MaxSpeed");
|
||||
const F32 behavior_drag = getParamValue("Drag");
|
||||
const BOOL physics_test = gSavedSettings.getBOOL("AvatarPhysicsTest");
|
||||
|
||||
F32 behavior_maxspeed = getParamValue("MaxSpeed");
|
||||
if (physics_test)
|
||||
behavior_maxspeed = 100.0f;
|
||||
/*
|
||||
if (behavior_maxspeed == 0)
|
||||
return FALSE;
|
||||
*/
|
||||
|
||||
F32 position_current_local = mPosition_local; // Normalized [0,1] range
|
||||
|
||||
|
|
@ -526,9 +534,9 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
|
|||
-behavior_maxspeed, behavior_maxspeed);
|
||||
|
||||
// Temporary debugging setting to cause all avatars to move, for profiling purposes.
|
||||
if (gSavedSettings.getBOOL("AvatarPhysicsTest"))
|
||||
if (physics_test)
|
||||
{
|
||||
velocity_new_local = sin(time*4.0)*5.0;
|
||||
velocity_new_local = sin(time*4.0);
|
||||
}
|
||||
// Calculate the new parameters, or remain unchanged if max speed is 0.
|
||||
const F32 position_new_local = (behavior_maxspeed != 0) ?
|
||||
|
|
|
|||
|
|
@ -50,14 +50,9 @@ const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128;
|
|||
S32 LLScrollingPanelParam::sUpdateDelayFrames = 0;
|
||||
|
||||
LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_params,
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp )
|
||||
: LLScrollingPanel( panel_params ),
|
||||
mParam(param),
|
||||
mAllowModify(allow_modify),
|
||||
mWearable(wearable)
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints )
|
||||
: LLScrollingPanelParamBase( panel_params, mesh, param, allow_modify, wearable, jointp, use_hints)
|
||||
{
|
||||
buildFromFile( "panel_scrolling_param.xml");
|
||||
|
||||
// *HACK To avoid hard coding texture position, lets use border's position for texture.
|
||||
LLViewBorder* left_border = getChild<LLViewBorder>("left_border");
|
||||
|
||||
|
|
@ -73,12 +68,6 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param
|
|||
|
||||
mHintMin->setAllowsUpdates( FALSE );
|
||||
mHintMax->setAllowsUpdates( FALSE );
|
||||
getChild<LLUICtrl>("param slider")->setValue(weightToPercent(param->getWeight()));
|
||||
|
||||
std::string display_name = LLTrans::getString(param->getDisplayName());
|
||||
getChild<LLUICtrl>("param slider")->setLabelArg("[DESC]", display_name);
|
||||
getChildView("param slider")->setEnabled(mAllowModify);
|
||||
childSetCommitCallback("param slider", LLScrollingPanelParam::onSliderMoved, this);
|
||||
|
||||
std::string min_name = LLTrans::getString(param->getMinDisplayName());
|
||||
std::string max_name = LLTrans::getString(param->getMaxDisplayName());
|
||||
|
|
@ -112,20 +101,15 @@ LLScrollingPanelParam::~LLScrollingPanelParam()
|
|||
}
|
||||
void LLScrollingPanelParam::updatePanel(BOOL allow_modify)
|
||||
{
|
||||
LLViewerVisualParam* param = mHintMin->getVisualParam();
|
||||
|
||||
if (!mWearable)
|
||||
{
|
||||
// not editing a wearable just now, no update necessary
|
||||
return;
|
||||
}
|
||||
F32 current_weight = mWearable->getVisualParamWeight( param->getID() );
|
||||
getChild<LLUICtrl>("param slider")->setValue(weightToPercent( current_weight ) );
|
||||
LLScrollingPanelParamBase::updatePanel(allow_modify);
|
||||
|
||||
mHintMin->requestUpdate( sUpdateDelayFrames++ );
|
||||
mHintMax->requestUpdate( sUpdateDelayFrames++ );
|
||||
|
||||
mAllowModify = allow_modify;
|
||||
getChildView("param slider")->setEnabled(mAllowModify);
|
||||
getChildView("less")->setEnabled(mAllowModify);
|
||||
getChildView("more")->setEnabled(mAllowModify);
|
||||
}
|
||||
|
|
@ -135,13 +119,17 @@ void LLScrollingPanelParam::setVisible( BOOL visible )
|
|||
if( getVisible() != visible )
|
||||
{
|
||||
LLPanel::setVisible( visible );
|
||||
mHintMin->setAllowsUpdates( visible );
|
||||
mHintMax->setAllowsUpdates( visible );
|
||||
if (mHintMin)
|
||||
mHintMin->setAllowsUpdates( visible );
|
||||
if (mHintMax)
|
||||
mHintMax->setAllowsUpdates( visible );
|
||||
|
||||
if( visible )
|
||||
{
|
||||
mHintMin->setUpdateDelayFrames( sUpdateDelayFrames++ );
|
||||
mHintMax->setUpdateDelayFrames( sUpdateDelayFrames++ );
|
||||
if (mHintMin)
|
||||
mHintMin->setUpdateDelayFrames( sUpdateDelayFrames++ );
|
||||
if (mHintMax)
|
||||
mHintMax->setUpdateDelayFrames( sUpdateDelayFrames++ );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -164,7 +152,7 @@ void LLScrollingPanelParam::draw()
|
|||
getChildView("min param text")->setVisible( FALSE );
|
||||
getChildView("max param text")->setVisible( FALSE );
|
||||
LLPanel::draw();
|
||||
|
||||
|
||||
// If we're in a focused floater, don't apply the floater's alpha to visual param hint,
|
||||
// making its behavior similar to texture controls'.
|
||||
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
|
||||
|
|
@ -195,23 +183,6 @@ void LLScrollingPanelParam::draw()
|
|||
drawChild(getChild<LLView>("max param text"));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
||||
LLScrollingPanelParam* self = (LLScrollingPanelParam*) userdata;
|
||||
LLViewerVisualParam* param = self->mParam;
|
||||
|
||||
F32 current_weight = self->mWearable->getVisualParamWeight( param->getID() );
|
||||
F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() );
|
||||
if (current_weight != new_weight )
|
||||
{
|
||||
self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE );
|
||||
self->mWearable->writeToAvatar();
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLScrollingPanelParam::onSliderMouseDown(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
|
|
@ -221,7 +192,6 @@ void LLScrollingPanelParam::onSliderMouseDown(LLUICtrl* ctrl, void* userdata)
|
|||
void LLScrollingPanelParam::onSliderMouseUp(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLScrollingPanelParam* self = (LLScrollingPanelParam*) userdata;
|
||||
|
||||
LLVisualParamHint::requestHintUpdates( self->mHintMin, self->mHintMax );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
#ifndef LL_SCROLLINGPANELPARAM_H
|
||||
#define LL_SCROLLINGPANELPARAM_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llscrollingpanellist.h"
|
||||
#include "llscrollingpanelparambase.h"
|
||||
|
||||
class LLViewerJointMesh;
|
||||
class LLViewerVisualParam;
|
||||
|
|
@ -38,11 +37,11 @@ class LLVisualParamHint;
|
|||
class LLViewerVisualParam;
|
||||
class LLJoint;
|
||||
|
||||
class LLScrollingPanelParam : public LLScrollingPanel
|
||||
class LLScrollingPanelParam : public LLScrollingPanelParamBase
|
||||
{
|
||||
public:
|
||||
LLScrollingPanelParam( const LLPanel::Params& panel_params,
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp );
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE );
|
||||
virtual ~LLScrollingPanelParam();
|
||||
|
||||
virtual void draw();
|
||||
|
|
@ -50,7 +49,6 @@ public:
|
|||
virtual void updatePanel(BOOL allow_modify);
|
||||
|
||||
static void onSliderMouseDown(LLUICtrl* ctrl, void* userdata);
|
||||
static void onSliderMoved(LLUICtrl* ctrl, void* userdata);
|
||||
static void onSliderMouseUp(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
static void onHintMinMouseDown(void* userdata);
|
||||
|
|
@ -74,7 +72,6 @@ public:
|
|||
const static S32 PARAM_HINT_HEIGHT;
|
||||
|
||||
public:
|
||||
LLViewerVisualParam* mParam;
|
||||
LLPointer<LLVisualParamHint> mHintMin;
|
||||
LLPointer<LLVisualParamHint> mHintMax;
|
||||
static S32 sUpdateDelayFrames;
|
||||
|
|
@ -82,9 +79,7 @@ public:
|
|||
protected:
|
||||
LLTimer mMouseDownTimer; // timer for how long mouse has been held down on a hint.
|
||||
F32 mLastHeldTime;
|
||||
|
||||
BOOL mAllowModify;
|
||||
LLWearable *mWearable;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
/**
|
||||
* @file llscrollingpanelparam.cpp
|
||||
* @brief UI panel for a list of visual param panels
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llscrollingpanelparambase.h"
|
||||
#include "llviewerjointmesh.h"
|
||||
#include "llviewervisualparam.h"
|
||||
#include "llwearable.h"
|
||||
#include "llviewervisualparam.h"
|
||||
#include "lltoolmorph.h"
|
||||
#include "lltrans.h"
|
||||
#include "llbutton.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewborder.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& panel_params,
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints)
|
||||
: LLScrollingPanel( panel_params ),
|
||||
mParam(param),
|
||||
mAllowModify(allow_modify),
|
||||
mWearable(wearable)
|
||||
{
|
||||
if (use_hints)
|
||||
buildFromFile( "panel_scrolling_param.xml");
|
||||
else
|
||||
buildFromFile( "panel_scrolling_param_base.xml");
|
||||
|
||||
getChild<LLUICtrl>("param slider")->setValue(weightToPercent(param->getWeight()));
|
||||
|
||||
std::string display_name = LLTrans::getString(param->getDisplayName());
|
||||
getChild<LLUICtrl>("param slider")->setLabelArg("[DESC]", display_name);
|
||||
getChildView("param slider")->setEnabled(mAllowModify);
|
||||
childSetCommitCallback("param slider", LLScrollingPanelParamBase::onSliderMoved, this);
|
||||
|
||||
setVisible(FALSE);
|
||||
setBorderVisible( FALSE );
|
||||
}
|
||||
|
||||
LLScrollingPanelParamBase::~LLScrollingPanelParamBase()
|
||||
{
|
||||
}
|
||||
|
||||
void LLScrollingPanelParamBase::updatePanel(BOOL allow_modify)
|
||||
{
|
||||
LLViewerVisualParam* param = mParam;
|
||||
|
||||
if (!mWearable)
|
||||
{
|
||||
// not editing a wearable just now, no update necessary
|
||||
return;
|
||||
}
|
||||
|
||||
F32 current_weight = mWearable->getVisualParamWeight( param->getID() );
|
||||
getChild<LLUICtrl>("param slider")->setValue(weightToPercent( current_weight ) );
|
||||
mAllowModify = allow_modify;
|
||||
getChildView("param slider")->setEnabled(mAllowModify);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLScrollingPanelParamBase::onSliderMoved(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
||||
LLScrollingPanelParamBase* self = (LLScrollingPanelParamBase*) userdata;
|
||||
LLViewerVisualParam* param = self->mParam;
|
||||
|
||||
F32 current_weight = self->mWearable->getVisualParamWeight( param->getID() );
|
||||
F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() );
|
||||
if (current_weight != new_weight )
|
||||
{
|
||||
self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE );
|
||||
self->mWearable->writeToAvatar();
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
}
|
||||
}
|
||||
|
||||
F32 LLScrollingPanelParamBase::weightToPercent( F32 weight )
|
||||
{
|
||||
LLViewerVisualParam* param = mParam;
|
||||
return (weight - param->getMinWeight()) / (param->getMaxWeight() - param->getMinWeight()) * 100.f;
|
||||
}
|
||||
|
||||
F32 LLScrollingPanelParamBase::percentToWeight( F32 percent )
|
||||
{
|
||||
LLViewerVisualParam* param = mParam;
|
||||
return percent / 100.f * (param->getMaxWeight() - param->getMinWeight()) + param->getMinWeight();
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/**
|
||||
* @file llscrollingpanelparam.h
|
||||
* @brief the scrolling panel containing a list of visual param
|
||||
* panels
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_SCROLLINGPANELPARAMBASE_H
|
||||
#define LL_SCROLLINGPANELPARAMBASE_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llscrollingpanellist.h"
|
||||
|
||||
class LLViewerJointMesh;
|
||||
class LLViewerVisualParam;
|
||||
class LLWearable;
|
||||
class LLVisualParamHint;
|
||||
class LLViewerVisualParam;
|
||||
class LLJoint;
|
||||
|
||||
class LLScrollingPanelParamBase : public LLScrollingPanel
|
||||
{
|
||||
public:
|
||||
LLScrollingPanelParamBase( const LLPanel::Params& panel_params,
|
||||
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = FALSE );
|
||||
virtual ~LLScrollingPanelParamBase();
|
||||
|
||||
virtual void updatePanel(BOOL allow_modify);
|
||||
|
||||
static void onSliderMoved(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
F32 weightToPercent( F32 weight );
|
||||
F32 percentToWeight( F32 percent );
|
||||
|
||||
public:
|
||||
LLViewerVisualParam* mParam;
|
||||
protected:
|
||||
BOOL mAllowModify;
|
||||
LLWearable *mWearable;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -34,14 +34,43 @@
|
|||
<accordion_tab
|
||||
layout="topleft"
|
||||
fit_panel="false"
|
||||
min_height="150"
|
||||
name="physics_main_tab"
|
||||
title="Physics">
|
||||
min_height="50"
|
||||
name="physics_breasts_tab"
|
||||
title="Breasts">
|
||||
<scrolling_panel_list
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="physics_main_param_list"
|
||||
name="physics_breasts_param_list"
|
||||
top="0"
|
||||
width="303" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
fit_panel="false"
|
||||
min_height="50"
|
||||
name="physics_belly_tab"
|
||||
title="Belly">
|
||||
<scrolling_panel_list
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="physics_belly_param_list"
|
||||
top="0"
|
||||
width="303" />
|
||||
</accordion_tab>
|
||||
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
fit_panel="false"
|
||||
min_height="50"
|
||||
name="physics_butt_tab"
|
||||
title="Butt">
|
||||
<scrolling_panel_list
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="physics_butt_param_list"
|
||||
top="0"
|
||||
width="303" />
|
||||
</accordion_tab>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="LLScrollingPanelParamBase"
|
||||
height="20"
|
||||
width="290">
|
||||
<slider
|
||||
can_edit_text="true"
|
||||
decimal_digits="0"
|
||||
enabled="false"
|
||||
height="16"
|
||||
increment="1"
|
||||
initial_value="0"
|
||||
label="[DESC]"
|
||||
layout="bottom|left"
|
||||
left="6"
|
||||
max_val="100"
|
||||
name="param slider"
|
||||
bottom="1"
|
||||
width="274"
|
||||
slider_label.font.style="BOLD" />
|
||||
</panel>
|
||||
|
|
@ -2500,7 +2500,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
|
|||
<string name="Body Thin">Body Thin</string>
|
||||
|
||||
<string name="Bow Legged">Bow Legged</string>
|
||||
<string name="Breast Physics Updown Controller">Breast Buoyancy</string>
|
||||
<string name="Breast Physics UpDown Controller">Breast Buoyancy</string>
|
||||
<string name="Breast Physics Side Controller">Breast Cleavage</string>
|
||||
<string name="Breast Size">Breast Size</string>
|
||||
<string name="Bridge Width">Bridge Width</string>
|
||||
|
|
@ -2527,14 +2527,11 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
|
|||
<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 Controller">Belly Updown Bounce</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="Butt Physics UpDown Controller">Butt UpDown Bounce</string>
|
||||
<string name="Butt Physics LeftRight Controller">Butt LeftRight Bounce</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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue