EXT-1947 EXT-1945 EXT-1919 EXT-2088 appearance edit dummy param + animation fix
Several fixes here: 1) minor rename in argument of setIsDummy 2) corrected parameter set_by_user to calls of setVisualParamWeight where we shouldn't be animating 3) ensured finally that mIsDummy is set properly for all wearable parameters 4) ensured that mIsDUmmy is set properly for non-wearable based parameters on your own avatar Code reviewed by Bigpapimaster
parent
0284725886
commit
a100a6e07f
|
|
@ -151,7 +151,7 @@ public:
|
|||
virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; }
|
||||
BOOL getAnimating() const { return mIsAnimating; }
|
||||
|
||||
void setIsDummy(BOOL is_self) { mIsDummy = is_self; }
|
||||
void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; }
|
||||
|
||||
protected:
|
||||
F32 mCurWeight; // current weight
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ void LLDriverParam::setAvatar(LLVOAvatar *avatarp)
|
|||
}
|
||||
}
|
||||
*new_param = *this;
|
||||
new_param->setIsDummy(FALSE);
|
||||
return new_param;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata)
|
|||
F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() );
|
||||
if (current_weight != new_weight )
|
||||
{
|
||||
self->mWearable->setVisualParamWeight( param->getID(), new_weight, TRUE );
|
||||
self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE );
|
||||
gAgent.getAvatarObject()->updateVisualParams();
|
||||
}
|
||||
}
|
||||
|
|
@ -298,7 +298,7 @@ void LLScrollingPanelParam::onHintHeldDown( LLVisualParamHint* hint )
|
|||
if (slider->getMinValue() < new_percent
|
||||
&& new_percent < slider->getMaxValue())
|
||||
{
|
||||
mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, TRUE);
|
||||
mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, FALSE);
|
||||
gAgent.getAvatarObject()->updateVisualParams();
|
||||
|
||||
slider->setValue( weightToPercent( new_weight ) );
|
||||
|
|
@ -330,7 +330,7 @@ void LLScrollingPanelParam::onHintMinMouseUp( void* userdata )
|
|||
if (slider->getMinValue() < new_percent
|
||||
&& new_percent < slider->getMaxValue())
|
||||
{
|
||||
self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, TRUE);
|
||||
self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE);
|
||||
slider->setValue( self->weightToPercent( new_weight ) );
|
||||
}
|
||||
}
|
||||
|
|
@ -364,7 +364,7 @@ void LLScrollingPanelParam::onHintMaxMouseUp( void* userdata )
|
|||
if (slider->getMinValue() < new_percent
|
||||
&& new_percent < slider->getMaxValue())
|
||||
{
|
||||
self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, TRUE);
|
||||
self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE);
|
||||
slider->setValue( self->weightToPercent( new_weight ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,7 +205,10 @@ void LLVOAvatarSelf::markDead()
|
|||
param;
|
||||
param = (LLViewerVisualParam*) getNextVisualParam())
|
||||
{
|
||||
param->setIsDummy(TRUE);
|
||||
if (param->getWearableType() != WT_INVALID)
|
||||
{
|
||||
param->setIsDummy(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id);
|
|||
|
||||
LLWearable::LLWearable(const LLTransactionID& transaction_id) :
|
||||
mDefinitionVersion(LLWearable::sCurrentDefinitionVersion),
|
||||
mType(WT_SHAPE)
|
||||
mType(WT_INVALID)
|
||||
{
|
||||
mTransactionID = transaction_id;
|
||||
mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID());
|
||||
|
|
@ -68,7 +68,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) :
|
|||
|
||||
LLWearable::LLWearable(const LLAssetID& asset_id) :
|
||||
mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ),
|
||||
mType(WT_SHAPE)
|
||||
mType(WT_INVALID)
|
||||
{
|
||||
mAssetID = asset_id;
|
||||
mTransactionID.setNull();
|
||||
|
|
@ -181,13 +181,7 @@ void LLWearable::createVisualParams()
|
|||
{
|
||||
if (param->getWearableType() == mType)
|
||||
{
|
||||
if (mVisualParamIndexMap[param->getID()])
|
||||
{
|
||||
delete mVisualParamIndexMap[param->getID()];
|
||||
}
|
||||
LLViewerVisualParam *new_param = param->cloneParam(this);
|
||||
new_param->setIsDummy(FALSE);
|
||||
mVisualParamIndexMap[param->getID()] = new_param;
|
||||
addVisualParam(param->cloneParam(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -750,7 +744,8 @@ void LLWearable::copyDataFrom(const LLWearable* src)
|
|||
mDescription = src->mDescription;
|
||||
mPermissions = src->mPermissions;
|
||||
mSaleInfo = src->mSaleInfo;
|
||||
mType = src->mType;
|
||||
|
||||
setType(src->mType);
|
||||
|
||||
mSavedVisualParamMap.clear();
|
||||
// Deep copy of mVisualParamMap (copies only those params that are current, filling in defaults where needed)
|
||||
|
|
@ -763,9 +758,6 @@ void LLWearable::copyDataFrom(const LLWearable* src)
|
|||
S32 id = param->getID();
|
||||
F32 weight = src->getVisualParamWeight(id);
|
||||
mSavedVisualParamMap[id] = weight;
|
||||
|
||||
// Clones a visual param from src and adds it to this wearable. Value of param is taken from current value of source param, not saved.
|
||||
addVisualParam(param->cloneParam(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -860,6 +852,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
|
|||
{
|
||||
delete mVisualParamIndexMap[param->getID()];
|
||||
}
|
||||
param->setIsDummy(FALSE);
|
||||
mVisualParamIndexMap[param->getID()] = param;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue