diff options
author | Seraph Linden <none@none> | 2011-04-03 13:56:55 -0400 |
---|---|---|
committer | Seraph Linden <none@none> | 2011-04-03 13:56:55 -0400 |
commit | a47ea6c619d1b689478f9e41c87cb89c010273de (patch) | |
tree | 0a30299a13e89db878f1c2b8837f79c1413d96ce | |
parent | cc2a813ce40a09bab230a62809f5ff21083a81f2 (diff) |
Added breast sway (left-right).
-rw-r--r-- | indra/newview/character/avatar_lad.xml | 77 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llphysicsmotion.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llpolymesh.cpp | 31 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_physics.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 5 |
6 files changed, 154 insertions, 2 deletions
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index fa286e99ef..c63701cea5 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -4331,6 +4331,18 @@ <param_morph /> </param> + <param + id="1207" + group="1" + name="Breast_Physics_LeftRight_Driven" + wearable="physics" + edit_group="driven" + value_default="0" + value_min="-2" + value_max="2"> + <param_morph /> + </param> + <!-- #end morph targets --> @@ -4873,7 +4885,6 @@ <param_morph /> </param> - <!-- #end morph targets --> @@ -11787,6 +11798,21 @@ render_pass="bump"> </param> <param + id="1105" + group="1" + wearable="shape" + name="Breast_Physics_LeftRight_Controller" + label="Breast Physics LeftRight Controller" + value_min="-1" + value_max="1" + value_default="0"> + <param_driver> + <driven + id="1207" /> + </param_driver> + </param> + + <param id="10000" group="0" sex="female" @@ -12192,6 +12218,55 @@ render_pass="bump"> <param_driver /> </param> + <param + id="10032" + group="0" + name="Breast_Physics_LeftRight_Max_Velocity" + label="Breast Physics LeftRight Max Speed" + wearable="physics" + edit_group="physics_breasts_leftright" + value_default="0" + value_min="0" + value_max="10"> + <param_driver /> + </param> + <param + id="10033" + group="0" + name="Breast_Physics_LeftRight_Spring" + label="Breast Physics LeftRight Spring" + wearable="physics" + edit_group="physics_breasts_leftright" + value_default=".1" + value_min="0" + value_max="1"> + <param_driver /> + </param> + <param + id="10034" + group="0" + name="Breast_Physics_LeftRight_Gain" + label="Breast Physics LeftRight Gain" + wearable="physics" + edit_group="physics_breasts_leftright" + value_default="10" + value_min="1" + value_max="100"> + <param_driver /> + </param> + <param + id="10035" + group="0" + name="Breast_Physics_LeftRight_Damping" + label="Breast Physics LeftRight Damping" + wearable="physics" + edit_group="physics_breasts_leftright" + value_default=".05" + value_min="0" + value_max=".1"> + <param_driver /> + </param> + </driver_parameters> <morph_masks> diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index d0ce765a69..8bd2d5ad6a 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -97,6 +97,7 @@ enum ESubpart { SUBPART_TATTOO, SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, + SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, @@ -239,7 +240,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,6, SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED)); + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text",0,0,7, SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED)); } LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type, @@ -312,6 +313,7 @@ LLEditWearableDictionary::Subparts::Subparts() 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_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); addEntry(SUBPART_PHYSICS_BREASTS_INOUT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); + addEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, "mTorso", "physics_breasts_leftright", "physics_breasts_leftright_param_list", "physics_breasts_leftright_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); addEntry(SUBPART_PHYSICS_BELLY_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); addEntry(SUBPART_PHYSICS_BUTT_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 53809b4d19..43044e20ea 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -287,6 +287,31 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter }
addMotion(motion);
}
+
+ // Breast Sway
+ {
+ controller_map_t controller;
+ controller["Mass"] = "Breast_Physics_Mass";
+ controller["Smoothing"] = "Breast_Physics_Smoothing";
+ controller["Gravity"] = "Breast_Physics_Gravity";
+ controller["Drag"] = "Breast_Physics_Drag";
+ controller["Damping"] = "Breast_Physics_LeftRight_Damping";
+ controller["MaxSpeed"] = "Breast_Physics_LeftRight_Max_Velocity";
+ controller["Spring"] = "Breast_Physics_LeftRight_Spring";
+ controller["Gain"] = "Breast_Physics_LeftRight_Gain";
+ LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_LeftRight_Controller",
+ "",
+ "mChest",
+ character,
+ LLVector3(0,-1,0),
+ controller);
+ if (!motion->initialize())
+ {
+ llassert_always(FALSE);
+ return STATUS_FAILURE;
+ }
+ addMotion(motion);
+ }
// Butt Bounce
{
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp index 6d6fb2fa0e..c1144958eb 100644 --- a/indra/newview/llpolymesh.cpp +++ b/indra/newview/llpolymesh.cpp @@ -49,6 +49,9 @@ extern LLControlGroup gSavedSettings; // read only LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data, const LLVector3 &direction, const std::string &name); +LLPolyMorphData *clone_morph_param_cleavage(const LLPolyMorphData *src_data, + F32 scale, + const std::string &name); //----------------------------------------------------------------------------- // Global table of loaded LLPolyMeshes @@ -607,6 +610,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) mMorphData.insert(morph_data); + if (!strcmp(morphName, "Breast_Female_Cleavage")) + { + mMorphData.insert(clone_morph_param_cleavage(morph_data, + 0.5f, + "Breast_Physics_LeftRight_Driven")); + } + if (!strcmp(morphName, "Big_Belly_Torso")) { mMorphData.insert(clone_morph_param(morph_data, @@ -1212,4 +1222,25 @@ LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data, return cloned_morph_data; } +LLPolyMorphData *clone_morph_param_cleavage(const LLPolyMorphData *src_data, + F32 scale, + const std::string &name) +{ + LLPolyMorphData* cloned_morph_data = new LLPolyMorphData(*src_data); + cloned_morph_data->mName = name; + for (U32 v=0; v < cloned_morph_data->mNumIndices; v++) + { + cloned_morph_data->mCoords[v] = src_data->mCoords[v]*scale; + cloned_morph_data->mNormals[v] = src_data->mNormals[v]*scale; + cloned_morph_data->mBinormals[v] = src_data->mBinormals[v]*scale; + if (cloned_morph_data->mCoords[v][1] < 0) + { + cloned_morph_data->mCoords[v][1] *= -1; + cloned_morph_data->mNormals[v][1] *= -1; + cloned_morph_data->mBinormals[v][1] *= -1; + } + } + return cloned_morph_data; +} + // End diff --git a/indra/newview/skins/default/xui/en/panel_edit_physics.xml b/indra/newview/skins/default/xui/en/panel_edit_physics.xml index c6f974f4f1..0092ceb0dd 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_physics.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_physics.xml @@ -64,6 +64,20 @@ layout="topleft" fit_panel="false" min_height="50" + name="physics_breasts_leftright_tab" + title="Breasts Sway"> + <scrolling_panel_list + follows="all" + layout="topleft" + left="0" + name="physics_breasts_leftright_param_list" + top_pad="50" + width="303" /> + </accordion_tab> + <accordion_tab + layout="topleft" + fit_panel="false" + min_height="50" name="physics_belly_tab" title="Belly Bounce"> <scrolling_panel_list diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 879ed2b505..b4c3ab3817 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2526,6 +2526,11 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Breast Physics UpDown Gain">Gain</string> <string name="Breast Physics UpDown Damping">Damping</string> +<string name="Breast Physics LeftRight Max Speed">Max Effect</string> +<string name="Breast Physics LeftRight Spring">Spring</string> +<string name="Breast Physics LeftRight Gain">Gain</string> +<string name="Breast Physics LeftRight Damping">Damping</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> |