diff options
Diffstat (limited to 'indra/newview')
27 files changed, 227 insertions, 120 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1d9519d675..80ac385e3b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -56,6 +56,7 @@ #include "llallocator.h" #include "llares.h" #include "llcurl.h" +#include "llcalc.h" #include "lltexturestats.h" #include "lltexturestats.h" #include "llviewerwindow.h" @@ -1543,7 +1544,9 @@ bool LLAppViewer::cleanup() // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be deleted. LLWorldMap::getInstance()->reset(); // release any images - + + LLCalc::cleanUp(); + llinfos << "Global stuff deleted" << llendflush; if (gAudiop) diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index a05cbc64fb..966f5b941e 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -458,7 +458,7 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content) std::string result = content["state"]; LLUUID new_id = content["new_asset"]; - llinfos << "result: " << result << "new_id:" << new_id << llendl; + llinfos << "result: " << result << " new_id: " << new_id << llendl; if (result == "complete" && mBakedUploadData != NULL) { // Invoke diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index 70871b62e2..381b919c4a 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -112,6 +112,7 @@ private: struct LLBakedUploadData; class LLSendTexLayerResponder : public LLAssetUploadResponder { + LOG_CLASS(LLSendTexLayerResponder); public: LLSendTexLayerResponder(const LLSD& post_data, const LLUUID& vfile_id, diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp index 4fefd2242a..d08aa81cfe 100644 --- a/indra/newview/llfloaterdeleteenvpreset.cpp +++ b/indra/newview/llfloaterdeleteenvpreset.cpp @@ -258,7 +258,7 @@ void LLFloaterDeleteEnvPreset::populateDayCyclesList() void LLFloaterDeleteEnvPreset::postPopulate() { // Handle empty list and empty selection. - bool has_selection = mPresetCombo->getItemCount() > 1 && mPresetCombo->getSelectedValue().isDefined(); + bool has_selection = mPresetCombo->getItemCount() > 0 && mPresetCombo->getSelectedValue().isDefined(); if (!has_selection) { diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 07c0878877..bedc7ef704 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -317,11 +317,8 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) // static void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) { - LL_DEBUGS("Windlight") << "Processing region info" << LL_ENDL; - LLPanel* panel; LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info"); - llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; if(!floater) { return; @@ -330,6 +327,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) // We need to re-request environment setting here, // otherwise after we apply (send) updated region settings we won't get them back, // so our environment won't be updated. + // This is also the way to know about externally changed region environment. LLEnvManagerNew::instance().requestRegionSettings(); LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); @@ -3249,29 +3247,30 @@ void LLPanelEnvironmentInfo::setDirty(bool dirty) getChildView("cancel_btn")->setEnabled(dirty); } -void LLPanelEnvironmentInfo::sendRegionSunUpdate(F32 sun_angle) +void LLPanelEnvironmentInfo::sendRegionSunUpdate() { LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); - bool region_use_fixed_sky = sun_angle >= 0.f; - // Set sun hour. + // If the region is being switched to fixed sky, + // change the region's sun hour according to the (fixed) sun position. + // This is needed for llGetSunDirection() LSL function to work properly (STORM-1330). + const LLSD& sky_map = mNewRegionSettings.getSkyMap(); + bool region_use_fixed_sky = sky_map.size() == 1; if (region_use_fixed_sky) { LLWLParamSet param_set; - LLSD params; - std::string unused; - if (!getSelectedSkyParams(params, unused)) - { - return; - } - param_set.setAll(params); + llassert(sky_map.isMap()); + param_set.setAll(sky_map.beginMap()->second); + F32 sun_angle = param_set.getSunAngle(); + LL_DEBUGS("Windlight Sync") << "Old sun hour: " << region_info.mSunHour << LL_ENDL; // convert value range from 0..2pi to 6..30 region_info.mSunHour = fmodf((sun_angle / F_TWO_PI) * 24.f, 24.f) + 6.f; } region_info.setUseFixedSun(region_use_fixed_sky); region_info.mUseEstateSun = !region_use_fixed_sky; + LL_DEBUGS("Windlight Sync") << "Sun hour: " << region_info.mSunHour << LL_ENDL; region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice()); } @@ -3555,7 +3554,6 @@ void LLPanelEnvironmentInfo::onBtnApply() LLSD day_cycle; LLSD sky_map; LLSD water_params; - F32 sun_angle = -1.f; // invalid value meaning no fixed sky if (use_defaults) { @@ -3588,9 +3586,6 @@ void LLPanelEnvironmentInfo::onBtnApply() param_set.setAll(params); refs[LLWLParamKey(preset_name, LLEnvKey::SCOPE_LOCAL)] = param_set; // scope doesn't matter here sky_map = LLWLParamManager::createSkyMap(refs); - - // Remember the sun angle to set fixed region sun hour below. - sun_angle = param_set.getSunAngle(); } else // use day cycle { @@ -3611,16 +3606,6 @@ void LLPanelEnvironmentInfo::onBtnApply() LL_DEBUGS("Windlight") << "Fixing negative time" << LL_ENDL; day_cycle[0][0] = 0.0f; } - - // If the day cycle contains exactly one preset (i.e it's effectively a fixed sky), - // remember the preset's sun angle to set fixed region sun hour below. - if (sky_map.size() == 1) - { - LLWLParamSet param_set; - llassert(sky_map.isMap()); - param_set.setAll(sky_map.beginMap()->second); - sun_angle = param_set.getSunAngle(); - } } // Get water params. @@ -3640,8 +3625,9 @@ void LLPanelEnvironmentInfo::onBtnApply() return; } - // Set the region sun phase/flags according to the chosen new preferences. - sendRegionSunUpdate(sun_angle); + // When the settings get applied, we'll also send the region sun position update. + // To determine the sun angle we're going to need the new settings. + mNewRegionSettings = new_region_settings; // Start spinning the progress indicator. setApplyProgress(true); @@ -3672,10 +3658,18 @@ void LLPanelEnvironmentInfo::onRegionSettingschange() void LLPanelEnvironmentInfo::onRegionSettingsApplied(bool ok) { - LL_DEBUGS("Windlight") << "Applying region settings finished, stopping indicator" << LL_ENDL; // If applying new settings has failed, stop the indicator right away. // Otherwise it will be stopped when we receive the updated settings from server. - if (!ok) + if (ok) + { + // Set the region sun phase/flags according to the chosen new preferences. + // + // If we do this earlier we may get jerky transition from fixed sky to a day cycle (STORM-1481). + // That is caused by the simulator re-sending the region info, which in turn makes us + // re-request and display old region environment settings while the new ones haven't been applied yet. + sendRegionSunUpdate(); + } + else { setApplyProgress(false); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 4809937324..e7917c382c 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -34,6 +34,8 @@ #include "llhost.h" #include "llpanel.h" +#include "llenvmanager.h" // for LLEnvironmentSettings + class LLAvatarName; class LLDispatcher; class LLLineEditor; @@ -431,7 +433,7 @@ private: void setApplyProgress(bool started); void setDirty(bool dirty); - void sendRegionSunUpdate(F32 sun_angle); + void sendRegionSunUpdate(); void populateWaterPresetsList(); void populateSkyPresetsList(); @@ -454,6 +456,9 @@ private: void onRegionSettingschange(); void onRegionSettingsApplied(bool ok); + /// New environment settings that are being applied to the region. + LLEnvironmentSettings mNewRegionSettings; + bool mEnableEditing; LLRadioGroup* mRegionSettingsRadioGroup; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 07c7f35989..a4f6921f98 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -30,6 +30,7 @@ #include "llpanelface.h" // library includes +#include "llcalc.h" #include "llerror.h" #include "llfocusmgr.h" #include "llrect.h" @@ -926,6 +927,16 @@ void LLPanelFace::getState() getChildView("button apply")->setEnabled(enabled); } } + + // Set variable values for numeric expressions + LLCalc* calcp = LLCalc::getInstance(); + calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal()); + calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal()); + calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal()); + calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal()); + calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal()); + calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal()); + calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal()); } else { @@ -961,6 +972,16 @@ void LLPanelFace::getState() //getChildView("has media")->setEnabled(FALSE); //getChildView("media info set")->setEnabled(FALSE); + + // Set variable values for numeric expressions + LLCalc* calcp = LLCalc::getInstance(); + calcp->clearVar(LLCalc::TEX_U_SCALE); + calcp->clearVar(LLCalc::TEX_V_SCALE); + calcp->clearVar(LLCalc::TEX_U_OFFSET); + calcp->clearVar(LLCalc::TEX_V_OFFSET); + calcp->clearVar(LLCalc::TEX_ROTATION); + calcp->clearVar(LLCalc::TEX_TRANSPARENCY); + calcp->clearVar(LLCalc::TEX_GLOW); } } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 52917ff20b..c222bbb191 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -41,6 +41,7 @@ // project includes #include "llagent.h" #include "llbutton.h" +#include "llcalc.h" #include "llcheckboxctrl.h" #include "llcolorswatch.h" #include "llcombobox.h" @@ -318,6 +319,8 @@ void LLPanelObject::getState( ) } } + LLCalc* calcp = LLCalc::getInstance(); + LLVOVolume *volobjp = NULL; if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME)) { @@ -334,6 +337,7 @@ void LLPanelObject::getState( ) // Disable all text input fields clearCtrls(); + calcp->clearAllVariables(); return; } @@ -360,12 +364,18 @@ void LLPanelObject::getState( ) mCtrlPosX->set( vec.mV[VX] ); mCtrlPosY->set( vec.mV[VY] ); mCtrlPosZ->set( vec.mV[VZ] ); + calcp->setVar(LLCalc::X_POS, vec.mV[VX]); + calcp->setVar(LLCalc::Y_POS, vec.mV[VY]); + calcp->setVar(LLCalc::Z_POS, vec.mV[VZ]); } else { mCtrlPosX->clear(); mCtrlPosY->clear(); mCtrlPosZ->clear(); + calcp->clearVar(LLCalc::X_POS); + calcp->clearVar(LLCalc::Y_POS); + calcp->clearVar(LLCalc::Z_POS); } @@ -380,12 +390,18 @@ void LLPanelObject::getState( ) mCtrlScaleX->set( vec.mV[VX] ); mCtrlScaleY->set( vec.mV[VY] ); mCtrlScaleZ->set( vec.mV[VZ] ); + calcp->setVar(LLCalc::X_SCALE, vec.mV[VX]); + calcp->setVar(LLCalc::Y_SCALE, vec.mV[VY]); + calcp->setVar(LLCalc::Z_SCALE, vec.mV[VZ]); } else { mCtrlScaleX->clear(); mCtrlScaleY->clear(); mCtrlScaleZ->clear(); + calcp->setVar(LLCalc::X_SCALE, 0.f); + calcp->setVar(LLCalc::Y_SCALE, 0.f); + calcp->setVar(LLCalc::Z_SCALE, 0.f); } mLabelSize->setEnabled( enable_scale ); @@ -405,12 +421,18 @@ void LLPanelObject::getState( ) mCtrlRotX->set( mCurEulerDegrees.mV[VX] ); mCtrlRotY->set( mCurEulerDegrees.mV[VY] ); mCtrlRotZ->set( mCurEulerDegrees.mV[VZ] ); + calcp->setVar(LLCalc::X_ROT, mCurEulerDegrees.mV[VX]); + calcp->setVar(LLCalc::Y_ROT, mCurEulerDegrees.mV[VY]); + calcp->setVar(LLCalc::Z_ROT, mCurEulerDegrees.mV[VZ]); } else { mCtrlRotX->clear(); mCtrlRotY->clear(); mCtrlRotZ->clear(); + calcp->clearVar(LLCalc::X_ROT); + calcp->clearVar(LLCalc::Y_ROT); + calcp->clearVar(LLCalc::Z_ROT); } mLabelRotation->setEnabled( enable_rotate ); @@ -625,9 +647,9 @@ void LLPanelObject::getState( ) F32 end_t = volume_params.getEndT(); // Hollowness - F32 hollow = volume_params.getHollow(); - mSpinHollow->set( 100.f * hollow ); - + F32 hollow = 100.f * volume_params.getHollow(); + mSpinHollow->set( hollow ); + calcp->setVar(LLCalc::HOLLOW, hollow); // All hollow objects allow a shape to be selected. if (hollow > 0.f) { @@ -679,6 +701,10 @@ void LLPanelObject::getState( ) mSpinCutEnd ->set( cut_end ); mCtrlPathBegin ->set( adv_cut_begin ); mCtrlPathEnd ->set( adv_cut_end ); + calcp->setVar(LLCalc::CUT_BEGIN, cut_begin); + calcp->setVar(LLCalc::CUT_END, cut_end); + calcp->setVar(LLCalc::PATH_BEGIN, adv_cut_begin); + calcp->setVar(LLCalc::PATH_END, adv_cut_end); // Twist F32 twist = volume_params.getTwist(); @@ -697,18 +723,24 @@ void LLPanelObject::getState( ) mSpinTwist ->set( twist ); mSpinTwistBegin ->set( twist_begin ); + calcp->setVar(LLCalc::TWIST_END, twist); + calcp->setVar(LLCalc::TWIST_BEGIN, twist_begin); // Shear F32 shear_x = volume_params.getShearX(); F32 shear_y = volume_params.getShearY(); mSpinShearX->set( shear_x ); mSpinShearY->set( shear_y ); + calcp->setVar(LLCalc::X_SHEAR, shear_x); + calcp->setVar(LLCalc::Y_SHEAR, shear_y); // Taper F32 taper_x = volume_params.getTaperX(); F32 taper_y = volume_params.getTaperY(); mSpinTaperX->set( taper_x ); mSpinTaperY->set( taper_y ); + calcp->setVar(LLCalc::X_TAPER, taper_x); + calcp->setVar(LLCalc::Y_TAPER, taper_y); // Radius offset. F32 radius_offset = volume_params.getRadiusOffset(); @@ -738,10 +770,12 @@ void LLPanelObject::getState( ) } } mSpinRadiusOffset->set( radius_offset); + calcp->setVar(LLCalc::RADIUS_OFFSET, radius_offset); // Revolutions F32 revolutions = volume_params.getRevolutions(); mSpinRevolutions->set( revolutions ); + calcp->setVar(LLCalc::REVOLUTIONS, revolutions); // Skew F32 skew = volume_params.getSkew(); @@ -766,6 +800,7 @@ void LLPanelObject::getState( ) } } mSpinSkew->set( skew ); + calcp->setVar(LLCalc::SKEW, skew); } // Compute control visibility, label names, and twist range. @@ -869,6 +904,8 @@ void LLPanelObject::getState( ) case MI_RING: mSpinScaleX->set( scale_x ); mSpinScaleY->set( scale_y ); + calcp->setVar(LLCalc::X_HOLE, scale_x); + calcp->setVar(LLCalc::Y_HOLE, scale_y); mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); @@ -883,6 +920,14 @@ void LLPanelObject::getState( ) mSpinScaleX->setMaxValue(1.f); mSpinScaleY->setMinValue(-1.f); mSpinScaleY->setMaxValue(1.f); + + // Torus' Hole Size is Box/Cyl/Prism's Taper + calcp->setVar(LLCalc::X_TAPER, 1.f - scale_x); + calcp->setVar(LLCalc::Y_TAPER, 1.f - scale_y); + + // Box/Cyl/Prism have no hole size + calcp->setVar(LLCalc::X_HOLE, 0.f); + calcp->setVar(LLCalc::Y_HOLE, 0.f); } break; } diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 0645fd8a54..f19b54c1d4 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -38,6 +38,8 @@ #include "llsidetray.h" #include "llviewermenu.h" #include "llwearableitemslist.h" +#include "llsdserialize.h" +#include "llclipboard.h" // Context menu and Gear menu helper. static void edit_outfit() @@ -58,6 +60,7 @@ public: registrar.add("Gear.Edit", boost::bind(&edit_outfit)); registrar.add("Gear.TakeOff", boost::bind(&LLWearingGearMenu::onTakeOff, this)); + registrar.add("Gear.Copy", boost::bind(&LLPanelWearing::copyToClipboard, mPanelWearing)); enable_registrar.add("Gear.OnEnable", boost::bind(&LLPanelWearing::isActionEnabled, mPanelWearing, _2)); @@ -280,4 +283,25 @@ void LLPanelWearing::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const mCOFItemsList->getSelectedUUIDs(selected_uuids); } +void LLPanelWearing::copyToClipboard() +{ + std::string text; + std::vector<LLSD> data; + mCOFItemsList->getValues(data); + + for(std::vector<LLSD>::const_iterator iter = data.begin(); iter != data.end();) + { + LLSD uuid = (*iter); + LLViewerInventoryItem* item = gInventory.getItem(uuid); + + iter++; + if (item != NULL) + { + // Append a newline to all but the last line + text += iter != data.end() ? item->getName() + "\n" : item->getName(); + } + } + + gClipboard.copyFromString(utf8str_to_wstring(text)); +} // EOF diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h index 157b2c4c5f..9a212b3cca 100644 --- a/indra/newview/llpanelwearing.h +++ b/indra/newview/llpanelwearing.h @@ -60,6 +60,8 @@ public: /*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; + /*virtual*/ void copyToClipboard(); + boost::signals2::connection setSelectionChangeCallback(commit_callback_t cb); bool hasItemSelected(); diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 6238f183c1..698c4f9bb9 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -157,6 +157,7 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) // actually the "last set" sun hour, not the current sun hour. JC msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour); + LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL; // the only reasonable way to decide if we actually have any data is to // check to see if any of these fields have nonzero sizes diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 500c2a7b86..bd41aa64f0 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -51,6 +51,9 @@ using namespace LLVOAvatarDefines; +static const S32 BAKE_UPLOAD_ATTEMPTS = 7; +static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt + class LLTexLayerInfo { friend class LLTexLayer; @@ -93,11 +96,13 @@ private: //----------------------------------------------------------------------------- LLBakedUploadData::LLBakedUploadData(const LLVOAvatarSelf* avatar, LLTexLayerSet* layerset, - const LLUUID& id) : + const LLUUID& id, + bool highest_res) : mAvatar(avatar), mTexLayerSet(layerset), mID(id), - mStartTime(LLFrameTimer::getTotalTime()) // Record starting time + mStartTime(LLFrameTimer::getTotalTime()), // Record starting time + mIsHighestRes(highest_res) { } @@ -116,6 +121,7 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner, mUploadPending(FALSE), // Not used for any logic here, just to sync sending of updates mNeedsUpload(FALSE), mNumLowresUploads(0), + mUploadFailCount(0), mNeedsUpdate(TRUE), mNumLowresUpdates(0), mTexLayerSet(owner) @@ -204,6 +210,7 @@ void LLTexLayerSetBuffer::cancelUpload() mNeedsUpload = FALSE; mUploadPending = FALSE; mNeedsUploadTimer.pause(); + mUploadRetryTimer.reset(); } void LLTexLayerSetBuffer::pushProjection() const @@ -356,25 +363,38 @@ BOOL LLTexLayerSetBuffer::isReadyToUpload() const 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. - if (mTexLayerSet->isLocalTextureDataFinal()) return TRUE; - - // 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) + BOOL ready = FALSE; + if (mTexLayerSet->isLocalTextureDataFinal()) + { + // If we requested an upload and have the final LOD ready, upload (or wait a while if this is a retry) + if (mUploadFailCount == 0) + { + ready = TRUE; + } + else + { + ready = mUploadRetryTimer.getElapsedTimeF32() >= BAKE_UPLOAD_RETRY_DELAY * (1 << (mUploadFailCount - 1)); + } + } + else { - // The timeout period increases exponentially between every lowres upload in order to prevent - // spamming the server with frequent uploads. - const U32 texture_timeout_threshold = texture_timeout*(1 << mNumLowresUploads); + // 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. + const U32 texture_timeout_threshold = texture_timeout*(1 << mNumLowresUploads); - // If we hit our timeout and have textures available at even lower resolution, then upload. - const BOOL is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout_threshold; - const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable(); - if (has_lower_lod && is_upload_textures_timeout) return TRUE; + // If we hit our timeout and have textures available at even lower resolution, then upload. + const BOOL is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout_threshold; + const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable(); + ready = has_lower_lod && is_upload_textures_timeout; + } } - return FALSE; + return ready; } BOOL LLTexLayerSetBuffer::isReadyToUpdate() const @@ -482,17 +502,20 @@ void LLTexLayerSetBuffer::doUpload() if (valid) { + const bool highest_lod = mTexLayerSet->isLocalTextureDataFinal(); // Baked_upload_data is owned by the responder and deleted after the request completes. LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, - asset_id); + asset_id, + highest_lod); // 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 const std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); if(!url.empty() - && !LLPipeline::sForceOldBakedUpload) // toggle debug setting UploadBakedTexOld to change between the new caps method and old method + && !LLPipeline::sForceOldBakedUpload // toggle debug setting UploadBakedTexOld to change between the new caps method and old method + && (mUploadFailCount < (BAKE_UPLOAD_ATTEMPTS - 1))) // Try last ditch attempt via asset store if cap upload is failing. { LLSD body = LLSD::emptyMap(); // The responder will call LLTexLayerSetBuffer::onTextureUploadComplete() @@ -511,7 +534,6 @@ void LLTexLayerSetBuffer::doUpload() llinfos << "Baked texture upload via Asset Store." << llendl; } - const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); if (highest_lod) { // Sending the final LOD for the baked texture. All done, pause @@ -603,14 +625,15 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, { LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; - if ((result == 0) && - isAgentAvatarValid() && + if (isAgentAvatarValid() && !gAgentAvatarp->isDead() && (baked_upload_data->mAvatar == gAgentAvatarp) && // Sanity check: only the user's avatar should be uploading textures. (baked_upload_data->mTexLayerSet->hasComposite())) { LLTexLayerSetBuffer* layerset_buffer = baked_upload_data->mTexLayerSet->getComposite(); - + S32 failures = layerset_buffer->mUploadFailCount; + layerset_buffer->mUploadFailCount = 0; + if (layerset_buffer->mUploadID.isNull()) { // The upload got canceled, we should be in the @@ -626,20 +649,28 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, { // This is the upload we're currently waiting for. layerset_buffer->mUploadID.setNull(); + const std::string name(baked_upload_data->mTexLayerSet->getBodyRegionName()); + const std::string resolution = baked_upload_data->mIsHighestRes ? " full res " : " low res "; if (result >= 0) { - layerset_buffer->mUploadPending = FALSE; + layerset_buffer->mUploadPending = FALSE; // Allows sending of AgentSetAppearance later LLVOAvatarDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->mTexLayerSet); // Update baked texture info with the new UUID U64 now = LLFrameTimer::getTotalTime(); // Record starting time - llinfos << "Baked texture upload took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl; + llinfos << "Baked" << resolution << "texture upload for " << name << " took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl; gAgentAvatarp->setNewBakedTexture(baked_te, uuid); } else { - // Avatar appearance is changing, ignore the upload results - llinfos << "Baked upload failed. Reason: " << result << llendl; - // *FIX: retry upload after n seconds, asset server could be busy + ++failures; + S32 max_attempts = baked_upload_data->mIsHighestRes ? BAKE_UPLOAD_ATTEMPTS : 1; // only retry final bakes + llwarns << "Baked" << resolution << "texture upload for " << name << " failed (attempt " << failures << "/" << max_attempts << ")" << llendl; + if (failures < max_attempts) + { + layerset_buffer->mUploadFailCount = failures; + layerset_buffer->mUploadRetryTimer.start(); + layerset_buffer->requestUpload(); + } } } else diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 2d710d2dce..85dadb213c 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -312,6 +312,8 @@ private: 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. + S32 mUploadFailCount; // Number of consecutive upload failures + LLFrameTimer mUploadRetryTimer; // Tracks time since last upload failure. //-------------------------------------------------------------------- // Updates @@ -363,12 +365,14 @@ struct LLBakedUploadData { LLBakedUploadData(const LLVOAvatarSelf* avatar, LLTexLayerSet* layerset, - const LLUUID& id); + const LLUUID& id, + bool highest_res); ~LLBakedUploadData() {} const LLUUID mID; const LLVOAvatarSelf* mAvatar; // note: backlink only; don't LLPointer LLTexLayerSet* mTexLayerSet; const U64 mStartTime; // for measuring baked texture upload time + const bool mIsHighestRes; // whether this is a "final" bake, or intermediate low res }; #endif // LL_LLTEXLAYER_H diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 44b3a85f25..e934c38c22 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4346,8 +4346,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data) LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec); - LL_DEBUGS("Windlight Sync") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity - << ", " << phase << LL_ENDL; + LL_DEBUGS("Windlight Sync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL; gSky.setSunPhase(phase); gSky.setSunTargetDirection(sun_direction, sun_ang_velocity); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 8bb38e3e46..1d07960937 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -645,6 +645,7 @@ void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**) { // send it to 'observers' // *TODO: switch the floaters to using LLRegionInfoModel + llinfos << "Processing region info" << llendl; LLRegionInfoModel::instance().update(msg); LLFloaterGodTools::processRegionInfo(msg); LLFloaterRegionInfo::processRegionInfo(msg); diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index 68b861fe92..b5d8ac44bc 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -1209,9 +1209,6 @@ Prøv venligst om lidt igen. <string name="InvFolder My Inventory"> Min beholdning </string> - <string name="InvFolder My Favorites"> - Mine favoritter - </string> <string name="InvFolder Library"> Bibliotek </string> @@ -1270,10 +1267,10 @@ Prøv venligst om lidt igen. Bevægelser </string> <string name="InvFolder Favorite"> - Favoritter + Mine favoritter </string> <string name="InvFolder favorite"> - Favoritter + Mine favoritter </string> <string name="InvFolder Current Outfit"> Nuværende sæt diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index d77b4a1e44..ed38267466 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1238,9 +1238,6 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden. <string name="InvFolder My Inventory"> Mein Inventar </string> - <string name="InvFolder My Favorites"> - Meine Favoriten - </string> <string name="InvFolder Library"> Bibliothek </string> @@ -1299,10 +1296,10 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden. Gesten </string> <string name="InvFolder Favorite"> - Favoriten + Meine Favoriten </string> <string name="InvFolder favorite"> - Favoriten + Meine Favoriten </string> <string name="InvFolder Current Outfit"> Aktuelles Outfit diff --git a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml index 0ac2c14253..0e858ccf10 100644 --- a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml @@ -20,4 +20,11 @@ function="Gear.OnEnable" parameter="take_off" /> </menu_item_call> + <menu_item_call + label="Copy outfit list to clipboard" + layout="topleft" + name="copy"> + <on_click + function="Gear.Copy" /> + </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 2e2ef6ee19..022c97f341 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2069,7 +2069,6 @@ Returns a string with the requested data about the region <!-- inventory folder --> <string name="InvFolder My Inventory">My Inventory</string> - <string name="InvFolder My Favorites">My Favorites</string> <string name="InvFolder Library">Library</string> <string name="InvFolder Textures">Textures</string> <string name="InvFolder Sounds">Sounds</string> @@ -2089,10 +2088,10 @@ Returns a string with the requested data about the region <string name="InvFolder Uncompressed Sounds">Uncompressed Sounds</string> <string name="InvFolder Animations">Animations</string> <string name="InvFolder Gestures">Gestures</string> - <string name="InvFolder Favorite">Favorites</string> + <string name="InvFolder Favorite">My Favorites</string> <!-- historically default name of the Favorites folder can start from either "f" or "F" letter. We should localize both of them with the same value --> - <string name="InvFolder favorite">Favorites</string> + <string name="InvFolder favorite">My Favorites</string> <string name="InvFolder Current Outfit">Current Outfit</string> <string name="InvFolder Initial Outfits">Initial Outfits</string> <string name="InvFolder My Outfits">My Outfits</string> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index b759eed738..72d7493a02 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -1211,9 +1211,6 @@ Intenta iniciar sesión de nuevo en unos instantes. <string name="InvFolder My Inventory"> Mi Inventario </string> - <string name="InvFolder My Favorites"> - Mis Favoritos - </string> <string name="InvFolder Library"> Biblioteca </string> @@ -1272,10 +1269,10 @@ Intenta iniciar sesión de nuevo en unos instantes. Gestos </string> <string name="InvFolder Favorite"> - Favoritos + Mis Favoritos </string> <string name="InvFolder favorite"> - Favoritos + Mis Favoritos </string> <string name="InvFolder Current Outfit"> Vestuario actual diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 3ec85551da..077e545851 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -1238,9 +1238,6 @@ Veuillez réessayer de vous connecter dans une minute. <string name="InvFolder My Inventory"> Mon inventaire </string> - <string name="InvFolder My Favorites"> - Mes Favoris - </string> <string name="InvFolder Library"> Bibliothèque </string> @@ -1299,10 +1296,10 @@ Veuillez réessayer de vous connecter dans une minute. Gestes </string> <string name="InvFolder Favorite"> - Favoris + Mes Favoris </string> <string name="InvFolder favorite"> - Favoris + Mes Favoris </string> <string name="InvFolder Current Outfit"> Tenue actuelle diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index cbe8ef24c4..6af515d82d 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -1217,9 +1217,6 @@ Prova ad accedere nuovamente tra un minuto. <string name="InvFolder My Inventory"> Il mio inventario </string> - <string name="InvFolder My Favorites"> - I miei preferiti - </string> <string name="InvFolder Library"> Libreria </string> @@ -1278,10 +1275,10 @@ Prova ad accedere nuovamente tra un minuto. Gesture </string> <string name="InvFolder Favorite"> - Preferiti + I miei preferiti </string> <string name="InvFolder favorite"> - Preferiti + I miei preferiti </string> <string name="InvFolder Current Outfit"> Abbigliamento attuale diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index ff22221aab..fa6d25d238 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -1238,9 +1238,6 @@ support@secondlife.com にお問い合わせください。 <string name="InvFolder My Inventory"> 持ち物 </string> - <string name="InvFolder My Favorites"> - お気に入り - </string> <string name="InvFolder Library"> ライブラリ </string> diff --git a/indra/newview/skins/default/xui/nl/strings.xml b/indra/newview/skins/default/xui/nl/strings.xml index a53c0769dc..e9db237e82 100644 --- a/indra/newview/skins/default/xui/nl/strings.xml +++ b/indra/newview/skins/default/xui/nl/strings.xml @@ -849,9 +849,6 @@ <string name="InvFolder My Inventory"> Mijn Inventaris </string> - <string name="InvFolder My Favorites"> - Mijn Favorieten - </string> <string name="InvFolder Library"> Bibliotheek </string> @@ -910,10 +907,10 @@ Gebaren </string> <string name="InvFolder Favorite"> - Favoriten + Mijn Favorieten </string> <string name="InvFolder favorite"> - Favoriten + Mijn Favorieten </string> <string name="InvFolder Current Outfit"> Huidige Uitrusting diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 6eceed46d3..e93da48dc0 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -1072,9 +1072,6 @@ <string name="InvFolder My Inventory"> Moja Szafa </string> - <string name="InvFolder My Favorites"> - Moje ulubione - </string> <string name="InvFolder Library"> Biblioteka </string> @@ -1133,10 +1130,10 @@ Gesturki </string> <string name="InvFolder Favorite"> - Ulubione + Moje ulubione </string> <string name="InvFolder favorite"> - Ulubione + Moje ulubione </string> <string name="InvFolder Current Outfit"> Obecny strój diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index c5268966c1..ed93217d59 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -1172,9 +1172,6 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar <string name="InvFolder My Inventory"> Meu inventário </string> - <string name="InvFolder My Favorites"> - Meus favoritos - </string> <string name="InvFolder Library"> Biblioteca </string> @@ -1233,10 +1230,10 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar Gestos </string> <string name="InvFolder Favorite"> - Favoritos + Meus favoritos </string> <string name="InvFolder favorite"> - Favoritos + Meus favoritos </string> <string name="InvFolder Current Outfit"> Look atual diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index 986ab82523..28b8cce5b2 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -1099,9 +1099,6 @@ <string name="InvFolder My Inventory"> 我的收納區 </string> - <string name="InvFolder My Favorites"> - My Favorites - </string> <string name="InvFolder Library"> Library </string> @@ -1160,10 +1157,10 @@ 姿勢 </string> <string name="InvFolder Favorite"> - Favorites + My Favorites </string> <string name="InvFolder favorite"> - Favorites + My Favorites </string> <string name="InvFolder Current Outfit"> 目前裝扮 |