From 020b156299a2aa0ab7d035850daaeec57a8e9045 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 15 Jul 2010 17:24:12 -0400 Subject: EXT-8135 FIXED Textures blurry when in Appearance Edit mode EXT-8445 Reduce baked texture timeout fro 120sec to 60sec default Also did some minor infrastructure cleanup, added code comments, etc. There is now separate logic for determining how to handle update (versus upload) requests. Also made a trivial change to llvoavatar to properly encapsulate mAppearanceAnimating. Also reduced the baked texture timeout to 60s (in settings.xml) --- indra/newview/app_settings/settings.xml | 16 ++- indra/newview/lltexlayer.cpp | 144 ++++++++++++++++----- indra/newview/lltexlayer.h | 78 +++++++---- indra/newview/lltextureview.cpp | 4 +- indra/newview/lltoolmorph.cpp | 2 +- indra/newview/llvoavatar.h | 5 +- .../newview/skins/default/xui/en/notifications.xml | 2 +- 7 files changed, 182 insertions(+), 69 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index af296f918e..810b2d9a1d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -585,7 +585,7 @@ Value 2 - AvatarBakedTextureTimeout + AvatarBakedTextureUploadTimeout Comment Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance. Set to 0 to disable and wait until all baked textures are at highest resolution. @@ -594,8 +594,20 @@ Type U32 Value - 120 + 60 + AvatarBakedLocalTextureUpdateTimeout + + Comment + Specifes the maximum time in seconds to wait before updating your appearance during appearance mode. + Persist + 1 + Type + U32 + Value + 10 + + AvatarSex Comment diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 46bd55de43..355f46e290 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -119,14 +119,16 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height) : // ORDER_LAST => must render these after the hints are created. LLViewerDynamicTexture( width, height, 4, LLViewerDynamicTexture::ORDER_LAST, TRUE ), - mNeedsUpdate(TRUE), - mNeedsUpload(FALSE), mUploadPending(FALSE), // Not used for any logic here, just to sync sending of updates + mNeedsUpload(FALSE), mNumLowresUploads(0), + mNeedsUpdate(TRUE), + mNumLowresUpdates(0), mTexLayerSet(owner) { LLTexLayerSetBuffer::sGLByteCount += getSize(); mNeedsUploadTimer.start(); + mNeedsUpdateTimer.start(); } LLTexLayerSetBuffer::~LLTexLayerSetBuffer() @@ -165,8 +167,9 @@ void LLTexLayerSetBuffer::dumpTotalByteCount() void LLTexLayerSetBuffer::requestUpdate() { - conditionalRestartUploadTimer(); + restartUpdateTimer(); mNeedsUpdate = TRUE; + mNumLowresUpdates = 0; // If we're in the middle of uploading a baked texture, we don't care about it any more. // When it's downloaded, ignore it. mUploadID.setNull(); @@ -196,6 +199,12 @@ void LLTexLayerSetBuffer::conditionalRestartUploadTimer() } } +void LLTexLayerSetBuffer::restartUpdateTimer() +{ + mNeedsUpdateTimer.reset(); + mNeedsUpdateTimer.start(); +} + void LLTexLayerSetBuffer::cancelUpload() { mNeedsUpload = FALSE; @@ -229,25 +238,31 @@ BOOL LLTexLayerSetBuffer::needsRender() llassert(mTexLayerSet->getAvatar() == gAgentAvatarp); if (!isAgentAvatarValid()) return FALSE; - const BOOL upload_now = isReadyToUpload(); - BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating; - if (needs_update) + const BOOL upload_now = mNeedsUpload && isReadyToUpload(); + const BOOL update_now = mNeedsUpdate && isReadyToUpdate(); + + // Don't render if we don't want to (or aren't ready to) upload or update. + if (!(update_now || upload_now)) { - BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT); - if (invalid_skirt) - { - // we were trying to create a skirt texture - // but we're no longer wearing a skirt... - needs_update = FALSE; - cancelUpload(); - } - else - { - needs_update &= mTexLayerSet->isLocalTextureDataAvailable(); - } + return FALSE; + } + + // Don't render if we're animating our appearance. + if (gAgentAvatarp->getIsAppearanceAnimating()) + { + return FALSE; } - return needs_update; + // Don't render if we are trying to create a shirt texture but aren't wearing a skirt. + if (gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && + !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT)) + { + cancelUpload(); + return FALSE; + } + + // Render if we have at least minimal level of detail for each local texture. + return mTexLayerSet->isLocalTextureDataAvailable(); } void LLTexLayerSetBuffer::preRender(BOOL clear_depth) @@ -272,11 +287,12 @@ BOOL LLTexLayerSetBuffer::render() gGL.setColorMask(true, true); // do we need to upload, and do we have sufficient data to create an uploadable composite? - // When do we upload the texture if gAgent.mNumPendingQueries is non-zero? - const BOOL upload_now = isReadyToUpload(); + // TODO: When do we upload the texture if gAgent.mNumPendingQueries is non-zero? + const BOOL upload_now = mNeedsUpload && isReadyToUpload(); + const BOOL update_now = mNeedsUpdate && isReadyToUpdate(); + BOOL success = TRUE; - // Composite the color data LLGLSUIDefault gls_ui; success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight ); @@ -294,7 +310,7 @@ BOOL LLTexLayerSetBuffer::render() if (mTexLayerSet->isVisible()) { mTexLayerSet->getAvatar()->debugBakedTextureUpload(mTexLayerSet->getBakedTexIndex(), FALSE); // FALSE for start of upload, TRUE for finish. - readBackAndUpload(); + doUpload(); } else { @@ -305,6 +321,11 @@ BOOL LLTexLayerSetBuffer::render() } } } + + if (update_now) + { + doUpdate(); + } // reset GL state gGL.setColorMask(true, true); @@ -312,7 +333,6 @@ BOOL LLTexLayerSetBuffer::render() // we have valid texture data now mGLTexturep->setGLTextureCreated(true); - mNeedsUpdate = FALSE; return success; } @@ -339,16 +359,16 @@ BOOL LLTexLayerSetBuffer::uploadInProgress() const BOOL LLTexLayerSetBuffer::isReadyToUpload() const { - if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. if (!gAgentQueryManager.hasNoPendingQueries()) return FALSE; // Can't upload if there are pending queries. if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures()) return FALSE; // Don't upload if avatar is using composites. // If we requested an upload and have the final LOD ready, then upload. - const BOOL can_highest_lod = mTexLayerSet->isLocalTextureDataFinal(); - if (can_highest_lod) return TRUE; + if (mTexLayerSet->isLocalTextureDataFinal()) return TRUE; - const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); - if (texture_timeout) + // Upload if we've hit a timeout. Upload is a pretty expensive process so we need to make sure + // we aren't doing uploads too frequently. + const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureUploadTimeout"); + if (texture_timeout != 0) { // The timeout period increases exponentially between every lowres upload in order to prevent // spamming the server with frequent uploads. @@ -359,10 +379,33 @@ BOOL LLTexLayerSetBuffer::isReadyToUpload() const const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable(); if (has_lower_lod && is_upload_textures_timeout) return TRUE; } + return FALSE; } -BOOL LLTexLayerSetBuffer::updateImmediate() +BOOL LLTexLayerSetBuffer::isReadyToUpdate() const +{ + // If we requested an update and have the final LOD ready, then update. + if (mTexLayerSet->isLocalTextureDataFinal()) return TRUE; + + // If we haven't done an update yet, then just do one now regardless of state of textures. + if (mNumLowresUpdates == 0) return TRUE; + + // Update if we've hit a timeout. Unlike for uploads, we can make this timeout fairly small + // since render unnecessarily doesn't cost much. + const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedLocalTextureUpdateTimeout"); + if (texture_timeout != 0) + { + // If we hit our timeout and have textures available at even lower resolution, then update. + const BOOL is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout; + const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable(); + if (has_lower_lod && is_update_textures_timeout) return TRUE; + } + + return FALSE; +} + +BOOL LLTexLayerSetBuffer::requestUpdateImmediate() { mNeedsUpdate = TRUE; BOOL result = FALSE; @@ -377,7 +420,9 @@ BOOL LLTexLayerSetBuffer::updateImmediate() return result; } -void LLTexLayerSetBuffer::readBackAndUpload() +// Create the baked texture, send it out to the server, then wait for it to come +// back so we can switch to using it. +void LLTexLayerSetBuffer::doUpload() { llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); @@ -447,6 +492,7 @@ void LLTexLayerSetBuffer::readBackAndUpload() LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id); + // upload ID is used to avoid overlaps, e.g. when the user rapidly makes two changes outside of Face Edit. mUploadID = asset_id; // Upload the image @@ -493,9 +539,10 @@ void LLTexLayerSetBuffer::readBackAndUpload() std::string lod_str = highest_lod ? "HighRes" : "LowRes"; LLSD args; args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); - args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUpdateTimer.getElapsedTimeF32()); args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); args["RESOLUTION"] = lod_str; + args["ACTION"] = "uploaded"; LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; } @@ -520,6 +567,37 @@ void LLTexLayerSetBuffer::readBackAndUpload() delete [] baked_color_data; } +// Mostly bookkeeping; don't need to actually "do" anything since +// render() will actually do the update. +void LLTexLayerSetBuffer::doUpdate() +{ + const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); + if (highest_lod) + { + mNeedsUpdate = FALSE; + } + else + { + mNumLowresUpdates++; + } + + restartUpdateTimer(); + + // Print out notification that we uploaded this texture. + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); + std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); + args["RESOLUTION"] = lod_str; + args["ACTION"] = "locally updated"; + LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); + llinfos << "Locally updating [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUpdateTimer.getElapsedTimeF32() << " ]" << llendl; + } +} // static void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, @@ -931,7 +1009,7 @@ void LLTexLayerSet::setUpdatesEnabled( BOOL b ) void LLTexLayerSet::updateComposite() { createComposite(); - mComposite->updateImmediate(); + mComposite->requestUpdateImmediate(); } LLTexLayerSetBuffer* LLTexLayerSet::getComposite() diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index cb2e1faaa6..745cd88c47 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -270,47 +270,69 @@ class LLTexLayerSetBuffer : public LLViewerDynamicTexture public: LLTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height); virtual ~LLTexLayerSetBuffer(); - /*virtual*/ S8 getType() const; - virtual void preRender(BOOL clear_depth); - virtual void postRender(BOOL success); - virtual BOOL render(); - BOOL updateImmediate(); +public: + /*virtual*/ S8 getType() const; BOOL isInitialized(void) const; - BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point - BOOL uploadNeeded() const; // We need to upload a new texture - BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result + static void dumpTotalByteCount(); + const std::string dumpTextureInfo() const; + virtual void restoreGLTexture(); + virtual void destroyGLTexture(); +protected: + void pushProjection() const; + void popProjection() const; +private: + LLTexLayerSet* const mTexLayerSet; + static S32 sGLByteCount; + //-------------------------------------------------------------------- + // Render + //-------------------------------------------------------------------- +public: /*virtual*/ BOOL needsRender(); - void requestUpdate(); +protected: + BOOL render(S32 x, S32 y, S32 width, S32 height); + virtual void preRender(BOOL clear_depth); + virtual void postRender(BOOL success); + virtual BOOL render(); + + //-------------------------------------------------------------------- + // Uploads + //-------------------------------------------------------------------- +public: void requestUpload(); void cancelUpload(); - BOOL render(S32 x, S32 y, S32 width, S32 height); - void readBackAndUpload(); + BOOL uploadNeeded() const; // We need to upload a new texture + BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result + BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point static void onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result, LLExtStat ext_status); - static void dumpTotalByteCount(); - const std::string dumpTextureInfo() const; - virtual void restoreGLTexture(); - virtual void destroyGLTexture(); - - protected: - void pushProjection() const; - void popProjection() const; BOOL isReadyToUpload() const; + void doUpload(); // Does a read back and upload. void conditionalRestartUploadTimer(); - private: - LLTexLayerSet* const mTexLayerSet; - BOOL mNeedsUpdate; // whether we need to update our baked textures - BOOL mNeedsUpload; // whether we need to send our baked textures to the server - U32 mNumLowresUploads; // number of times we've sent a lowres version of our baked textures to the server - BOOL mUploadPending; // whether we have received back the new baked textures - LLUUID mUploadID; // the current upload process (null if none). Used to avoid overlaps, e.g. when the user rapidly makes two changes outside of Face Edit. - static S32 sGLByteCount; - LLFrameTimer mNeedsUploadTimer; // Tracks time since upload was requested + BOOL mNeedsUpload; // Whether we need to send our baked textures to the server + U32 mNumLowresUploads; // Number of times we've sent a lowres version of our baked textures to the server + BOOL mUploadPending; // Whether we have received back the new baked textures + LLUUID mUploadID; // The current upload process (null if none). + LLFrameTimer mNeedsUploadTimer; // Tracks time since upload was requested and performed. + + //-------------------------------------------------------------------- + // Updates + //-------------------------------------------------------------------- +public: + void requestUpdate(); + BOOL requestUpdateImmediate(); +protected: + BOOL isReadyToUpdate() const; + void doUpdate(); + void restartUpdateTimer(); +private: + BOOL mNeedsUpdate; // Whether we need to locally update our baked textures + U32 mNumLowresUpdates; // Number of times we've locally updated with lowres version of our baked textures + LLFrameTimer mNeedsUpdateTimer; // Tracks time since update was requested and performed. }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 8ea4dbeb04..b588ff91d1 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -450,14 +450,14 @@ void LLAvatarTexBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); line_num++; } - const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); + const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureUploadTimeout"); const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); LLColor4 header_color(1.f, 1.f, 1.f, 0.9f); const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; - std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); + std::string header_text = llformat("[ Timeout('AvatarBakedTextureUploadTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num, header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); line_num++; diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index fa21b1a866..81559429b0 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -147,7 +147,7 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis BOOL LLVisualParamHint::needsRender() { - return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->mAppearanceAnimating && mAllowsUpdates; + return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->getIsAppearanceAnimating() && mAllowsUpdates; } void LLVisualParamHint::preRender(BOOL clear_depth) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 49b9fe1536..22fc595ea2 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -611,8 +611,9 @@ public: // Appearance morphing //-------------------------------------------------------------------- public: - BOOL mAppearanceAnimating; + BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; } private: + BOOL mAppearanceAnimating; LLFrameTimer mAppearanceMorphTimer; F32 mLastAppearanceBlendTime; @@ -622,7 +623,7 @@ private: public: 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); + static BOOL teToColorParams(LLVOAvatarDefines::ETextureIndex te, U32 *param_name); //-------------------------------------------------------------------- // Global colors diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 04bdb4302c..4c241562e6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6343,7 +6343,7 @@ Avatar '[NAME]' left as fully loaded. name="AvatarRezSelfBakeNotification" type="notifytip"> ( [EXISTENCE] seconds alive ) -You uploaded a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds. +You [ACTION] a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds. Date: Thu, 15 Jul 2010 17:54:09 -0400 Subject: EXT-8135 FIXED Textures blurry when in Appearance Edit mode Trivial fix to correct for wrong debug message printed out due to use of wrong timer. --- indra/newview/lltexlayer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 355f46e290..f4f8241b99 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -536,10 +536,10 @@ void LLTexLayerSetBuffer::doUpload() // Print out notification that we uploaded this texture. if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { - std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + const std::string lod_str = highest_lod ? "HighRes" : "LowRes"; LLSD args; args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); - args["TIME"] = llformat("%d",(U32)mNeedsUpdateTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); args["RESOLUTION"] = lod_str; args["ACTION"] = "uploaded"; @@ -587,10 +587,10 @@ void LLTexLayerSetBuffer::doUpdate() if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); - std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + const std::string lod_str = highest_lod ? "HighRes" : "LowRes"; LLSD args; args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); - args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUpdateTimer.getElapsedTimeF32()); args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); args["RESOLUTION"] = lod_str; args["ACTION"] = "locally updated"; -- cgit v1.2.3 From f3f56874168e3439dd032ff858d93e046404093f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 16 Jul 2010 17:37:27 +0300 Subject: EXT-8358 FIXED Added one more server hardcoded string to global strings in notifications.xml to make it localizable. Added "You died and have been teleported to your home location" string. It requires localization efforts. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/776/ --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fe6988c526..04eb8164f8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5106,7 +5106,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data) void process_alert_core(const std::string& message, BOOL modal) { - // HACK -- handle callbacks for specific alerts + // HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml if ( message == "You died and have been teleported to your home location") { LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 04bdb4302c..cd6939ede6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6402,11 +6402,14 @@ If you continue to have problems, please visit the [SUPPORT_SITE]. - Your system memory does not meet the minimum requirements. - If you own a piece of land, you can make it your home location. Otherwise, you can look at the Map and find places marked "Infohub". + +You died and have been teleported to your home location. + -- cgit v1.2.3 From 0fa0ffb5748bd9b8d61954649eafe3e28517548c Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Fri, 16 Jul 2010 18:19:31 +0300 Subject: EXT-7639 FIXED (Make shop button open different URLs depending on what is selected in outfit editor) - 'Add More' panel multiple selection behavior Implemented the following behavior: \"if multiple selection is made in the Add More panel then default marketplace home URL can be used\". Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/769/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 53 ++++++++++++++++++++++++------------- indra/newview/llpaneloutfitedit.h | 4 ++- 2 files changed, 37 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 937b794686..571261ff5b 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -629,24 +629,35 @@ void LLPanelOutfitEdit::onShopButtonClicked() if (isAgentAvatarValid()) { // try to get wearable type from 'Add More' panel first (EXT-7639) - LLWearableType::EType type = getAddMorePanelSelectionType(); + selection_info_t selection_info = getAddMorePanelSelectionType(); - if (type == LLWearableType::WT_NONE) + LLWearableType::EType type = selection_info.first; + + if (selection_info.second > 1) { - type = getCOFWearablesSelectionType(); + // the second argument is not important in this case: generic market place will be opened + url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE); } + else + { + if (type == LLWearableType::WT_NONE) + { + type = getCOFWearablesSelectionType(); + } - ESex sex = gAgentAvatarp->getSex(); + ESex sex = gAgentAvatarp->getSex(); - // WT_INVALID comes for attachments - if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE) - { - url = url_resolver.resolveURL(type, sex); - } + // WT_INVALID comes for attachments + if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE) + { + url = url_resolver.resolveURL(type, sex); + } - if (url.empty()) - { - url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); + if (url.empty()) + { + url = url_resolver.resolveURL( + mCOFWearables->getExpandedAccordionAssetType(), sex); + } } } else @@ -685,9 +696,9 @@ LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const return type; } -LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const +LLPanelOutfitEdit::selection_info_t LLPanelOutfitEdit::getAddMorePanelSelectionType() const { - LLWearableType::EType type = LLWearableType::WT_NONE; + selection_info_t result = std::make_pair(LLWearableType::WT_NONE, 0); if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible()) { @@ -695,9 +706,11 @@ LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const { std::set selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); - if (selected_uuids.size() == 1) + result.second = selected_uuids.size(); + + if (result.second == 1) { - type = getWearableTypeByItemUUID(*(selected_uuids.begin())); + result.first = getWearableTypeByItemUUID(*(selected_uuids.begin())); } } else if (mWearableItemsList != NULL && mWearableItemsList->getVisible()) @@ -705,14 +718,16 @@ LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const std::vector selected_uuids; mWearableItemsList->getSelectedUUIDs(selected_uuids); - if (selected_uuids.size() == 1) + result.second = selected_uuids.size(); + + if (result.second == 1) { - type = getWearableTypeByItemUUID(selected_uuids.front()); + result.first = getWearableTypeByItemUUID(selected_uuids.front()); } } } - return type; + return result; } LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 770e2a229b..fe10215f27 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -198,8 +198,10 @@ private: void getCurrentItemUUID(LLUUID& selected_id); void onCOFChanged(); + typedef std::pair selection_info_t; + LLWearableType::EType getCOFWearablesSelectionType() const; - LLWearableType::EType getAddMorePanelSelectionType() const; + selection_info_t getAddMorePanelSelectionType() const; LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const; LLTextBox* mCurrentOutfitName; -- cgit v1.2.3 From b4aed58dec573f057dc80ef083a86302b36d149d Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Mon, 19 Jul 2010 12:20:56 -0700 Subject: CT-575 WIP Set15 translation for 8 languages --- .../skins/default/xui/da/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/da/menu_inventory.xml | 1 + .../skins/default/xui/da/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/da/menu_viewer.xml | 2 +- .../newview/skins/default/xui/da/notifications.xml | 2 +- .../skins/default/xui/da/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/da/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/de/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/de/menu_inventory.xml | 2 +- .../skins/default/xui/de/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/de/menu_viewer.xml | 2 +- .../newview/skins/default/xui/de/notifications.xml | 2 +- .../skins/default/xui/de/panel_nearby_media.xml | 8 ++- .../newview/skins/default/xui/de/panel_people.xml | 2 +- indra/newview/skins/default/xui/de/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/es/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/es/menu_inventory.xml | 2 +- .../skins/default/xui/es/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/es/menu_viewer.xml | 2 +- .../skins/default/xui/es/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/es/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/fr/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/fr/menu_inventory.xml | 2 +- .../skins/default/xui/fr/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/fr/menu_viewer.xml | 2 +- .../newview/skins/default/xui/fr/notifications.xml | 2 +- .../skins/default/xui/fr/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/fr/strings.xml | 63 ++++++++++++++++++---- .../skins/default/xui/it/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/it/menu_inventory.xml | 2 +- .../skins/default/xui/it/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/it/menu_viewer.xml | 2 +- .../skins/default/xui/it/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/it/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/ja/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/ja/menu_inventory.xml | 2 +- .../skins/default/xui/ja/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/ja/menu_viewer.xml | 2 +- .../skins/default/xui/ja/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/ja/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/pl/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/pl/menu_inventory.xml | 1 + .../skins/default/xui/pl/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/pl/menu_viewer.xml | 2 +- .../skins/default/xui/pl/panel_nearby_media.xml | 8 ++- indra/newview/skins/default/xui/pl/strings.xml | 62 +++++++++++++++++---- .../skins/default/xui/pt/floater_camera.xml | 29 ++++++++++ .../skins/default/xui/pt/floater_land_holdings.xml | 10 ++-- .../newview/skins/default/xui/pt/floater_tools.xml | 26 ++++----- .../skins/default/xui/pt/menu_inventory.xml | 2 +- .../skins/default/xui/pt/menu_inventory_add.xml | 1 + indra/newview/skins/default/xui/pt/menu_viewer.xml | 2 +- .../newview/skins/default/xui/pt/notifications.xml | 2 +- .../skins/default/xui/pt/panel_nearby_media.xml | 8 ++- .../skins/default/xui/pt/panel_place_profile.xml | 4 +- .../skins/default/xui/pt/panel_region_general.xml | 28 +++++----- indra/newview/skins/default/xui/pt/strings.xml | 62 +++++++++++++++++---- 57 files changed, 767 insertions(+), 142 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/da/floater_camera.xml b/indra/newview/skins/default/xui/da/floater_camera.xml index a1b98ec4ce..5b7ef6db54 100644 --- a/indra/newview/skins/default/xui/da/floater_camera.xml +++ b/indra/newview/skins/default/xui/da/floater_camera.xml @@ -22,6 +22,35 @@ Se objekt + + + + Se forfra + + + + + Se fra siden + + + + + Se bagfra + + + + + + + Se fra objekt + + + + + Førsteperson + + + diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index 96da784fe4..35551318d1 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -59,6 +59,7 @@ + diff --git a/indra/newview/skins/default/xui/da/menu_inventory_add.xml b/indra/newview/skins/default/xui/da/menu_inventory_add.xml index dc79e4109e..07f70d7190 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory_add.xml @@ -5,6 +5,7 @@ + diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index 0d36a08652..bb4ee1800a 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -92,7 +92,6 @@ - @@ -110,6 +109,7 @@ + diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 163df5b8d2..73a42e7fb8 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -231,7 +231,7 @@ Er du sikker på at du vil fortsætte? Slet favorit <nolink>[PICK]</nolink>? - Slet valgte sæt? + Slet det valgte sæt? diff --git a/indra/newview/skins/default/xui/da/panel_nearby_media.xml b/indra/newview/skins/default/xui/da/panel_nearby_media.xml index 9b8b70bb34..7d25b2af99 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index b9b6a8ed50..45ae8a0c95 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 968f0f9ed1..24582e4be3 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -366,7 +366,7 @@ Sind Sie sicher, dass Sie fortfahren wollen? - Das/Die ausgewählte(n) Outfit(s) löschen? + Das ausgewählte Outfit löschen? diff --git a/indra/newview/skins/default/xui/de/panel_nearby_media.xml b/indra/newview/skins/default/xui/de/panel_nearby_media.xml index 7c819c28af..e7886fa149 100644 --- a/indra/newview/skins/default/xui/de/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/de/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 66c0bf9311..f6ad18cf3a 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/es/panel_nearby_media.xml b/indra/newview/skins/default/xui/es/panel_nearby_media.xml index a3139dc099..b78ecd0cd0 100644 --- a/indra/newview/skins/default/xui/es/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/es/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index cd0e41e496..6338fa0cd0 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 59c978bb6b..5cb42a0435 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -358,7 +358,7 @@ Voulez-vous vraiment continuer ? - Supprimer la ou les tenues sélectionnées ? + Supprimer la tenue sélectionnée ? diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml index 0b92dddeb7..978ca86d62 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 6290b79211..f0dd035b5d 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/it/panel_nearby_media.xml b/indra/newview/skins/default/xui/it/panel_nearby_media.xml index a5d42dce2d..bec36fd427 100644 --- a/indra/newview/skins/default/xui/it/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/it/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 7c4912fa07..164341ad2f 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml index 645f111135..b3df3503bb 100644 --- a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 5907e6b3f4..16a89b2b27 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -92,7 +92,6 @@ - @@ -110,6 +109,7 @@ + diff --git a/indra/newview/skins/default/xui/pl/panel_nearby_media.xml b/indra/newview/skins/default/xui/pl/panel_nearby_media.xml index 02ef002891..86c7275e79 100644 --- a/indra/newview/skins/default/xui/pl/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/pl/panel_nearby_media.xml @@ -23,6 +23,12 @@ diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index d9ff847647..d5e0808000 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -94,7 +94,6 @@ - @@ -112,6 +111,7 @@ + diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 5ab5de59d9..2a1b5f995a 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -356,7 +356,7 @@ Tem certeza de que quer prosseguir? - Excluir look(s) selecionado(s)? + Excluir o look selecionado? diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_media.xml b/indra/newview/skins/default/xui/pt/panel_nearby_media.xml index acab2cb897..672b8e6735 100644 --- a/indra/newview/skins/default/xui/pt/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/pt/panel_nearby_media.xml @@ -23,6 +23,12 @@