diff options
Diffstat (limited to 'indra/llappearance/lldriverparam.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/llappearance/lldriverparam.cpp | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 1f7e8b8652..e630c1118b 100644..100755 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -89,7 +89,7 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node) } else { - llerrs << "<driven> Unable to resolve driven parameter: " << driven_id << llendl; + LL_ERRS() << "<driven> Unable to resolve driven parameter: " << driven_id << LL_ENDL; return FALSE; } } @@ -139,9 +139,9 @@ void LLDriverParamInfo::toStream(std::ostream &out) } else { - llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " + LL_WARNS() << "could not get parameter " << driven.mDrivenID << " from avatar " << mDriverParam->getAvatarAppearance() - << " for driver parameter " << getID() << llendl; + << " for driver parameter " << getID() << LL_ENDL; } out << std::endl; } @@ -152,19 +152,31 @@ void LLDriverParamInfo::toStream(std::ostream &out) // LLDriverParam //----------------------------------------------------------------------------- -LLDriverParam::LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable /* = NULL */) : +LLDriverParam::LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable /* = NULL */) + : LLViewerVisualParam(), + mDefaultVec(), + mDriven(), mCurrentDistortionParam( NULL ), mAvatarAppearance(appearance), mWearablep(wearable) { llassert(mAvatarAppearance); - if (mWearablep) - { - llassert(mAvatarAppearance->isSelf()); - } + llassert((mWearablep == NULL) || mAvatarAppearance->isSelf()); mDefaultVec.clear(); } +LLDriverParam::LLDriverParam(const LLDriverParam& pOther) + : LLViewerVisualParam(pOther), + mDefaultVec(pOther.mDefaultVec), + mDriven(pOther.mDriven), + mCurrentDistortionParam(pOther.mCurrentDistortionParam), + mAvatarAppearance(pOther.mAvatarAppearance), + mWearablep(pOther.mWearablep) +{ + llassert(mAvatarAppearance); + llassert((mWearablep == NULL) || mAvatarAppearance->isSelf()); +} + LLDriverParam::~LLDriverParam() { } @@ -178,7 +190,7 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) mID = info->mID; info->mDriverParam = this; - setWeight(getDefaultWeight(), FALSE ); + setWeight(getDefaultWeight()); return TRUE; } @@ -186,16 +198,10 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) /*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const { llassert(wearable); - LLDriverParam *new_param = new LLDriverParam(mAvatarAppearance, wearable); - // FIXME DRANO this clobbers mWearablep, which means any code - // currently using mWearablep is wrong, or at least untested. - *new_param = *this; - //new_param->mWearablep = wearable; -// new_param->mDriven.clear(); // clear driven list to avoid overwriting avatar driven params from wearables. - return new_param; + return new LLDriverParam(*this); } -void LLDriverParam::setWeight(F32 weight, BOOL upload_bake) +void LLDriverParam::setWeight(F32 weight) { F32 min_weight = getMinWeight(); F32 max_weight = getMaxWeight(); @@ -254,7 +260,7 @@ void LLDriverParam::setWeight(F32 weight, BOOL upload_bake) driven_weight = driven_min; } - setDrivenWeight(driven,driven_weight,upload_bake); + setDrivenWeight(driven,driven_weight); continue; } else @@ -278,13 +284,13 @@ void LLDriverParam::setWeight(F32 weight, BOOL upload_bake) driven_weight = driven_min; } - setDrivenWeight(driven,driven_weight,upload_bake); + setDrivenWeight(driven,driven_weight); continue; } } driven_weight = getDrivenWeight(driven, mCurWeight); - setDrivenWeight(driven,driven_weight,upload_bake); + setDrivenWeight(driven,driven_weight); } } @@ -430,9 +436,9 @@ const LLViewerVisualParam* LLDriverParam::getDrivenParam(S32 index) const //----------------------------------------------------------------------------- // setAnimationTarget() //----------------------------------------------------------------------------- -void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake ) +void LLDriverParam::setAnimationTarget( F32 target_value) { - LLVisualParam::setAnimationTarget(target_value, upload_bake); + LLVisualParam::setAnimationTarget(target_value); for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { @@ -441,16 +447,16 @@ void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake ) // this isn't normally necessary, as driver params handle interpolation of their driven params // but texture params need to know to assume their final value at beginning of interpolation - driven->mParam->setAnimationTarget(driven_weight, upload_bake); + driven->mParam->setAnimationTarget(driven_weight); } } //----------------------------------------------------------------------------- // stopAnimating() //----------------------------------------------------------------------------- -void LLDriverParam::stopAnimating(BOOL upload_bake) +void LLDriverParam::stopAnimating() { - LLVisualParam::stopAnimating(upload_bake); + LLVisualParam::stopAnimating(); for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { @@ -530,7 +536,7 @@ void LLDriverParam::updateCrossDrivenParams(LLWearableType::EType driven_type) LLWearable *wearable = mAvatarAppearance->getWearableData()->getTopWearable(driver_type); if (wearable) { - wearable->setVisualParamWeight(mID, wearable->getVisualParamWeight(mID), false); + wearable->setVisualParamWeight(mID, wearable->getVisualParamWeight(mID)); } } } @@ -593,7 +599,7 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight return driven_weight; } -void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake) +void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight) { bool use_self = false; if(mWearablep && @@ -610,10 +616,10 @@ void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bo if (use_self) { // call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values - mAvatarAppearance->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake ); + mAvatarAppearance->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight); } else { - driven->mParam->setWeight( driven_weight, upload_bake ); + driven->mParam->setWeight( driven_weight); } } |