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.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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<ESubpart, LLSubpart*>::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<LLTextBox>("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<LLVisualParamHint> mHintMin;
|
||||
LLPointer<LLVisualParamHint> 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<LLSliderCtrl>("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<LLButton>("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<LLButton>("less");
|
||||
mLess->setMouseDownCallback( LLScrollingPanelParam::onHintMinMouseDown );
|
||||
mLess->setMouseUpCallback( LLScrollingPanelParam::onHintMinMouseUp );
|
||||
mLess->setHeldDownCallback( LLScrollingPanelParam::onHintMinHeldDown );
|
||||
mLess->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
|
||||
|
||||
mMore = getChild<LLButton>("more");
|
||||
mMore->setMouseDownCallback( LLScrollingPanelParam::onHintMaxMouseDown );
|
||||
mMore->setMouseUpCallback( LLScrollingPanelParam::onHintMaxMouseUp );
|
||||
mMore->setHeldDownCallback( LLScrollingPanelParam::onHintMaxHeldDown );
|
||||
mMore->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
|
||||
}
|
||||
|
||||
LLButton* more = getChild<LLButton>("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) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1298,11 +1298,103 @@ scratch and wear it.
|
||||
<button name="Revert" label="Revert" label_selected="Revert"
|
||||
follows="right|bottom" width="82" height="20" left="305" bottom="-478"/>
|
||||
</panel>
|
||||
<panel border="true" bottom="-482" follows="left|top|right|bottom" height="481"
|
||||
label="Physics" left="102" mouse_opaque="true" name="Physics" width="389">
|
||||
<icon bottom="-21" color="1 1 1 1" follows="top|right" height="16"
|
||||
image_name="icon_lock.tga" left="333" mouse_opaque="true" name="square"
|
||||
width="16" />
|
||||
<icon bottom="-24" color="1 1 1 1" follows="left|top" height="16" left="8"
|
||||
mouse_opaque="true" name="icon" width="16" />
|
||||
<button bottom="-81" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Belly Bounce" label_selected="Belly Bounce" left="8"
|
||||
mouse_opaque="true" name="Belly Bounce" scale_image="true" width="82" />
|
||||
<button bottom="-113" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Breast Bounce" label_selected="Breast Bounce" left="8"
|
||||
mouse_opaque="true" name="Breast Bounce" scale_image="true" width="82" />
|
||||
<button bottom="-145" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Breast Cleavage" label_selected="Breast Cleavage" left="8"
|
||||
mouse_opaque="true" name="Breast Cleavage" scale_image="true" width="82" />
|
||||
<button bottom="-177" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Breast Sway" label_selected="Breast Sway" left="8"
|
||||
mouse_opaque="true" name="Breast Sway" scale_image="true" width="82" />
|
||||
<button bottom="-209" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Butt Bounce" label_selected="Butt Bounce" left="8"
|
||||
mouse_opaque="true" name="Butt Bounce" scale_image="true" width="82" />
|
||||
<button bottom="-241" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Butt Sway" label_selected="Butt Sway" left="8"
|
||||
mouse_opaque="true" name="Butt Sway" scale_image="true" width="82" />
|
||||
<button bottom="-273" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Advanced Parameters" label_selected="Advanced Parameters" left="8"
|
||||
mouse_opaque="true" name="Advanced Parameters" scale_image="true" width="82" />
|
||||
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-24" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left="26"
|
||||
mouse_opaque="true" name="title" v_pad="0" width="355">
|
||||
[DESC]
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-24" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left="26"
|
||||
mouse_opaque="true" name="title_no_modify" v_pad="0" width="355">
|
||||
[DESC]: cannot modify
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-24" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left="26"
|
||||
mouse_opaque="true" name="title_loading" v_pad="0" width="355">
|
||||
[DESC]: loading...
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-24" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left="26"
|
||||
mouse_opaque="true" name="title_not_worn" v_pad="0" width="355">
|
||||
[DESC]: not worn
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-38" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="14" left="8"
|
||||
mouse_opaque="true" name="path" v_pad="0" width="373">
|
||||
Located in [PATH]
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-74" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="28" left="8"
|
||||
mouse_opaque="true" name="not worn instructions" v_pad="0" width="373">
|
||||
Put on a new physics wearable by dragging one from your inventory
|
||||
to your avatar. Alternately, you create a new one from
|
||||
scratch and wear it.
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-74" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="28" left="8"
|
||||
mouse_opaque="true" name="no modify instructions" v_pad="0" width="373">
|
||||
You do not have permission to modify this wearable.
|
||||
</text>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-486" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="right" height="28" right="117"
|
||||
mouse_opaque="true" name="Item Action Label" v_pad="0" width="100">
|
||||
Physics:
|
||||
</text>
|
||||
<button bottom="-128" follows="left|top" halign="center" height="24"
|
||||
label="Create New Physics" label_selected="Create New Physics" left="8"
|
||||
mouse_opaque="true" name="Create New" scale_image="true" width="170" />
|
||||
<button bottom="-478" follows="right|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Save" label_selected="Save" left="123"
|
||||
mouse_opaque="true" name="Save" scale_image="true" width="82" />
|
||||
<button bottom="-478" follows="right|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Save As..." label_selected="Save As..." left="209"
|
||||
mouse_opaque="true" name="Save As" scale_image="true" width="92" />
|
||||
<button bottom="-478" follows="right|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Revert" label_selected="Revert" left="305"
|
||||
mouse_opaque="true" name="Revert" scale_image="true" width="82" />
|
||||
</panel>
|
||||
</tab_container>
|
||||
<scroll_container bottom="-476" follows="left|top|right|bottom" height="382" left="197"
|
||||
mouse_opaque="false" name="panel_container" opaque="false" width="292" />
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-400" drop_shadow_visible="true" follows="left|top"
|
||||
bottom="-410" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||
left="8" mouse_opaque="true" name="AvatarHeightText" v_pad="0" width="140">
|
||||
Avatar Height:
|
||||
|
||||
Reference in New Issue
Block a user