From a6947425220a07fe907b87d68ce0f2d4599ae092 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Fri, 29 Apr 2011 03:39:05 -0500 Subject: [PATCH] Added physics subpanel to avatar customize floater. Also, removed redundant tattoo and alpha entries. Modified LLScrollingPanelParam to work without needing 'hints'. A bit hacky since I didn't want to dive into making yet another xml, but works well enough. Avatar_lad entries names changed to more readable forms since LLTrans isn't where it needs to be yet. Camera doesn't move to great positions when editing phys parts, but that's for another day. --- indra/newview/character/avatar_lad.xml | 66 ++--- indra/newview/llfloatercustomize.cpp | 276 +++++++++++------- indra/newview/llfloatercustomize.h | 2 +- .../default/xui/en-us/floater_customize.xml | 94 +++++- 4 files changed, 291 insertions(+), 147 deletions(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index b2f3aea4c..2f92d6212 100755 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -11407,7 +11407,7 @@ group="0" sex="female" name="Breast_Physics_Mass" - label="Breast Physics Mass" + label="Breast Mass" wearable="physics" edit_group="physics_advanced" value_default=".1" @@ -11420,7 +11420,7 @@ group="0" sex="female" name="Breast_Physics_Gravity" - label="Breast Physics Gravity" + label="Breast Gravity" wearable="physics" edit_group="physics_advanced" value_default="0" @@ -11434,7 +11434,7 @@ group="0" sex="female" name="Breast_Physics_Drag" - label="Breast Physics Drag" + label="Breast Drag" wearable="physics" edit_group="physics_advanced" value_default="1" @@ -11448,7 +11448,7 @@ group="0" sex="female" name="Breast_Physics_UpDown_Max_Effect" - label="Breast Physics UpDown Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_breasts_updown" value_default="0" @@ -11461,7 +11461,7 @@ group="0" sex="female" name="Breast_Physics_UpDown_Spring" - label="Breast Physics UpDown Spring" + label="Spring" wearable="physics" edit_group="physics_breasts_updown" value_default="10" @@ -11474,7 +11474,7 @@ group="0" sex="female" name="Breast_Physics_UpDown_Gain" - label="Breast Physics UpDown Gain" + label="Gain" wearable="physics" edit_group="physics_breasts_updown" value_default="10" @@ -11487,7 +11487,7 @@ group="0" sex="female" name="Breast_Physics_UpDown_Damping" - label="Breast Physics UpDown Damping" + label="Damping" wearable="physics" edit_group="physics_breasts_updown" value_default=".2" @@ -11501,7 +11501,7 @@ group="0" sex="female" name="Breast_Physics_InOut_Max_Effect" - label="Breast Physics InOut Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_breasts_inout" value_default="0" @@ -11514,7 +11514,7 @@ group="0" sex="female" name="Breast_Physics_InOut_Spring" - label="Breast Physics InOut Spring" + label="Spring" wearable="physics" edit_group="physics_breasts_inout" value_default="10" @@ -11527,7 +11527,7 @@ group="0" sex="female" name="Breast_Physics_InOut_Gain" - label="Breast Physics InOut Gain" + label="Gain" wearable="physics" edit_group="physics_breasts_inout" value_default="10" @@ -11540,7 +11540,7 @@ group="0" sex="female" name="Breast_Physics_InOut_Damping" - label="Breast Physics InOut Damping" + label="Damping" wearable="physics" edit_group="physics_breasts_inout" value_default=".2" @@ -11553,7 +11553,7 @@ id="10011" group="0" name="Belly_Physics_Mass" - label="Belly Physics Mass" + label="Belly Mass" wearable="physics" edit_group="physics_advanced" value_default=".1" @@ -11565,7 +11565,7 @@ id="10012" group="0" name="Belly_Physics_Gravity" - label="Belly Physics Gravity" + label="Belly Gravity" wearable="physics" edit_group="physics_advanced" value_default="0" @@ -11577,7 +11577,7 @@ id="10013" group="0" name="Belly_Physics_Drag" - label="Belly Physics Drag" + label="Belly Drag" wearable="physics" edit_group="physics_advanced" value_default="1" @@ -11589,7 +11589,7 @@ id="10014" group="0" name="Belly_Physics_UpDown_Max_Effect" - label="Belly Physics UpDown Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_belly_updown" value_default="0" @@ -11601,7 +11601,7 @@ id="10015" group="0" name="Belly_Physics_UpDown_Spring" - label="Belly Physics UpDown Spring" + label="Spring" wearable="physics" edit_group="physics_belly_updown" value_default="10" @@ -11613,7 +11613,7 @@ id="10016" group="0" name="Belly_Physics_UpDown_Gain" - label="Belly Physics UpDown Gain" + label="Gain" wearable="physics" edit_group="physics_belly_updown" value_default="10" @@ -11625,7 +11625,7 @@ id="10017" group="0" name="Belly_Physics_UpDown_Damping" - label="Belly Physics UpDown Damping" + label="Damping" wearable="physics" edit_group="physics_belly_updown" value_default=".2" @@ -11638,7 +11638,7 @@ id="10018" group="0" name="Butt_Physics_Mass" - label="Butt Physics Mass" + label="Butt Mass" wearable="physics" edit_group="physics_advanced" value_default=".1" @@ -11650,7 +11650,7 @@ id="10019" group="0" name="Butt_Physics_Gravity" - label="Butt Physics Gravity" + label="Butt Gravity" wearable="physics" edit_group="physics_advanced" value_default="0" @@ -11662,7 +11662,7 @@ id="10020" group="0" name="Butt_Physics_Drag" - label="Butt Physics Drag" + label="Butt Drag" wearable="physics" edit_group="physics_advanced" value_default="1" @@ -11675,7 +11675,7 @@ id="10021" group="0" name="Butt_Physics_UpDown_Max_Effect" - label="Butt Physics UpDown Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_butt_updown" value_default="0" @@ -11687,7 +11687,7 @@ id="10022" group="0" name="Butt_Physics_UpDown_Spring" - label="Butt Physics UpDown Spring" + label="Spring" wearable="physics" edit_group="physics_butt_updown" value_default="10" @@ -11699,7 +11699,7 @@ id="10023" group="0" name="Butt_Physics_UpDown_Gain" - label="Butt Physics UpDown Gain" + label="Gain" wearable="physics" edit_group="physics_butt_updown" value_default="10" @@ -11711,7 +11711,7 @@ id="10024" group="0" name="Butt_Physics_UpDown_Damping" - label="Butt Physics UpDown Damping" + label="Damping" wearable="physics" edit_group="physics_butt_updown" value_default=".2" @@ -11724,7 +11724,7 @@ id="10025" group="0" name="Butt_Physics_LeftRight_Max_Effect" - label="Butt Physics LeftRight Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_butt_leftright" value_default="0" @@ -11736,7 +11736,7 @@ id="10026" group="0" name="Butt_Physics_LeftRight_Spring" - label="Butt Physics LeftRight Spring" + label="Spring" wearable="physics" edit_group="physics_butt_leftright" value_default="10" @@ -11748,7 +11748,7 @@ id="10027" group="0" name="Butt_Physics_LeftRight_Gain" - label="Butt Physics LeftRight Gain" + label="Gain" wearable="physics" edit_group="physics_butt_leftright" value_default="10" @@ -11760,7 +11760,7 @@ id="10028" group="0" name="Butt_Physics_LeftRight_Damping" - label="Butt Physics LeftRight Damping" + label="Damping" wearable="physics" edit_group="physics_butt_leftright" value_default=".2" @@ -11774,7 +11774,7 @@ group="0" sex="female" name="Breast_Physics_LeftRight_Max_Effect" - label="Breast Physics LeftRight Max Effect" + label="Max Effect" wearable="physics" edit_group="physics_breasts_leftright" value_default="0" @@ -11787,7 +11787,7 @@ group="0" sex="female" name="Breast_Physics_LeftRight_Spring" - label="Breast Physics LeftRight Spring" + label="Spring" wearable="physics" edit_group="physics_breasts_leftright" value_default="10" @@ -11800,7 +11800,7 @@ group="0" sex="female" name="Breast_Physics_LeftRight_Gain" - label="Breast Physics LeftRight Gain" + label="Gain" wearable="physics" edit_group="physics_breasts_leftright" value_default="10" @@ -11813,7 +11813,7 @@ group="0" sex="female" name="Breast_Physics_LeftRight_Damping" - label="Breast Physics LeftRight Damping" + label="Damping" wearable="physics" edit_group="physics_breasts_leftright" value_default=".2" diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 2cc35f404..c950b8c33 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -417,7 +417,7 @@ enum ESubpart { struct LLSubpart { - LLSubpart() : mSex( SEX_BOTH ) {} + LLSubpart() : mSex( SEX_BOTH ), mVisualHint(true) {} std::string mButtonName; std::string mTargetJoint; @@ -425,6 +425,8 @@ struct LLSubpart LLVector3d mTargetOffset; LLVector3d mCameraOffset; ESex mSex; + + bool mVisualHint; }; //////////////////////////////////////////////////////////////////////////// @@ -629,7 +631,7 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart ) llassert( sorted_params.find(-param->getDisplayOrder()) == sorted_params.end() ); // Check for duplicates sorted_params.insert(vt); } - gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); + gFloaterCustomize->generateVisualParamHints(NULL, sorted_params, part->mVisualHint); gFloaterCustomize->updateScrollingPanelUI(); gFloaterCustomize->childSetEnabled("Export", can_export); gFloaterCustomize->childSetEnabled("Import", can_import); @@ -982,6 +984,7 @@ void LLPanelEditWearable::draw() for (std::map::iterator iter = mSubpartList.begin(); iter != mSubpartList.end(); ++iter) { + childSetVisible(iter->second->mButtonName,has_wearable); if( has_wearable && is_complete && is_modifiable ) { childSetEnabled(iter->second->mButtonName, iter->second->mSex & avatar->getSex() ); @@ -1001,6 +1004,8 @@ void LLPanelEditWearable::draw() childSetVisible("path", FALSE); + LLTextBox *av_height = getChild("avheight",FALSE,FALSE); + if(av_height) //Only display this if the element exists { // Display the shape's nominal height. // @@ -1014,8 +1019,8 @@ void LLPanelEditWearable::draw() std::ostringstream avheight(std::ostringstream::trunc); avheight << std::fixed << std::setprecision(2) << avsize << " m (" << feet << "' " << inches << "\")"; - childSetVisible("avheight", TRUE); - childSetTextArg("avheight", "[AVHEIGHT]", avheight.str()); + av_height->setVisible(TRUE); + av_height->setTextArg("[AVHEIGHT]",avheight.str()); } if(has_wearable && !is_modifiable) @@ -1279,7 +1284,7 @@ void LLPanelEditWearable::setUIPermissions(U32 perm_mask, BOOL is_complete) class LLScrollingPanelParam : public LLScrollingPanel { public: - LLScrollingPanelParam( const std::string& name, LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify ); + LLScrollingPanelParam( const std::string& name, LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, bool bVisualHint ); virtual ~LLScrollingPanelParam(); virtual void draw(); @@ -1307,6 +1312,9 @@ public: LLViewerVisualParam* mParam; LLPointer mHintMin; LLPointer mHintMax; + LLButton* mLess; + LLButton* mMore; + static S32 sUpdateDelayFrames; protected: @@ -1327,51 +1335,68 @@ const S32 PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH + LLPANEL_B const S32 PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH; LLScrollingPanelParam::LLScrollingPanelParam( const std::string& name, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify ) + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, bool bVisualHint ) : LLScrollingPanel( name, LLRect( 0, PARAM_PANEL_HEIGHT, PARAM_PANEL_WIDTH, 0 ) ), mParam(param), - mAllowModify(allow_modify) + mAllowModify(allow_modify), + mLess(NULL), + mMore(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml"); - - S32 pos_x = 2 * LLPANEL_BORDER_WIDTH; - S32 pos_y = 3 * LLPANEL_BORDER_WIDTH + SLIDERCTRL_HEIGHT; - F32 min_weight = param->getMinWeight(); - F32 max_weight = param->getMaxWeight(); - - mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, param, min_weight); - pos_x += PARAM_HINT_WIDTH + 3 * BTN_BORDER; - mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, param, max_weight ); - mHintMin->setAllowsUpdates( FALSE ); - mHintMax->setAllowsUpdates( FALSE ); - childSetValue("param slider", weightToPercent(param->getWeight())); - childSetLabelArg("param slider", "[DESC]", param->getDisplayName()); - childSetEnabled("param slider", mAllowModify); - childSetCommitCallback("param slider", LLScrollingPanelParam::onSliderMoved, this); + //Set up the slider + LLSliderCtrl *slider = getChild("param slider"); + slider->setValue(weightToPercent(param->getWeight())); + slider->setLabelArg("[DESC]", param->getDisplayName()); + slider->setEnabled(mAllowModify); + slider->setCommitCallback(LLScrollingPanelParam::onSliderMoved); + slider->setCallbackUserData(this); - // *TODO::translate - std::string min_name = param->getMinDisplayName(); - std::string max_name = param->getMaxDisplayName(); - childSetValue("min param text", min_name); - childSetValue("max param text", max_name); - - LLButton* less = getChild("less"); - if (less) + if(bVisualHint) { - less->setMouseDownCallback( LLScrollingPanelParam::onHintMinMouseDown ); - less->setMouseUpCallback( LLScrollingPanelParam::onHintMinMouseUp ); - less->setHeldDownCallback( LLScrollingPanelParam::onHintMinHeldDown ); - less->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD ); + S32 pos_x = 2 * LLPANEL_BORDER_WIDTH; + S32 pos_y = 3 * LLPANEL_BORDER_WIDTH + SLIDERCTRL_HEIGHT; + F32 min_weight = param->getMinWeight(); + F32 max_weight = param->getMaxWeight(); + + mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, param, min_weight); + pos_x += PARAM_HINT_WIDTH + 3 * BTN_BORDER; + mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, param, max_weight ); + + mHintMin->setAllowsUpdates( FALSE ); + mHintMax->setAllowsUpdates( FALSE ); + + // *TODO::translate + std::string min_name = param->getMinDisplayName(); + std::string max_name = param->getMaxDisplayName(); + childSetValue("min param text", min_name); + childSetValue("max param text", max_name); + mLess = getChild("less"); + mLess->setMouseDownCallback( LLScrollingPanelParam::onHintMinMouseDown ); + mLess->setMouseUpCallback( LLScrollingPanelParam::onHintMinMouseUp ); + mLess->setHeldDownCallback( LLScrollingPanelParam::onHintMinHeldDown ); + mLess->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD ); + + mMore = getChild("more"); + mMore->setMouseDownCallback( LLScrollingPanelParam::onHintMaxMouseDown ); + mMore->setMouseUpCallback( LLScrollingPanelParam::onHintMaxMouseUp ); + mMore->setHeldDownCallback( LLScrollingPanelParam::onHintMaxHeldDown ); + mMore->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD ); } - - LLButton* more = getChild("more"); - if (more) + else { - more->setMouseDownCallback( LLScrollingPanelParam::onHintMaxMouseDown ); - more->setMouseUpCallback( LLScrollingPanelParam::onHintMaxMouseUp ); - more->setHeldDownCallback( LLScrollingPanelParam::onHintMaxHeldDown ); - more->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD ); + //Kill everything that isn't the slider... + for(child_list_t::const_iterator it = getChildList()->begin();it!=getChildList()->end();) + { + if((*it)!=slider && (*it)->getName() != "panel border") + { + llinfos << "removing: " << (*it)->getName() << llendl; + removeChild((*(it++)),TRUE); + } + else ++it; + } + slider->translate(0,PARAM_HINT_HEIGHT); + reshape(getRect().getWidth(),getRect().getHeight()-PARAM_HINT_HEIGHT); } setVisible(FALSE); @@ -1386,15 +1411,19 @@ LLScrollingPanelParam::~LLScrollingPanelParam() void LLScrollingPanelParam::updatePanel(BOOL allow_modify) { - LLViewerVisualParam* param = mHintMin->getVisualParam(); - childSetValue("param slider", weightToPercent( param->getWeight() ) ); - mHintMin->requestUpdate( sUpdateDelayFrames++ ); - mHintMax->requestUpdate( sUpdateDelayFrames++ ); + childSetValue("param slider", weightToPercent( mParam->getWeight() ) ); + if(mHintMin) + mHintMin->requestUpdate( sUpdateDelayFrames++ ); + if(mHintMax) + mHintMax->requestUpdate( sUpdateDelayFrames++ ); mAllowModify = allow_modify; childSetEnabled("param slider", mAllowModify); - childSetEnabled("less", mAllowModify); - childSetEnabled("more", mAllowModify); + + if(mLess) + mLess->setEnabled(mAllowModify); + if(mMore) + mMore->setEnabled(mAllowModify); } void LLScrollingPanelParam::setVisible( BOOL visible ) @@ -1402,13 +1431,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++ ); } } } @@ -1420,8 +1453,10 @@ void LLScrollingPanelParam::draw() return; } - childSetVisible("less", mHintMin->getVisible()); - childSetVisible("more", mHintMax->getVisible()); + if(mLess) + mLess->setVisible(mHintMin ? mHintMin->getVisible() : false); + if(mMore) + mMore->setVisible(mHintMax ? mHintMax->getVisible() : false); // Draw all the children except for the labels childSetVisible( "min param text", FALSE ); @@ -1429,25 +1464,31 @@ void LLScrollingPanelParam::draw() LLPanel::draw(); // Draw the hints over the "less" and "more" buttons. - glPushMatrix(); + if(mHintMin) { - const LLRect& r = mHintMin->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - glTranslatef(left, bot, 0.f); - mHintMin->draw(); + glPushMatrix(); + { + const LLRect& r = mHintMin->getRect(); + F32 left = (F32)(r.mLeft + BTN_BORDER); + F32 bot = (F32)(r.mBottom + BTN_BORDER); + glTranslatef(left, bot, 0.f); + mHintMin->draw(); + } + glPopMatrix(); } - glPopMatrix(); - glPushMatrix(); + if(mHintMax) { - const LLRect& r = mHintMax->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - glTranslatef(left, bot, 0.f); - mHintMax->draw(); + glPushMatrix(); + { + const LLRect& r = mHintMax->getRect(); + F32 left = (F32)(r.mLeft + BTN_BORDER); + F32 bot = (F32)(r.mBottom + BTN_BORDER); + glTranslatef(left, bot, 0.f); + mHintMax->draw(); + } + glPopMatrix(); } - glPopMatrix(); // Draw labels on top of the buttons @@ -1692,6 +1733,8 @@ LLFloaterCustomize::LLFloaterCustomize() mNextStepAfterSaveCallback( NULL ), mNextStepAfterSaveUserdata( NULL ) { + memset(&mWearablePanelList[0],0,sizeof(char*)*WT_COUNT); //Initialize to 0 + gSavedSettings.setU32("AvatarSex", (gAgent.getAvatarObject()->getSex() == SEX_MALE) ); mResetParams = new LLVisualParamReset(); @@ -2416,63 +2459,72 @@ void LLFloaterCustomize::initWearablePanels() } ///////////////////////////////////////// - // Alpha - panel = mWearablePanelList[WT_ALPHA]; + // Physics - if (panel) + panel = mWearablePanelList[WT_PHYSICS]; + + if(panel) { part = new LLSubpart(); - part->mTargetJoint = "mPelvis"; - part->mEditGroup = "alpha"; + part->mSex = SEX_FEMALE; + part->mTargetJoint = "mTorso"; + part->mEditGroup = "physics_breasts_updown"; part->mTargetOffset.setVec(0.f, 0.f, 0.1f); part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); - panel->addSubpart(LLStringUtil::null, SUBPART_ALPHA, part); + part->mVisualHint = false; + panel->addSubpart("Breast Bounce", SUBPART_PHYSICS_BREASTS_UPDOWN, part); - panel->addTextureDropTarget(TEX_LOWER_ALPHA, "Lower Alpha", - LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), - TRUE); - panel->addTextureDropTarget(TEX_UPPER_ALPHA, "Upper Alpha", - LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), - TRUE); - panel->addTextureDropTarget(TEX_HEAD_ALPHA, "Head Alpha", - LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), - TRUE); - panel->addTextureDropTarget(TEX_EYES_ALPHA, "Eye Alpha", - LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), - TRUE); - panel->addTextureDropTarget(TEX_HAIR_ALPHA, "Hair Alpha", - LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), - TRUE); + part = new LLSubpart(); + part->mSex = SEX_FEMALE; + part->mTargetJoint = "mTorso"; + part->mEditGroup = "physics_breasts_inout"; + part->mTargetOffset.setVec(0.f, 0.f, 0.1f); + part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); + part->mVisualHint = false; + panel->addSubpart("Breast Cleavage", SUBPART_PHYSICS_BREASTS_INOUT, part); - panel->addInvisibilityCheckbox(TEX_LOWER_ALPHA, "lower alpha texture invisible"); - panel->addInvisibilityCheckbox(TEX_UPPER_ALPHA, "upper alpha texture invisible"); - panel->addInvisibilityCheckbox(TEX_HEAD_ALPHA, "head alpha texture invisible"); - panel->addInvisibilityCheckbox(TEX_EYES_ALPHA, "eye alpha texture invisible"); - panel->addInvisibilityCheckbox(TEX_HAIR_ALPHA, "hair alpha texture invisible"); - } + part = new LLSubpart(); + part->mSex = SEX_FEMALE; + part->mTargetJoint = "mTorso"; + part->mEditGroup = "physics_breasts_leftright"; + part->mTargetOffset.setVec(0.f, 0.f, 0.1f); + part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); + part->mVisualHint = false; + panel->addSubpart("Breast Sway", SUBPART_PHYSICS_BREASTS_LEFTRIGHT, part); - ///////////////////////////////////////// - // Tattoo - panel = mWearablePanelList[WT_TATTOO]; + part = new LLSubpart(); + part->mSex = SEX_FEMALE; + part->mTargetJoint = "mTorso"; + part->mEditGroup = "physics_belly_updown"; + part->mTargetOffset.setVec(0.f, 0.f, 0.1f); + part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); + part->mVisualHint = false; + panel->addSubpart("Belly Bounce", SUBPART_PHYSICS_BELLY_UPDOWN, part); - if (panel) - { part = new LLSubpart(); part->mTargetJoint = "mPelvis"; - part->mEditGroup = "tattoo"; + part->mEditGroup = "physics_butt_updown"; part->mTargetOffset.setVec(0.f, 0.f, 0.1f); part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); - panel->addSubpart(LLStringUtil::null, SUBPART_TATTOO, part); + part->mVisualHint = false; + panel->addSubpart("Butt Bounce", SUBPART_PHYSICS_BUTT_UPDOWN, part); + + part = new LLSubpart(); + part->mTargetJoint = "mPelvis"; + part->mEditGroup = "physics_butt_leftright"; + part->mTargetOffset.setVec(0.f, 0.f, 0.1f); + part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); + part->mVisualHint = false; + panel->addSubpart("Butt Sway", SUBPART_PHYSICS_BUTT_LEFTRIGHT, part); + + part = new LLSubpart(); + part->mTargetJoint = "mTorso"; + part->mEditGroup = "physics_advanced"; + part->mTargetOffset.setVec(0.f, 0.f, 0.1f); + part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f); + part->mVisualHint = false; + panel->addSubpart("Advanced Parameters", SUBPART_PHYSICS_ADVANCED, part); - panel->addTextureDropTarget(TEX_LOWER_TATTOO, "Lower Tattoo", - LLUUID::null, - TRUE); - panel->addTextureDropTarget(TEX_UPPER_TATTOO, "Upper Tattoo", - LLUUID::null, - TRUE); - panel->addTextureDropTarget(TEX_HEAD_TATTOO, "Head Tattoo", - LLUUID::null, - TRUE); } } @@ -2607,7 +2659,7 @@ void LLFloaterCustomize::clearScrollingPanelList() } } -void LLFloaterCustomize::generateVisualParamHints(LLViewerJointMesh* joint_mesh, LLFloaterCustomize::param_map& params) +void LLFloaterCustomize::generateVisualParamHints(LLViewerJointMesh* joint_mesh, LLFloaterCustomize::param_map& params, bool bVisualHint) { // sorted_params is sorted according to magnitude of effect from // least to greatest. Adding to the front of the child list @@ -2618,7 +2670,7 @@ void LLFloaterCustomize::generateVisualParamHints(LLViewerJointMesh* joint_mesh, param_map::iterator end = params.end(); for(param_map::iterator it = params.begin(); it != end; ++it) { - mScrollingPanelList->addPanel( new LLScrollingPanelParam( "LLScrollingPanelParam", joint_mesh, (*it).second.second, (*it).second.first) ); + mScrollingPanelList->addPanel( new LLScrollingPanelParam( "LLScrollingPanelParam", joint_mesh, (*it).second.second, (*it).second.first, bVisualHint) ); } } } diff --git a/indra/newview/llfloatercustomize.h b/indra/newview/llfloatercustomize.h index 5648cc6af..ceb49af01 100644 --- a/indra/newview/llfloatercustomize.h +++ b/indra/newview/llfloatercustomize.h @@ -88,7 +88,7 @@ public: // New methods void clearScrollingPanelList(); void generateVisualParamHints(LLViewerJointMesh* joint_mesh, - param_map& params); + param_map& params, bool bVisualHint); const std::string& getEditGroup(); void updateScrollingPanelList(BOOL allow_modify); diff --git a/indra/newview/skins/default/xui/en-us/floater_customize.xml b/indra/newview/skins/default/xui/en-us/floater_customize.xml index 2dea4626a..261ab3189 100644 --- a/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/indra/newview/skins/default/xui/en-us/floater_customize.xml @@ -1298,11 +1298,103 @@ scratch and wear it.