From f6406b7174fc6751ee60a6263360d82f382c6175 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 11 Nov 2009 16:37:59 -0500 Subject: EXT-2173 use of visual param animation inconsistent at best removed ambiguous parameter "set_by_user" from many places in codebase, renaming it to be upload_bake, which is a more accurate descriptor. This allowed me to see several inconsistencies in how this variable was being set - these errors were also fixed. User-visible result should be that baked textures are not reuploaded on changing avatar sex until the save button is pressed. primary win here is code clarity. Code reviewed by Bigpapi. --- indra/newview/llagentwearables.cpp | 4 ++-- indra/newview/llagentwearables.h | 2 +- indra/newview/lldriverparam.cpp | 24 +++++++++---------- indra/newview/lldriverparam.h | 8 +++---- indra/newview/lltexglobalcolor.cpp | 4 ++-- indra/newview/lltexglobalcolor.h | 2 +- indra/newview/lltexlayer.cpp | 2 +- indra/newview/lltexlayerparams.cpp | 34 +++++++++++++------------- indra/newview/lltexlayerparams.h | 14 +++++------ indra/newview/llvoavatar.cpp | 40 +++++++++++++++---------------- indra/newview/llvoavatar.h | 11 ++++----- indra/newview/llvoavatarself.cpp | 36 +++++++++++++--------------- indra/newview/llvoavatarself.h | 12 +++++----- indra/newview/llwearable.cpp | 49 +++++++++++--------------------------- indra/newview/llwearable.h | 12 +++++----- 15 files changed, 113 insertions(+), 141 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3fc1055acd..9938c3db2b 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1985,14 +1985,14 @@ bool LLAgentWearables::canWearableBeRemoved(const LLWearable* wearable) const return !(((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES)) && (getWearableCount(type) <= 1) ); } -void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL set_by_user) +void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake) { for( S32 type = 0; type < WT_COUNT; ++type ) { for (S32 count = 0; count < (S32)getWearableCount((EWearableType)type); ++count) { LLWearable *wearable = getWearable((EWearableType)type,count); - wearable->animateParams(delta, set_by_user); + wearable->animateParams(delta, upload_bake); } } } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 317f4a7e4f..9017c25fc6 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -80,7 +80,7 @@ public: // Note: False for shape, skin, eyes, and hair, unless you have MORE than 1. bool canWearableBeRemoved(const LLWearable* wearable) const; - void animateAllWearableParams(F32 delta, BOOL set_by_user); + void animateAllWearableParams(F32 delta, BOOL upload_bake); //-------------------------------------------------------------------- // Accessors diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 45f4b4fbd0..3961afe9af 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -242,7 +242,7 @@ BOOL LLDriverParam::parseData(LLXmlTreeNode* node) } #endif -void LLDriverParam::setWeight(F32 weight, BOOL set_by_user) +void LLDriverParam::setWeight(F32 weight, BOOL upload_bake) { F32 min_weight = getMinWeight(); F32 max_weight = getMaxWeight(); @@ -301,7 +301,7 @@ void LLDriverParam::setWeight(F32 weight, BOOL set_by_user) driven_weight = driven_min; } - setDrivenWeight(driven,driven_weight,set_by_user); + setDrivenWeight(driven,driven_weight,upload_bake); continue; } else @@ -325,13 +325,13 @@ void LLDriverParam::setWeight(F32 weight, BOOL set_by_user) driven_weight = driven_min; } - setDrivenWeight(driven,driven_weight,set_by_user); + setDrivenWeight(driven,driven_weight,upload_bake); continue; } } driven_weight = getDrivenWeight(driven, mCurWeight); - setDrivenWeight(driven,driven_weight,set_by_user); + setDrivenWeight(driven,driven_weight,upload_bake); } } @@ -455,9 +455,9 @@ const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_ //----------------------------------------------------------------------------- // setAnimationTarget() //----------------------------------------------------------------------------- -void LLDriverParam::setAnimationTarget( F32 target_value, BOOL set_by_user ) +void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake ) { - LLVisualParam::setAnimationTarget(target_value, set_by_user); + LLVisualParam::setAnimationTarget(target_value, upload_bake); for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { @@ -466,16 +466,16 @@ void LLDriverParam::setAnimationTarget( F32 target_value, BOOL set_by_user ) // 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, set_by_user); + driven->mParam->setAnimationTarget(driven_weight, upload_bake); } } //----------------------------------------------------------------------------- // stopAnimating() //----------------------------------------------------------------------------- -void LLDriverParam::stopAnimating(BOOL set_by_user) +void LLDriverParam::stopAnimating(BOOL upload_bake) { - LLVisualParam::stopAnimating(set_by_user); + LLVisualParam::stopAnimating(upload_bake); for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { @@ -585,7 +585,7 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight return driven_weight; } -void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool set_by_user) +void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake) { LLVOAvatarSelf *avatar_self = gAgent.getAvatarObject(); if(mWearablep && @@ -593,10 +593,10 @@ void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bo mWearablep->isOnTop()) { // call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values - avatar_self->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, set_by_user ); + avatar_self->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake ); } else { - driven->mParam->setWeight( driven_weight, set_by_user ); + driven->mParam->setWeight( driven_weight, upload_bake ); } } diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index 069e71a2cb..4e2daf5ba7 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -99,9 +99,9 @@ public: // LLVisualParam Virtual functions ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex sex ) {} // apply is called separately for each driven param. - /*virtual*/ void setWeight(F32 weight, BOOL set_by_user); - /*virtual*/ void setAnimationTarget( F32 target_value, BOOL set_by_user ); - /*virtual*/ void stopAnimating(BOOL set_by_user); + /*virtual*/ void setWeight(F32 weight, BOOL upload_bake); + /*virtual*/ void setAnimationTarget( F32 target_value, BOOL upload_bake ); + /*virtual*/ void stopAnimating(BOOL upload_bake); /*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params); /*virtual*/ void resetDrivenParams(); @@ -114,7 +114,7 @@ public: /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); protected: F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight); - void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool set_by_user); + void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake); LLVector3 mDefaultVec; // temp holder diff --git a/indra/newview/lltexglobalcolor.cpp b/indra/newview/lltexglobalcolor.cpp index 595b24ad47..d7840fb435 100644 --- a/indra/newview/lltexglobalcolor.cpp +++ b/indra/newview/lltexglobalcolor.cpp @@ -108,9 +108,9 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(LLTexGlobalColor* tex_global_color) return new_param; } -void LLTexParamGlobalColor::onGlobalColorChanged(bool set_by_user) +void LLTexParamGlobalColor::onGlobalColorChanged(bool upload_bake) { - mAvatar->onGlobalColorChanged(mTexGlobalColor, set_by_user); + mAvatar->onGlobalColorChanged(mTexGlobalColor, upload_bake); } //----------------------------------------------------------------------------- diff --git a/indra/newview/lltexglobalcolor.h b/indra/newview/lltexglobalcolor.h index 1e6754133f..829a7d645b 100644 --- a/indra/newview/lltexglobalcolor.h +++ b/indra/newview/lltexglobalcolor.h @@ -80,7 +80,7 @@ public: LLTexParamGlobalColor(LLTexGlobalColor *tex_color); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; protected: - /*virtual*/ void onGlobalColorChanged(bool set_by_user); + /*virtual*/ void onGlobalColorChanged(bool upload_bake); private: LLTexGlobalColor* mTexGlobalColor; }; diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 5d682cad3c..25e0ca46e4 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1834,7 +1834,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) } if (layer) { - wearable->writeToAvatar(FALSE, FALSE); + wearable->writeToAvatar(); layer->setLTO(lto); success &= layer->render(x,y,width,height); } diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index b744722f4c..0c7e61d00e 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -160,7 +160,7 @@ BOOL LLTexLayerParamAlpha::getMultiplyBlend() const return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend; } -void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user) +void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) { if (mIsAnimating || mTexLayer == NULL) { @@ -179,37 +179,37 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user) { if (gAgent.cameraCustomizeAvatar()) { - set_by_user = FALSE; + upload_bake = FALSE; } - mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user); + mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), upload_bake); mTexLayer->invalidateMorphMasks(); } } } -void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL set_by_user) +void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake) { // do not animate dummy parameters if (mIsDummy) { - setWeight(target_value, set_by_user); + setWeight(target_value, upload_bake); return; } mTargetWeight = target_value; - setWeight(target_value, set_by_user); + setWeight(target_value, upload_bake); mIsAnimating = TRUE; if (mNext) { - mNext->setAnimationTarget(target_value, set_by_user); + mNext->setAnimationTarget(target_value, upload_bake); } } -void LLTexLayerParamAlpha::animate(F32 delta, BOOL set_by_user) +void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake) { if (mNext) { - mNext->animate(delta, set_by_user); + mNext->animate(delta, upload_bake); } } @@ -449,7 +449,7 @@ LLColor4 LLTexLayerParamColor::getNetColor() const } } -void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user) +void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) { if (mIsAnimating) { @@ -474,10 +474,10 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user) if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { - onGlobalColorChanged(set_by_user); + onGlobalColorChanged(upload_bake); if (mTexLayer) { - mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user); + mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), upload_bake); } } @@ -485,23 +485,23 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user) } } -void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL set_by_user) +void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake) { // set value first then set interpolating flag to ignore further updates mTargetWeight = target_value; - setWeight(target_value, set_by_user); + setWeight(target_value, upload_bake); mIsAnimating = TRUE; if (mNext) { - mNext->setAnimationTarget(target_value, set_by_user); + mNext->setAnimationTarget(target_value, upload_bake); } } -void LLTexLayerParamColor::animate(F32 delta, BOOL set_by_user) +void LLTexLayerParamColor::animate(F32 delta, BOOL upload_bake) { if (mNext) { - mNext->animate(delta, set_by_user); + mNext->animate(delta, upload_bake); } } diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index 98365864f9..2b80dbdba4 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -66,9 +66,9 @@ public: // LLVisualParam Virtual functions ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex avatar_sex ) {} - /*virtual*/ void setWeight(F32 weight, BOOL set_by_user); - /*virtual*/ void setAnimationTarget(F32 target_value, BOOL set_by_user); - /*virtual*/ void animate(F32 delta, BOOL set_by_user); + /*virtual*/ void setWeight(F32 weight, BOOL upload_bake); + /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake); + /*virtual*/ void animate(F32 delta, BOOL upload_bake); // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion() { return 1.f; } @@ -143,9 +143,9 @@ public: // LLVisualParam Virtual functions ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex avatar_sex ) {} - /*virtual*/ void setWeight(F32 weight, BOOL set_by_user); - /*virtual*/ void setAnimationTarget(F32 target_value, BOOL set_by_user); - /*virtual*/ void animate(F32 delta, BOOL set_by_user); + /*virtual*/ void setWeight(F32 weight, BOOL upload_bake); + /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake); + /*virtual*/ void animate(F32 delta, BOOL upload_bake); // LLViewerVisualParam Virtual functions @@ -159,7 +159,7 @@ public: // New functions LLColor4 getNetColor() const; protected: - virtual void onGlobalColorChanged(bool set_by_user) {} + virtual void onGlobalColorChanged(bool upload_bake) {} private: LLVector3 mAvgDistortionVec; }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 16bd74f798..52023b2139 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -647,7 +647,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mWindFreq(0.f), mRipplePhase( 0.f ), mBelowWater(FALSE), - mAppearanceAnimSetByUser(FALSE), mLastAppearanceBlendTime(0.f), mAppearanceAnimating(FALSE), mNameString(), @@ -2436,7 +2435,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() { if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) { - param->stopAnimating(mAppearanceAnimSetByUser); + param->stopAnimating(FALSE); } } updateVisualParams(); @@ -2459,7 +2458,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() { if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) { - param->animate(morph_amt, mAppearanceAnimSetByUser); + param->animate(morph_amt, FALSE); } } } @@ -5372,11 +5371,11 @@ void LLVOAvatar::updateShadowFaces() //----------------------------------------------------------------------------- // updateSexDependentLayerSets() //----------------------------------------------------------------------------- -void LLVOAvatar::updateSexDependentLayerSets( BOOL set_by_user ) +void LLVOAvatar::updateSexDependentLayerSets( BOOL upload_bake ) { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user ); - invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, set_by_user ); - invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, set_by_user ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake ); } //----------------------------------------------------------------------------- @@ -5741,7 +5740,7 @@ LLColor4 LLVOAvatar::getGlobalColor( const std::string& color_name ) const } // virtual -void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_user ) +void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) { } @@ -5754,18 +5753,18 @@ void LLVOAvatar::setCompositeUpdatesEnabled( BOOL b ) { } -void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL set_by_user ) +void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake ) { if (global_color == mTexSkinColor) { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user ); - invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, set_by_user ); - invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, set_by_user ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake ); } else if (global_color == mTexHairColor) { - invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user ); - invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, set_by_user ); + invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake ); + invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, upload_bake ); // ! BACKWARDS COMPATIBILITY ! // Fix for dealing with avatars from viewers that don't bake hair. @@ -5781,7 +5780,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL else if (global_color == mTexEyeColor) { // llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl; - invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, set_by_user ); + invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake ); } updateMeshTextures(); } @@ -6239,14 +6238,14 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, U32 *param_name ) return TRUE; } -void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL set_by_user ) +void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake ) { U32 param_name[3]; if( teToColorParams( te, param_name ) ) { - setVisualParamWeight( param_name[0], new_color.mV[VX], set_by_user ); - setVisualParamWeight( param_name[1], new_color.mV[VY], set_by_user ); - setVisualParamWeight( param_name[2], new_color.mV[VZ], set_by_user ); + setVisualParamWeight( param_name[0], new_color.mV[VX], upload_bake ); + setVisualParamWeight( param_name[1], new_color.mV[VY], upload_bake ); + setVisualParamWeight( param_name[2], new_color.mV[VZ], upload_bake ); } } @@ -6977,11 +6976,10 @@ void LLVOAvatar::cullAvatarsByPixelArea() } } -void LLVOAvatar::startAppearanceAnimation(BOOL set_by_user, BOOL play_sound) +void LLVOAvatar::startAppearanceAnimation() { if(!mAppearanceAnimating) { - mAppearanceAnimSetByUser = set_by_user; mAppearanceAnimating = TRUE; mAppearanceMorphTimer.reset(); mLastAppearanceBlendTime = 0.f; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 173ad02808..2fd1a506a9 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -522,7 +522,7 @@ protected: // Composites //-------------------------------------------------------------------- public: - virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL set_by_user); + virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result); virtual void invalidateAll(); virtual void setCompositeUpdatesEnabled(BOOL b); @@ -558,7 +558,7 @@ private: public: void updateMeshTextures(); - void updateSexDependentLayerSets(BOOL set_by_user); + void updateSexDependentLayerSets(BOOL upload_bake); void dirtyMesh(); // Dirty the avatar mesh void updateMeshData(); protected: @@ -591,7 +591,7 @@ protected: public: void processAvatarAppearance(LLMessageSystem* mesgsys); void hideSkirt(); - void startAppearanceAnimation(BOOL set_by_user, BOOL play_sound); + void startAppearanceAnimation(); //-------------------------------------------------------------------- // Appearance morphing @@ -600,14 +600,13 @@ public: BOOL mAppearanceAnimating; private: LLFrameTimer mAppearanceMorphTimer; - BOOL mAppearanceAnimSetByUser; F32 mLastAppearanceBlendTime; //-------------------------------------------------------------------- // Clothing colors (convenience functions to access visual parameters) //-------------------------------------------------------------------- public: - void setClothesColor(LLVOAvatarDefines::ETextureIndex te, const LLColor4& new_color, BOOL set_by_user); + void setClothesColor(LLVOAvatarDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake); LLColor4 getClothesColor(LLVOAvatarDefines::ETextureIndex te); static BOOL teToColorParams(LLVOAvatarDefines::ETextureIndex te, U32 *param_name); @@ -616,7 +615,7 @@ public: //-------------------------------------------------------------------- public: LLColor4 getGlobalColor(const std::string& color_name ) const; - void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL set_by_user); + void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake); private: LLTexGlobalColor* mTexSkinColor; LLTexGlobalColor* mTexHairColor; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a2203ba2ea..65f1477a4f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -633,33 +633,33 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return LLVOAvatar::getJoint(name); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL set_by_user ) +/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake ) { if (!which_param) { return FALSE; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(which_param->getID()); - return setParamWeight(param,weight,set_by_user); + return setParamWeight(param,weight,upload_bake); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL set_by_user ) +/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake ) { if (!param_name) { return FALSE; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(param_name); - return setParamWeight(param,weight,set_by_user); + return setParamWeight(param,weight,upload_bake); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL set_by_user ) +/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake ) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); - return setParamWeight(param,weight,set_by_user); + return setParamWeight(param,weight,upload_bake); } -BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL set_by_user ) +BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL upload_bake ) { if (!param) { @@ -675,12 +675,12 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL LLWearable *wearable = gAgentWearables.getWearable(type,count); if (wearable) { - wearable->setVisualParamWeight(param->getID(), weight, set_by_user); + wearable->setVisualParamWeight(param->getID(), weight, upload_bake); } } } - return LLCharacter::setVisualParamWeight(param,weight,set_by_user); + return LLCharacter::setVisualParamWeight(param,weight,upload_bake); } /*virtual*/ @@ -691,7 +691,7 @@ void LLVOAvatarSelf::updateVisualParams() LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); if (wearable) { - wearable->writeToAvatar(FALSE, FALSE); + wearable->writeToAvatar(); } } @@ -702,7 +702,7 @@ void LLVOAvatarSelf::updateVisualParams() void LLVOAvatarSelf::idleUpdateAppearanceAnimation() { // Animate all top-level wearable visual parameters - gAgentWearables.animateAllWearableParams(calcMorphAmount(), mAppearanceAnimSetByUser); + gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); // apply wearable visual params to avatar updateVisualParams(); @@ -737,8 +737,7 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id) } } -// virtual -void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index) +void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index) { if (te >= TEX_NUM_INDICES) { @@ -1347,7 +1346,7 @@ bool LLVOAvatarSelf::hasPendingBakedUploads() const return false; } -void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_user ) +void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) { if( !layerset || !layerset->getUpdatesEnabled() ) { @@ -1358,7 +1357,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_u layerset->requestUpdate(); layerset->invalidateMorphMasks(); - if( set_by_user ) + if( upload_result ) { llassert(isSelf()); @@ -1945,9 +1944,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) if (layer_set) { llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; - // Apparently set_by_user == force upload - BOOL set_by_user = TRUE; - self->invalidateComposite(layer_set, set_by_user); + self->invalidateComposite(layer_set, TRUE); found = TRUE; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } @@ -1983,8 +1980,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) layer_set->cancelUpload(); } - BOOL set_by_user = TRUE; - invalidateComposite(layer_set, set_by_user); + invalidateComposite(layer_set, TRUE); LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 8a66422c44..6702f030fe 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -86,15 +86,15 @@ public: /*virtual*/ void requestStopMotion(LLMotion* motion); /*virtual*/ LLJoint* getJoint(const std::string &name); - /*virtual*/ BOOL setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL set_by_user = FALSE ); - /*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL set_by_user = FALSE ); - /*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight, BOOL set_by_user = FALSE ); + /*virtual*/ BOOL setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE ); + /*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake = FALSE ); + /*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake = FALSE ); /*virtual*/ void updateVisualParams(); /*virtual*/ void idleUpdateAppearanceAnimation(); private: // helper function. Passed in param is assumed to be in avatar's parameter list. - BOOL setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL set_by_user = FALSE ); + BOOL setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL upload_bake = FALSE ); /** Initialization @@ -186,7 +186,7 @@ public: BOOL getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index) const; LLViewerFetchedTexture* getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, U32 index) const; const LLUUID& getLocalTextureID(LLVOAvatarDefines::ETextureIndex type, U32 index) const; - void setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index); + void setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index); const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; /*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index); @@ -228,7 +228,7 @@ public: // Composites //-------------------------------------------------------------------- public: - /* virtual */ void invalidateComposite(LLTexLayerSet* layerset, BOOL set_by_user); + /* virtual */ void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result); /* virtual */ void invalidateAll(); /* virtual */ void setCompositeUpdatesEnabled(BOOL b); // only works for self void setupComposites(); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 3185ee45bf..c5c97e7649 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -602,7 +602,7 @@ void LLWearable::setTexturesToDefaults() } // Updates the user's avatar's appearance -void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater ) +void LLWearable::writeToAvatar() { LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); llassert( avatar ); @@ -622,24 +622,10 @@ void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); - // only animate with user-originated changes - if (set_by_user) - { - param->setAnimationTarget(weight, set_by_user); - } - else - { - avatar->setVisualParamWeight( param_id, weight, set_by_user ); - } + avatar->setVisualParamWeight( param_id, weight, FALSE ); } } - // only interpolate with user-originated changes - if (set_by_user) - { - avatar->startAppearanceAnimation(TRUE, TRUE); - } - // Pull texture entries for( S32 te = 0; te < TEX_NUM_INDICES; te++ ) { @@ -657,24 +643,17 @@ void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); // MULTI-WEARABLE: replace hard-coded 0 - avatar->setLocalTextureTE(te, image, set_by_user, 0); + avatar->setLocalTextureTE(te, image, 0); } } - - if( gFloaterCustomize && update_customize_floater ) - { - gFloaterCustomize->setWearable(mType, 0); - gFloaterCustomize->setCurrentWearableType( mType ); - } - ESex new_sex = avatar->getSex(); if( old_sex != new_sex ) { - avatar->updateSexDependentLayerSets( set_by_user ); + avatar->updateSexDependentLayerSets( FALSE ); } -// if( set_by_user ) +// if( upload_bake ) // { // gAgent.sendAgentSetAppearance(); // } @@ -683,7 +662,7 @@ void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater // Updates the user's avatar's appearance, replacing this wearables' parameters and textures with default values. // static -void LLWearable::removeFromAvatar( EWearableType type, BOOL set_by_user ) +void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) { LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); llassert( avatar ); @@ -707,7 +686,7 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL set_by_user ) if( (((LLViewerVisualParam*)param)->getWearableType() == type) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) ) { S32 param_id = param->getID(); - avatar->setVisualParamWeight( param_id, param->getDefaultWeight(), set_by_user ); + avatar->setVisualParamWeight( param_id, param->getDefaultWeight(), upload_bake ); } } @@ -719,7 +698,7 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL set_by_user ) avatar->updateVisualParams(); avatar->wearableUpdated(type); -// if( set_by_user ) +// if( upload_bake ) // { // gAgent.sendAgentSetAppearance(); // } @@ -868,12 +847,12 @@ void LLWearable::setVisualParams() } -void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL set_by_user) +void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_bake) { if( is_in_map(mVisualParamIndexMap, param_index ) ) { LLVisualParam *wearable_param = mVisualParamIndexMap[param_index]; - wearable_param->setWeight(value, set_by_user); + wearable_param->setWeight(value, upload_bake); } else { @@ -914,14 +893,14 @@ void LLWearable::getVisualParams(visual_param_vec_t &list) } } -void LLWearable::animateParams(F32 delta, BOOL set_by_user) +void LLWearable::animateParams(F32 delta, BOOL upload_bake) { for(visual_param_index_map_t::iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); ++iter) { LLVisualParam *param = (LLVisualParam*) iter->second; - param->animate(delta, set_by_user); + param->animate(delta, upload_bake); } } @@ -939,14 +918,14 @@ LLColor4 LLWearable::getClothesColor(S32 te) const return color; } -void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, BOOL set_by_user ) +void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake ) { U32 param_name[3]; if( LLVOAvatar::teToColorParams( (LLVOAvatarDefines::ETextureIndex)te, param_name ) ) { for( U8 index = 0; index < 3; index++ ) { - setVisualParamWeight(param_name[index], new_color.mV[index], set_by_user); + setVisualParamWeight(param_name[index], new_color.mV[index], upload_bake); } } } diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 96631811c5..fd19a86406 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -89,9 +89,9 @@ public: BOOL isDirty() const; BOOL isOldVersion() const; - void writeToAvatar( BOOL set_by_user, BOOL update_customize_floater = TRUE ); - void removeFromAvatar( BOOL set_by_user ) { LLWearable::removeFromAvatar( mType, set_by_user ); } - static void removeFromAvatar( EWearableType type, BOOL set_by_user ); + void writeToAvatar(); + void removeFromAvatar( BOOL upload_bake ) { LLWearable::removeFromAvatar( mType, upload_bake ); } + static void removeFromAvatar( EWearableType type, BOOL upload_bake ); BOOL exportFile(LLFILE* file) const; BOOL importFile(LLFILE* file); @@ -115,14 +115,14 @@ public: void setLocalTextureObject(S32 index, LLLocalTextureObject *lto); void addVisualParam(LLVisualParam *param); void setVisualParams(); - void setVisualParamWeight(S32 index, F32 value, BOOL set_by_user); + void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake); F32 getVisualParamWeight(S32 index) const; LLVisualParam* getVisualParam(S32 index) const; void getVisualParams(visual_param_vec_t &list); - void animateParams(F32 delta, BOOL set_by_user); + void animateParams(F32 delta, BOOL upload_bake); LLColor4 getClothesColor(S32 te) const; - void setClothesColor( S32 te, const LLColor4& new_color, BOOL set_by_user ); + void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake ); void revertValues(); -- cgit v1.2.3 From bc5096ff3d01f25cd47c9a5803f3255e11cd8cfa Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 11 Nov 2009 16:40:15 -0500 Subject: DEV-34507 too many baked texture uploads Fixed a double-bake bug on hitting the "OK" button of the appearance editor Also cleaned up extraneous calls to requestLayersetUpload. Behavior should now be consistent with resident expectations. Code reviewed by Bigpapi --- indra/newview/llvoavatarself.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 65f1477a4f..185274d40d 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2043,7 +2043,6 @@ void LLVOAvatarSelf::onCustomizeEnd() if (avatarp) { avatarp->invalidateAll(); - avatarp->requestLayerSetUploads(); } } @@ -2080,7 +2079,6 @@ void LLVOAvatarSelf::setInvisible(BOOL newvalue) { setCompositeUpdatesEnabled(TRUE); invalidateAll(); - requestLayerSetUploads(); gAgent.sendAgentSetAppearance(); } } -- cgit v1.2.3 From 20c9b13df6d069814217525ec1cea0782a391c7f Mon Sep 17 00:00:00 2001 From: "Justin C. Rounds (Chuck)" Date: Wed, 11 Nov 2009 17:17:41 -0500 Subject: Added tool-tip graphic. --- indra/newview/skins/default/textures/textures.xml | 2 ++ indra/newview/skins/default/textures/widgets/Tooltip.png | Bin 0 -> 2910 bytes 2 files changed, 2 insertions(+) create mode 100644 indra/newview/skins/default/textures/widgets/Tooltip.png (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e881665578..57239f9e7f 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -531,6 +531,8 @@ + + diff --git a/indra/newview/skins/default/textures/widgets/Tooltip.png b/indra/newview/skins/default/textures/widgets/Tooltip.png new file mode 100644 index 0000000000..f989ac9083 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Tooltip.png differ -- cgit v1.2.3 From 2392cb2a6a7237a332819da436e9f36f654b05fb Mon Sep 17 00:00:00 2001 From: "Justin C. Rounds (Chuck)" Date: Wed, 11 Nov 2009 17:21:47 -0500 Subject: Fixed typo. http://jira.secondlife.com/browse/EXT-2359 --- indra/newview/skins/default/xui/en/floater_avatar_picker.xml | 2 +- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index a0f9bb59fd..3a1499eaaa 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -16,7 +16,7 @@ - No-one near + No one near diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 15fdd73bdc..9fac7d34f7 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -16,7 +16,7 @@ background_visible="true" value="No people" /> + value="No one near" /> -- cgit v1.2.3 From a24c4af67d4a21a3372fea75c00e91e5d182d0a7 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 11 Nov 2009 17:25:03 -0500 Subject: fixing build - last commit had bad call to startAppearanceAnimation function definition of startAppearanceAnimation chagned - last patch missed eliminating the parameters at line 6594 in llvoavatar.cpp. This patch fixes the issue, confirmed builds and runs locally. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 52023b2139..62ac8adad0 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6591,7 +6591,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { if (interp_params) { - startAppearanceAnimation(FALSE, FALSE); + startAppearanceAnimation(); } updateVisualParams(); -- cgit v1.2.3 From 6b14f9a48f18842e207013d89e4578a73ee5e7bf Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 11 Nov 2009 22:42:25 +0000 Subject: DEV-41358: Changed format of preferred maturity for search. Now preferred maturity is passed to the search web pages as an r={13|21|42} query param. --- indra/newview/llfloatersearch.cpp | 16 +++++++++++++--- indra/newview/skins/default/xui/en/floater_search.xml | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index ca2cdffcf8..e2df2ffdf7 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -124,9 +124,19 @@ void LLFloaterSearch::search(const LLSD &key) url += "&p=" + search_token.asString(); // also append the user's preferred maturity (can be changed via prefs) - std::string maturity = "pg"; - if (gAgent.prefersMature()) maturity += ",mature"; - if (gAgent.prefersAdult()) maturity += ",adult"; + std::string maturity; + if (gAgent.prefersAdult()) + { + maturity = "42"; // PG,Mature,Adult + } + else if (gAgent.prefersMature()) + { + maturity = "21"; // PG,Mature + } + else + { + maturity = "13"; // PG + } url += "&r=" + maturity; // and load the URL in the web view diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index b9cf456842..d9498586af 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -25,7 +25,7 @@ Done -- cgit v1.2.3 From afb49ed36ece451b93f25e25bcbe8e3b9ee7db65 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 11 Nov 2009 15:09:28 -0800 Subject: Fix bad XML causing UI images not to load. --- indra/newview/skins/default/textures/textures.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 57239f9e7f..4c4b6a3899 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -532,7 +532,7 @@ - -- cgit v1.2.3 From 8519205533a45603e7ac7ecf397d23d041addf9a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 11 Nov 2009 18:49:32 -0500 Subject: Changing VC Debugger working directory to be ${CMAKE_CURRENT_SOURCE_DIR} to restore ability to edit in place xui files, shaders, etc. --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 13c381edae..e69d3f417f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1379,7 +1379,7 @@ if (WINDOWS) ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln --workingdir ${VIEWER_BINARY_NAME} - "./${CMAKE_CFG_INTDIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." ) endif (NOT UNATTENDED) -- cgit v1.2.3 From eda34b82ee20ce43362b3fb20e809f97cc8c0081 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 11 Nov 2009 15:50:43 -0800 Subject: Remove references to media_panel_scroll in LLPanelPrimMediaControls::updateShape(), as it was removed from the XUI file. --- indra/newview/llpanelprimmediacontrols.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 5c3c260549..bb2ded7ca5 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -271,7 +271,7 @@ void LLPanelPrimMediaControls::updateShape() LLIconCtrl* whitelist_icon = getChild("media_whitelist_flag"); LLIconCtrl* secure_lock_icon = getChild("media_secure_lock_flag"); - LLUICtrl* media_panel_scroll = getChild("media_panel_scroll"); +// LLUICtrl* media_panel_scroll = getChild("media_panel_scroll"); LLUICtrl* scroll_up_ctrl = getChild("scrollup"); LLUICtrl* scroll_left_ctrl = getChild("scrollleft"); LLUICtrl* scroll_right_ctrl = getChild("scrollright"); @@ -330,7 +330,7 @@ void LLPanelPrimMediaControls::updateShape() scroll_left_ctrl->setVisible(false); scroll_right_ctrl->setVisible(false); scroll_down_ctrl->setVisible(false); - media_panel_scroll->setVisible(false); +// media_panel_scroll->setVisible(false); F32 volume = media_impl->getVolume(); // movie's url changed @@ -427,7 +427,7 @@ void LLPanelPrimMediaControls::updateShape() scroll_left_ctrl->setVisible(has_focus); scroll_right_ctrl->setVisible(has_focus); scroll_down_ctrl->setVisible(has_focus); - media_panel_scroll->setVisible(has_focus); +// media_panel_scroll->setVisible(has_focus); // TODO: get the secure lock bool from media plug in std::string prefix = std::string("https://"); std::string test_prefix = mCurrentURL.substr(0, prefix.length()); -- cgit v1.2.3 From bea3b937d9907e4491caaec909cd404d401694ac Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 11 Nov 2009 16:12:25 -0800 Subject: Fix a potential crash if scroll button is not there --- indra/newview/llpanelprimmediacontrols.cpp | 64 +++++++++++++++++++----------- 1 file changed, 41 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 5c3c260549..24de2dcdfc 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -118,21 +118,33 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls() BOOL LLPanelPrimMediaControls::postBuild() { LLButton* scroll_up_ctrl = getChild("scrollup"); - scroll_up_ctrl->setClickedCallback(onScrollUp, this); - scroll_up_ctrl->setHeldDownCallback(onScrollUpHeld, this); - scroll_up_ctrl->setMouseUpCallback(onScrollStop, this); + if (scroll_up_ctrl) + { + scroll_up_ctrl->setClickedCallback(onScrollUp, this); + scroll_up_ctrl->setHeldDownCallback(onScrollUpHeld, this); + scroll_up_ctrl->setMouseUpCallback(onScrollStop, this); + } LLButton* scroll_left_ctrl = getChild("scrollleft"); - scroll_left_ctrl->setClickedCallback(onScrollLeft, this); - scroll_left_ctrl->setHeldDownCallback(onScrollLeftHeld, this); - scroll_left_ctrl->setMouseUpCallback(onScrollStop, this); + if (scroll_left_ctrl) + { + scroll_left_ctrl->setClickedCallback(onScrollLeft, this); + scroll_left_ctrl->setHeldDownCallback(onScrollLeftHeld, this); + scroll_left_ctrl->setMouseUpCallback(onScrollStop, this); + } LLButton* scroll_right_ctrl = getChild("scrollright"); - scroll_right_ctrl->setClickedCallback(onScrollRight, this); - scroll_right_ctrl->setHeldDownCallback(onScrollRightHeld, this); - scroll_right_ctrl->setMouseUpCallback(onScrollStop, this); + if (scroll_right_ctrl) + { + scroll_right_ctrl->setClickedCallback(onScrollRight, this); + scroll_right_ctrl->setHeldDownCallback(onScrollRightHeld, this); + scroll_right_ctrl->setMouseUpCallback(onScrollStop, this); + } LLButton* scroll_down_ctrl = getChild("scrolldown"); - scroll_down_ctrl->setClickedCallback(onScrollDown, this); - scroll_down_ctrl->setHeldDownCallback(onScrollDownHeld, this); - scroll_down_ctrl->setMouseUpCallback(onScrollStop, this); + if (scroll_down_ctrl) + { + scroll_down_ctrl->setClickedCallback(onScrollDown, this); + scroll_down_ctrl->setHeldDownCallback(onScrollDownHeld, this); + scroll_down_ctrl->setMouseUpCallback(onScrollStop, this); + } LLUICtrl* media_address = getChild("media_address"); media_address->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this )); @@ -326,11 +338,14 @@ void LLPanelPrimMediaControls::updateShape() whitelist_icon->setVisible(false); secure_lock_icon->setVisible(false); - scroll_up_ctrl->setVisible(false); - scroll_left_ctrl->setVisible(false); - scroll_right_ctrl->setVisible(false); - scroll_down_ctrl->setVisible(false); - media_panel_scroll->setVisible(false); + if (media_panel_scroll) + { + media_panel_scroll->setVisible(false); + scroll_up_ctrl->setVisible(false); + scroll_left_ctrl->setVisible(false); + scroll_right_ctrl->setVisible(false); + scroll_down_ctrl->setVisible(false); + } F32 volume = media_impl->getVolume(); // movie's url changed @@ -422,12 +437,15 @@ void LLPanelPrimMediaControls::updateShape() volume_ctrl->setEnabled(FALSE); volume_up_ctrl->setEnabled(FALSE); volume_down_ctrl->setEnabled(FALSE); - - scroll_up_ctrl->setVisible(has_focus); - scroll_left_ctrl->setVisible(has_focus); - scroll_right_ctrl->setVisible(has_focus); - scroll_down_ctrl->setVisible(has_focus); - media_panel_scroll->setVisible(has_focus); + + if (media_panel_scroll) + { + media_panel_scroll->setVisible(has_focus); + scroll_up_ctrl->setVisible(has_focus); + scroll_left_ctrl->setVisible(has_focus); + scroll_right_ctrl->setVisible(has_focus); + scroll_down_ctrl->setVisible(has_focus); + } // TODO: get the secure lock bool from media plug in std::string prefix = std::string("https://"); std::string test_prefix = mCurrentURL.substr(0, prefix.length()); -- cgit v1.2.3 From 6a3e8353a7c0e80e2a4558e3a3a345646788981e Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 11 Nov 2009 16:32:54 -0800 Subject: Fix merge error (and hence build breakage :( ) --- indra/newview/llpanelprimmediacontrols.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index c2c8c6c48e..24de2dcdfc 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -283,7 +283,7 @@ void LLPanelPrimMediaControls::updateShape() LLIconCtrl* whitelist_icon = getChild("media_whitelist_flag"); LLIconCtrl* secure_lock_icon = getChild("media_secure_lock_flag"); -// LLUICtrl* media_panel_scroll = getChild("media_panel_scroll"); + LLUICtrl* media_panel_scroll = getChild("media_panel_scroll"); LLUICtrl* scroll_up_ctrl = getChild("scrollup"); LLUICtrl* scroll_left_ctrl = getChild("scrollleft"); LLUICtrl* scroll_right_ctrl = getChild("scrollright"); -- cgit v1.2.3 From f936f661bc5d8c3d254389cc7b775bf5d6a0ff2e Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 11 Nov 2009 17:54:41 -0800 Subject: Fix for DEV-42720 - media settings floater is Empty --- .../newview/skins/default/xui/en/floater_media_settings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_media_settings.xml b/indra/newview/skins/default/xui/en/floater_media_settings.xml index 68dd2001af..8122386fae 100644 --- a/indra/newview/skins/default/xui/en/floater_media_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_media_settings.xml @@ -1,7 +1,7 @@