diff options
-rwxr-xr-x | autobuild.xml | 4 | ||||
-rwxr-xr-x | indra/llappearance/llavatarappearance.h | 7 | ||||
-rwxr-xr-x | indra/llappearance/lltexglobalcolor.cpp | 5 | ||||
-rwxr-xr-x | indra/llappearance/lltexglobalcolor.h | 2 | ||||
-rwxr-xr-x | indra/llappearance/lltexlayerparams.cpp | 19 | ||||
-rwxr-xr-x | indra/newview/llagentwearables.cpp | 34 | ||||
-rwxr-xr-x | indra/newview/llagentwearables.h | 5 | ||||
-rwxr-xr-x | indra/newview/llstartup.cpp | 2 |
8 files changed, 76 insertions, 2 deletions
diff --git a/autobuild.xml b/autobuild.xml index 1ea76edd7f..599dd1e53b 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1290,9 +1290,9 @@ <key>archive</key> <map> <key>hash</key> - <string>bda18a1f808eb248d69ff14fa2c69862</string> + <string>43826f8f0a5ce5bcdbfed9ea0b6f4ebb</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/282464/arch/Linux/installer/llappearanceutility_source-0.1-linux-20131016.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/283022/arch/Linux/installer/llappearanceutility_source-0.1-linux-20131025.tar.bz2</string> </map> <key>name</key> <string>linux</string> diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 1c212873f4..1e898026c0 100755 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -219,6 +219,12 @@ public: ** ** *******************************************************************************/ + //-------------------------------------------------------------------- + // Composites + //-------------------------------------------------------------------- +public: + virtual void invalidateComposite(LLTexLayerSet* layerset) = 0; + /******************************************************************************** ** ** ** MESHES @@ -257,6 +263,7 @@ public: //-------------------------------------------------------------------- public: LLColor4 getGlobalColor(const std::string& color_name ) const; + virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color) = 0; protected: LLTexGlobalColor* mTexSkinColor; LLTexGlobalColor* mTexHairColor; diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index 0e77b29cce..432e2e9f49 100755 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -103,6 +103,11 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(LLTexGlobalColor* tex_global_color) return new_param; } +void LLTexParamGlobalColor::onGlobalColorChanged() +{ + mAvatarAppearance->onGlobalColorChanged(mTexGlobalColor); +} + //----------------------------------------------------------------------------- // LLTexGlobalColorInfo //----------------------------------------------------------------------------- diff --git a/indra/llappearance/lltexglobalcolor.h b/indra/llappearance/lltexglobalcolor.h index 02ba14a959..1b0c91b5ca 100755 --- a/indra/llappearance/lltexglobalcolor.h +++ b/indra/llappearance/lltexglobalcolor.h @@ -74,6 +74,8 @@ class LLTexParamGlobalColor : public LLTexLayerParamColor public: LLTexParamGlobalColor(LLTexGlobalColor *tex_color); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; +protected: + /*virtual*/ void onGlobalColorChanged(); private: LLTexGlobalColor* mTexGlobalColor; }; diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 36147f01e0..9608e2d391 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -178,6 +178,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight) if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); mTexLayer->invalidateMorphMasks(); } } @@ -464,6 +465,24 @@ void LLTexLayerParamColor::setWeight(F32 weight) if (cur_u8 != new_u8) { mCurWeight = new_weight; + + const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)getInfo(); + + if (info->mNumColors <= 0) + { + // This will happen when we set the default weight the first time. + return; + } + + if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. + { + onGlobalColorChanged(); + if (mTexLayer) + { + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); + } + } + // llinfos << "param " << mName << " = " << new_weight << llendl; } } diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 96ce8d1f6d..e4004f108c 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -765,6 +765,40 @@ void LLAgentWearables::createStandardWearables() } } +// We no longer need this message in the current viewer, but send +// it for now to maintain compatibility with release viewers. Can +// remove this function once the SH-3455 changesets are universally deployed. +void LLAgentWearables::sendDummyAgentWearablesUpdate() +{ + LL_DEBUGS("Avatar") << "sendAgentWearablesUpdate()" << llendl; + + // Send the AgentIsNowWearing + gMessageSystem->newMessageFast(_PREHASH_AgentIsNowWearing); + + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + // Send 4 standardized nonsense item ids (same as returned by the modified sim, not that it especially matters). + gMessageSystem->nextBlockFast(_PREHASH_WearableData); + gMessageSystem->addU8Fast(_PREHASH_WearableType, U8(1)); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID("db5a4e5f-9da3-44c8-992d-1181c5795498")); + + gMessageSystem->nextBlockFast(_PREHASH_WearableData); + gMessageSystem->addU8Fast(_PREHASH_WearableType, U8(2)); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID("6969c7cc-f72f-4a76-a19b-c293cce8ce4f")); + + gMessageSystem->nextBlockFast(_PREHASH_WearableData); + gMessageSystem->addU8Fast(_PREHASH_WearableType, U8(3)); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID("7999702b-b291-48f9-8903-c91dfb828408")); + + gMessageSystem->nextBlockFast(_PREHASH_WearableData); + gMessageSystem->addU8Fast(_PREHASH_WearableType, U8(4)); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID("566cb59e-ef60-41d7-bfa6-e0f293fbea40")); + + gAgent.sendReliableMessage(); +} + void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index) { LLUUID first_item_id = getWearableItemID((LLWearableType::EType)type, index); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 8fb2783fff..a93b6d9241 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -164,6 +164,11 @@ public: void saveAllWearables(); void revertWearable(const LLWearableType::EType type, const U32 index); + // We no longer need this message in the current viewer, but send + // it for now to maintain compatibility with release viewers. Can + // remove this function once the SH-3455 changesets are universally deployed. + void sendDummyAgentWearablesUpdate(); + //-------------------------------------------------------------------- // Static UI hooks //-------------------------------------------------------------------- diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 09147afb23..61d0855119 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2044,6 +2044,7 @@ bool idle_startup() LLAppearanceMgr::getInstance(), true, true, no_op)); LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); gAgent.setOutfitChosen(TRUE); + gAgentWearables.sendDummyAgentWearablesUpdate(); } display_startup(); @@ -2622,6 +2623,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } gAgent.setOutfitChosen(TRUE); + gAgentWearables.sendDummyAgentWearablesUpdate(); } //static |