diff options
Diffstat (limited to 'indra')
38 files changed, 414 insertions, 58 deletions
diff --git a/indra/develop.py b/indra/develop.py index 3c88bb8a01..36c947327a 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -742,9 +742,10 @@ Options: -p | --project=NAME set the root project name. (Doesn't effect makefiles) Commands: - build configure and build default target - clean delete all build directories, does not affect sources - configure configure project by running cmake (default command if none given) + build configure and build default target + clean delete all build directories, does not affect sources + configure configure project by running cmake (default if none given) + printbuilddirs print the build directory that will be used Command-options for "configure": We use cmake variables to change the build configuration. @@ -762,15 +763,6 @@ Examples: ''' def main(arguments): - if os.getenv('DISTCC_DIR') is None: - distcc_dir = os.path.join(getcwd(), '.distcc') - if not os.path.exists(distcc_dir): - os.mkdir(distcc_dir) - print "setting DISTCC_DIR to %s" % distcc_dir - os.environ['DISTCC_DIR'] = distcc_dir - else: - print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR') - setup = setup_platform[sys.platform]() try: opts, args = getopt.getopt( @@ -832,6 +824,14 @@ For example: develop.py configure -DSERVER:BOOL=OFF""" if cmd in ('cmake', 'configure'): setup.run_cmake(args) elif cmd == 'build': + if os.getenv('DISTCC_DIR') is None: + distcc_dir = os.path.join(getcwd(), '.distcc') + if not os.path.exists(distcc_dir): + os.mkdir(distcc_dir) + print "setting DISTCC_DIR to %s" % distcc_dir + os.environ['DISTCC_DIR'] = distcc_dir + else: + print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR') for d in setup.build_dirs(): if not os.path.exists(d): raise CommandError('run "develop.py cmake" first') @@ -842,6 +842,9 @@ For example: develop.py configure -DSERVER:BOOL=OFF""" if args: raise CommandError('clean takes no arguments') setup.cleanup() + elif cmd == 'printbuilddirs': + for d in setup.build_dirs(): + print >> sys.stdout, d else: print >> sys.stderr, 'Error: unknown subcommand', repr(cmd) print >> sys.stderr, "(run 'develop.py --help' for help)" diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 3a89b999bd..e26acd53a3 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -895,9 +895,7 @@ LLVector3 LLRender::getUITranslation() { if (mUIOffset.empty()) { - //llassert(!mUIOffset.empty()); - llwarns << "UI offset stack empty." << llendl; - return LLVector3(0,0,0); + return LLVector3::zero; } return mUIOffset.back(); } @@ -906,9 +904,7 @@ LLVector3 LLRender::getUIScale() { if (mUIScale.empty()) { - //llassert(!mUIScale.empty()); - llwarns << "UI scale stack empty." << llendl; - return LLVector3(1,1,1); + return LLVector3(1.f, 1.f, 1.f); } return mUIScale.back(); } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 07418d1b5e..9d911777d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8635,7 +8635,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>ShowBetaGrids</key> <map> diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 3ea7897501..49ae58d53a 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -29,6 +29,7 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog ;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the ;; application directory so we have to add a path to these include files) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +!include "%%SOURCE%%\installers\windows\lang_da.nsi" !include "%%SOURCE%%\installers\windows\lang_de.nsi" !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" !include "%%SOURCE%%\installers\windows\lang_es.nsi" @@ -37,18 +38,21 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog !include "%%SOURCE%%\installers\windows\lang_it.nsi" !include "%%SOURCE%%\installers\windows\lang_ko.nsi" !include "%%SOURCE%%\installers\windows\lang_nl.nsi" +!include "%%SOURCE%%\installers\windows\lang_pl.nsi" !include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" !include "%%SOURCE%%\installers\windows\lang_zh.nsi" # *TODO: Move these into the language files themselves +LangString LanguageCode ${LANG_DANISH} "da" LangString LanguageCode ${LANG_GERMAN} "de" -LangString LanguageCode ${LANG_ENGLISH} "en" +Langstring LanguageCode ${LANG_ENGLISH} "en" LangString LanguageCode ${LANG_SPANISH} "es" LangString LanguageCode ${LANG_FRENCH} "fr" LangString LanguageCode ${LANG_JAPANESE} "ja" LangString LanguageCode ${LANG_ITALIAN} "it" LangString LanguageCode ${LANG_KOREAN} "ko" LangString LanguageCode ${LANG_DUTCH} "nl" +LangString LanguageCode ${LANG_POLISH} "da" LangString LanguageCode ${LANG_PORTUGUESEBR} "pt" LangString LanguageCode ${LANG_SIMPCHINESE} "zh" diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi Binary files differnew file mode 100644 index 0000000000..0c832e8ba9 --- /dev/null +++ b/indra/newview/installers/windows/lang_da.nsi diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi Binary files differnew file mode 100644 index 0000000000..191bae4755 --- /dev/null +++ b/indra/newview/installers/windows/lang_pl.nsi diff --git a/indra/newview/installers/windows/language_menu.nsi b/indra/newview/installers/windows/language_menu.nsi Binary files differindex 988f452dea..fef8d40c69 100644 --- a/indra/newview/installers/windows/language_menu.nsi +++ b/indra/newview/installers/windows/language_menu.nsi diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 37cd289b1b..fe7e883d83 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -827,6 +827,11 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const return pos_agent_d + mAgentOriginGlobal; } +void LLAgent::sitDown() +{ + setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); +} + //----------------------------------------------------------------------------- // resetAxes() diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 0d95683a98..c643cef78f 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -345,6 +345,8 @@ private: //-------------------------------------------------------------------- public: void standUp(); + /// @brief ground-sit at agent's current position + void sitDown(); //-------------------------------------------------------------------- // Busy diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index f7ae320a6f..1edc96e165 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -115,6 +115,7 @@ void LLInitialWearablesFetch::processContents() LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; LLFindWearables is_wearable; + llassert_always(mComplete.size() != 0); gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, is_wearable); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 94286fd799..7159d89d21 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2307,12 +2307,17 @@ bool LLAppearanceMgr::updateBaseOutfit() void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type) { - items_by_type.reserve(LLWearableType::WT_COUNT); + items_by_type.resize(LLWearableType::WT_COUNT); if (items.empty()) return; for (S32 i=0; i<items.count(); i++) { LLViewerInventoryItem *item = items.get(i); + if (!item) + { + LL_WARNS("Appearance") << "NULL item found" << llendl; + continue; + } // Ignore non-wearables. if (!item->isWearableType()) continue; @@ -2335,6 +2340,7 @@ std::string build_order_string(LLWearableType::EType type, U32 i) struct WearablesOrderComparator { + LOG_CLASS(WearablesOrderComparator); WearablesOrderComparator(const LLWearableType::EType type) { mControlSize = build_order_string(type, 0).size(); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 78c2142ea5..c65d9dc9ee 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -42,6 +42,8 @@ class LLOutfitUnLockTimer; class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> { + LOG_CLASS(LLAppearanceMgr); + friend class LLSingleton<LLAppearanceMgr>; friend class LLOutfitUnLockTimer; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index defd882fe4..d22950cad3 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -827,6 +827,73 @@ LLVector2 LLFace::surfaceToTexture(LLVector2 surface_coord, LLVector3 position, return tc; } +// Returns scale compared to default texgen, and face orientation as calculated +// by planarProjection(). This is needed to match planar texgen parameters. +void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const +{ + const LLMatrix4& vol_mat = getWorldMatrix(); + const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); + LLVector3 normal = vf.mVertices[0].mNormal; + LLVector3 binormal = vf.mVertices[0].mBinormal; + LLVector2 projected_binormal; + planarProjection(projected_binormal, normal, vf.mCenter, binormal); + projected_binormal -= LLVector2(0.5f, 0.5f); // this normally happens in xform() + *scale = projected_binormal.length(); + // rotate binormal to match what planarProjection() thinks it is, + // then find rotation from that: + projected_binormal.normalize(); + F32 ang = acos(projected_binormal.mV[VY]); + ang = (projected_binormal.mV[VX] < 0.f) ? -ang : ang; + binormal.rotVec(ang, normal); + LLQuaternion local_rot( binormal % normal, binormal, normal ); + *face_rot = local_rot * vol_mat.quaternion(); + *face_pos = vol_mat.getTranslation(); +} + +// Returns the necessary texture transform to align this face's TE to align_to's TE +bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offset, + LLVector2* res_st_scale, F32* res_st_rot) const +{ + if (!align_to) + { + return false; + } + const LLTextureEntry *orig_tep = align_to->getTextureEntry(); + if ((orig_tep->getTexGen() != LLTextureEntry::TEX_GEN_PLANAR) || + (getTextureEntry()->getTexGen() != LLTextureEntry::TEX_GEN_PLANAR)) + { + return false; + } + + LLVector3 orig_pos, this_pos; + LLQuaternion orig_face_rot, this_face_rot; + F32 orig_proj_scale, this_proj_scale; + align_to->getPlanarProjectedParams(&orig_face_rot, &orig_pos, &orig_proj_scale); + getPlanarProjectedParams(&this_face_rot, &this_pos, &this_proj_scale); + + // The rotation of "this face's" texture: + LLQuaternion orig_st_rot = LLQuaternion(orig_tep->getRotation(), LLVector3::z_axis) * orig_face_rot; + LLQuaternion this_st_rot = orig_st_rot * ~this_face_rot; + F32 x_ang, y_ang, z_ang; + this_st_rot.getEulerAngles(&x_ang, &y_ang, &z_ang); + *res_st_rot = z_ang; + + // Offset and scale of "this face's" texture: + LLVector3 centers_dist = (this_pos - orig_pos) * ~orig_st_rot; + LLVector3 st_scale(orig_tep->mScaleS, orig_tep->mScaleT, 1.f); + st_scale *= orig_proj_scale; + centers_dist.scaleVec(st_scale); + LLVector2 orig_st_offset(orig_tep->mOffsetS, orig_tep->mOffsetT); + + *res_st_offset = orig_st_offset + (LLVector2)centers_dist; + res_st_offset->mV[VX] -= (S32)res_st_offset->mV[VX]; + res_st_offset->mV[VY] -= (S32)res_st_offset->mV[VY]; + + st_scale /= this_proj_scale; + *res_st_scale = (LLVector2)st_scale; + return true; +} + void LLFace::updateRebuildFlags() { if (!mDrawablep->isState(LLDrawable::REBUILD_VOLUME)) diff --git a/indra/newview/llface.h b/indra/newview/llface.h index d95057f3ef..0166e45bee 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -89,6 +89,9 @@ public: BOOL hasGeometry() const { return mGeomCount > 0; } LLVector3 getPositionAgent() const; LLVector2 surfaceToTexture(LLVector2 surface_coord, LLVector3 position, LLVector3 normal); + void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const; + bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset, + LLVector2* st_scale, F32* st_rot) const; U32 getState() const { return mState; } void setState(U32 state) { mState |= state; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b00a663a9a..129c9aec14 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3077,7 +3077,9 @@ public: std::string saved; if(offline == IM_OFFLINE) { - saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); + LLStringUtil::format_map_t args; + args["[LONG_TIMESTAMP]"] = formatted_time(timestamp); + saved = LLTrans::getString("Saved_message", args); } std::string buffer = saved + message; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 08229d3a50..53835f0166 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -501,7 +501,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, for(S32 i = 0; i < count; ++i) { item = item_array->get(i); - if (item->getActualType() == LLAssetType::AT_LINK_FOLDER) + if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER) { LLViewerInventoryCategory *linked_cat = item->getLinkedCategory(); if (linked_cat && linked_cat->getPreferredType() != LLFolderType::FT_OUTFIT) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 87257832b6..dd402de394 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -159,6 +159,11 @@ void LLLandmarkList::processGetAssetReply( } +BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid) +{ + return mLoadedCallbackMap.find(asset_uuid) != mLoadedCallbackMap.end(); +} + BOOL LLLandmarkList::assetExists(const LLUUID& asset_uuid) { return mList.count(asset_uuid) != 0 || mBadList.count(asset_uuid) != 0; diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index 6d32f0e75b..3356f866ce 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -59,6 +59,10 @@ public: S32 status, LLExtStat ext_status ); + // Returns TRUE if loading the landmark with given asset_uuid has been requested + // but is not complete yet. + BOOL isAssetInLoadedCallbackMap(const LLUUID& asset_uuid); + protected: void onRegionHandle(const LLUUID& landmark_id); void makeCallbacks(const LLUUID& landmark_id); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 572e7a6212..bce496cbad 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -42,6 +42,7 @@ #include "llcolorswatch.h" #include "llcombobox.h" #include "lldrawpoolbump.h" +#include "llface.h" #include "lllineeditor.h" #include "llmediaentry.h" #include "llresmgr.h" @@ -75,6 +76,7 @@ BOOL LLPanelFace::postBuild() childSetCommitCallback("checkbox flip t",&LLPanelFace::onCommitTextureInfo, this); childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureInfo, this); childSetAction("button apply",&LLPanelFace::onClickApply,this); + childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this); childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this); childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this); childSetAction("button align",&LLPanelFace::onClickAutoFix,this); @@ -359,6 +361,93 @@ private: LLPanelFace* mPanel; }; +// Functor that aligns a face to mCenterFace +struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor +{ + LLPanelFaceSetAlignedTEFunctor(LLPanelFace* panel, LLFace* center_face) : + mPanel(panel), + mCenterFace(center_face) {} + + virtual bool apply(LLViewerObject* object, S32 te) + { + LLFace* facep = object->mDrawable->getFace(te); + if (!facep) + { + return true; + } + + bool set_aligned = true; + if (facep == mCenterFace) + { + set_aligned = false; + } + if (set_aligned) + { + LLVector2 uv_offset, uv_scale; + F32 uv_rot; + set_aligned = facep->calcAlignedPlanarTE(mCenterFace, &uv_offset, &uv_scale, &uv_rot); + if (set_aligned) + { + object->setTEOffset(te, uv_offset.mV[VX], uv_offset.mV[VY]); + object->setTEScale(te, uv_scale.mV[VX], uv_scale.mV[VY]); + object->setTERotation(te, uv_rot); + } + } + if (!set_aligned) + { + LLPanelFaceSetTEFunctor setfunc(mPanel); + setfunc.apply(object, te); + } + return true; + } +private: + LLPanelFace* mPanel; + LLFace* mCenterFace; +}; + +// Functor that tests if a face is aligned to mCenterFace +struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor +{ + LLPanelFaceGetIsAlignedTEFunctor(LLFace* center_face) : + mCenterFace(center_face) {} + + virtual bool apply(LLViewerObject* object, S32 te) + { + LLFace* facep = object->mDrawable->getFace(te); + if (!facep) + { + return false; + } + if (facep == mCenterFace) + { + return true; + } + + LLVector2 aligned_st_offset, aligned_st_scale; + F32 aligned_st_rot; + if ( facep->calcAlignedPlanarTE(mCenterFace, &aligned_st_offset, &aligned_st_scale, &aligned_st_rot) ) + { + const LLTextureEntry* tep = facep->getTextureEntry(); + LLVector2 st_offset, st_scale; + tep->getOffset(&st_offset.mV[VX], &st_offset.mV[VY]); + tep->getScale(&st_scale.mV[VX], &st_scale.mV[VY]); + F32 st_rot = tep->getRotation(); + // needs a fuzzy comparison, because of fp errors + if (is_approx_equal_fraction(st_offset.mV[VX], aligned_st_offset.mV[VX], 12) && + is_approx_equal_fraction(st_offset.mV[VY], aligned_st_offset.mV[VY], 12) && + is_approx_equal_fraction(st_scale.mV[VX], aligned_st_scale.mV[VX], 12) && + is_approx_equal_fraction(st_scale.mV[VY], aligned_st_scale.mV[VY], 12) && + is_approx_equal_fraction(st_rot, aligned_st_rot, 14)) + { + return true; + } + } + return false; + } +private: + LLFace* mCenterFace; +}; + struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor { virtual bool apply(LLViewerObject* object) @@ -370,8 +459,26 @@ struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor void LLPanelFace::sendTextureInfo() { - LLPanelFaceSetTEFunctor setfunc(this); - LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + if ((bool)childGetValue("checkbox planar align").asBoolean()) + { + struct f1 : public LLSelectedTEGetFunctor<LLFace *> + { + LLFace* get(LLViewerObject* object, S32 te) + { + return (object->mDrawable) ? object->mDrawable->getFace(te): NULL; + } + } get_last_face_func; + LLFace* last_face; + LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_last_face_func, last_face); + + LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } + else + { + LLPanelFaceSetTEFunctor setfunc(this); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } LLPanelFaceSendFunctor sendfunc; LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); @@ -497,6 +604,44 @@ void LLPanelFace::getState() } } + + // planar align + bool align_planar = false; + bool identical_planar_aligned = false; + bool is_planar = false; + { + LLCheckBoxCtrl* cb_planar_align = getChild<LLCheckBoxCtrl>("checkbox planar align"); + align_planar = (cb_planar_align && cb_planar_align->get()); + struct f1 : public LLSelectedTEGetFunctor<bool> + { + bool get(LLViewerObject* object, S32 face) + { + return (object->getTE(face)->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR); + } + } func; + + bool texgens_identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, is_planar ); + bool enabled = (editable && texgens_identical && is_planar); + childSetValue("checkbox planar align", align_planar && enabled); + childSetEnabled("checkbox planar align", enabled); + + if (align_planar && enabled) + { + struct f2 : public LLSelectedTEGetFunctor<LLFace *> + { + LLFace* get(LLViewerObject* object, S32 te) + { + return (object->mDrawable) ? object->mDrawable->getFace(te): NULL; + } + } get_te_face_func; + LLFace* last_face; + LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_te_face_func, last_face); + LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face); + // this will determine if the texture param controls are tentative: + identical_planar_aligned = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&get_is_aligend_func); + } + } + // Texture scale { F32 scale_s = 1.f; @@ -508,6 +653,7 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_s ); + identical = align_planar ? identical_planar_aligned : identical; getChild<LLUICtrl>("TexScaleU")->setValue(editable ? llabs(scale_s) : 0); getChild<LLUICtrl>("TexScaleU")->setTentative(LLSD((BOOL)(!identical))); getChildView("TexScaleU")->setEnabled(editable); @@ -526,6 +672,7 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_t ); + identical = align_planar ? identical_planar_aligned : identical; getChild<LLUICtrl>("TexScaleV")->setValue(llabs(editable ? llabs(scale_t) : 0)); getChild<LLUICtrl>("TexScaleV")->setTentative(LLSD((BOOL)(!identical))); @@ -547,6 +694,7 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_s ); + identical = align_planar ? identical_planar_aligned : identical; getChild<LLUICtrl>("TexOffsetU")->setValue(editable ? offset_s : 0); getChild<LLUICtrl>("TexOffsetU")->setTentative(!identical); getChildView("TexOffsetU")->setEnabled(editable); @@ -562,6 +710,7 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_t ); + identical = align_planar ? identical_planar_aligned : identical; getChild<LLUICtrl>("TexOffsetV")->setValue(editable ? offset_t : 0); getChild<LLUICtrl>("TexOffsetV")->setTentative(!identical); getChildView("TexOffsetV")->setEnabled(editable); @@ -578,6 +727,7 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, rotation ); + identical = align_planar ? identical_planar_aligned : identical; getChild<LLUICtrl>("TexRot")->setValue(editable ? rotation * RAD_TO_DEG : 0); getChild<LLUICtrl>("TexRot")->setTentative(!identical); getChildView("TexRot")->setEnabled(editable); @@ -993,3 +1143,11 @@ void LLPanelFace::setMediaType(const std::string& mime_type) { } +// static +void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata) +{ + LLPanelFace* self = (LLPanelFace*) userdata; + self->getState(); + self->sendTextureInfo(); +} + diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 94c354cf02..42be9b257f 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -85,6 +85,7 @@ protected: static void onCommitShiny( LLUICtrl* ctrl, void* userdata); static void onCommitFullbright( LLUICtrl* ctrl, void* userdata); static void onCommitGlow( LLUICtrl* ctrl, void *userdata); + static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata); static void onClickApply(void*); static void onClickAutoFix(void*); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 43814ac652..ff15e3f08e 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -974,7 +974,28 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const ) { // disable some commands for multi-selection. EXT-1757 - return root_folder_view && root_folder_view->getSelectedCount() == 1; + bool is_single_selection = root_folder_view && root_folder_view->getSelectedCount() == 1; + if (!is_single_selection) + { + return false; + } + + if ("show_on_map" == command_name) + { + LLFolderViewItem* cur_item = root_folder_view->getCurSelectedItem(); + if (!cur_item) return false; + + LLViewerInventoryItem* inv_item = cur_item->getInventoryItem(); + if (!inv_item) return false; + + LLUUID asset_uuid = inv_item->getAssetUUID(); + if (asset_uuid.isNull()) return false; + + // Disable "Show on Map" if landmark loading is in progress. + return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid); + } + + return true; } else if ("rename" == command_name) { @@ -1099,7 +1120,8 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co if ("cut" == command_name) { - can_be_modified = root_folder->canCut(); + // "Cut" disabled for folders. See EXT-8697. + can_be_modified = root_folder->canCut() && listenerp->getInventoryType() != LLInventoryType::IT_CATEGORY; } else if ("rename" == command_name) { @@ -1188,6 +1210,7 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark) } mShowOnMapBtn->setEnabled(TRUE); + mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE); } void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark, diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 0308f5e632..4cf1df1655 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -44,7 +44,6 @@ const char* LLSLURL::SLURL_COM = "slurl.com"; // version is required also. const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; -const char* LLSLURL::SECONDLIFE_COM = "secondlife.com"; const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info"; const char* LLSLURL::SLURL_APP_PATH = "app"; @@ -183,15 +182,6 @@ LLSLURL::LLSLURL(const std::string& slurl) (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)) { - // *HACK: ignore http://secondlife.com/ URLs so that we can use - // http://secondlife.com/app/ redirect URLs - // This is only necessary while the server returns Release Note - // urls using this format rather that pointing to the wiki - if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME || - slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) && - slurl_uri.hostName() == LLSLURL::SECONDLIFE_COM) - return; - // We're dealing with either a Standalone style slurl or slurl.com slurl if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) || (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || @@ -202,6 +192,17 @@ LLSLURL::LLSLURL(const std::string& slurl) } else { + // Don't try to match any old http://<host>/ URL as a SLurl. + // SLE SLurls will have the grid hostname in the URL, so only + // match http URLs if the hostname matches the grid hostname + // (or its a slurl.com or maps.secondlife.com URL). + if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME || + slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) && + slurl_uri.hostName() != LLGridManager::getInstance()->getGrid()) + { + return; + } + // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open style // urls are properly formed, unlike the stinky maingrid style mGrid = slurl_uri.hostName(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c275068028..daeace0ec5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3383,8 +3383,21 @@ class LLSelfStandUp : public view_listener_t bool enable_standup_self() { - bool new_value = isAgentAvatarValid() && gAgentAvatarp->isSitting(); - return new_value; + return isAgentAvatarValid() && gAgentAvatarp->isSitting(); +} + +class LLSelfSitDown : public view_listener_t + { + bool handleEvent(const LLSD& userdata) + { + gAgent.sitDown(); + return true; + } + }; + +bool enable_sitdown_self() +{ + return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } // Used from the login screen to aid in UI work on side tray @@ -8100,11 +8113,13 @@ void initialize_menus() // Admin top level view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState"); - // Self pie menu + // Self context menu view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp"); + enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self)); + view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown"); + enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self)); view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); - enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self)); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); // we don't use boost::bind directly to delay side tray construction diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 92c61ddefe..82bc084f68 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2183,7 +2183,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) std::string saved; if(offline == IM_OFFLINE) { - saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); + LLStringUtil::format_map_t args; + args["[LONG_TIMESTAMP]"] = formatted_time(timestamp); + saved = LLTrans::getString("Saved_message", args); } buffer = saved + message; diff --git a/indra/newview/skins/default/xui/de/panel_login.xml b/indra/newview/skins/default/xui/de/panel_login.xml index 0f02de866b..b373be4382 100644 --- a/indra/newview/skins/default/xui/de/panel_login.xml +++ b/indra/newview/skins/default/xui/de/panel_login.xml @@ -20,7 +20,7 @@ <text name="start_location_text"> Hier anfangen: </text> - <combo_box name="start_location_combo" width="150"> + <combo_box name="start_location_combo"> <combo_box.item label="Mein letzter Standort" name="MyLastLocation"/> <combo_box.item label="Mein Zuhause" name="MyHome"/> <combo_box.item label="<Region eingeben>" name="Typeregionname"/> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 514b0a501b..1d58e7a540 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2408,7 +2408,7 @@ even though the user gets a free copy. name="label shininess" left_pad="4" text_readonly_color="LabelDisabledColor" - top_pad="-36" + top_pad="-37" width="90"> Shininess </text> @@ -2445,7 +2445,7 @@ even though the user gets a free copy. left_pad="4" name="label bumpiness" text_readonly_color="LabelDisabledColor" - top_pad="-36" + top_pad="-37" width="90"> Bumpiness </text> @@ -2563,6 +2563,17 @@ even though the user gets a free copy. top_delta="-4" width="120" /> --> + <check_box + follows="top|left" + height="16" + initial_value="false" + label="Align planar faces" + layout="topleft" + left="17" + name="checkbox planar align" + tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping." + top_delta="26" + width="140" /> <text type="string" length="1" @@ -2572,8 +2583,8 @@ even though the user gets a free copy. left="10" name="rpt" text_readonly_color="LabelDisabledColor" - top_pad="4" - width="200"> + top_pad="2" + width="140"> Repeats / Face </text> <spinner @@ -2586,7 +2597,7 @@ even though the user gets a free copy. left="20" max_val="100" name="TexScaleU" - top_pad="6" + top_pad="5" width="185" /> <check_box height="19" @@ -2696,7 +2707,7 @@ even though the user gets a free copy. bg_alpha_color="DkGray" name="Add_Media" left="0" - height="63" + height="47" width="290"> <text type="string" @@ -2782,8 +2793,9 @@ even though the user gets a free copy. label="Align" label_selected="Align Media" layout="topleft" - right="-10" + right="-16" name="button align" + top_delta="-4" tool_tip="Align media texture (must load first)" width="80" /> </panel> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index e2348375d5..84e81397be 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -23,7 +23,7 @@ <menu_item_call.on_enable function="Self.EnableStandUp" /> </menu_item_call--> - <menu_item_call + <menu_item_call enabled="false" label="Edit" layout="topleft" @@ -46,6 +46,17 @@ <menu_item_separator layout="topleft" /> + <menu_item_call + label="Sit Down" + layout="topleft" + name="Sit Down Here"> + <menu_item_call.on_click + function="Self.SitDown" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableSitDown" /> + </menu_item_call> + <menu_item_call label="Stand Up" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index d5b993152a..9059745f46 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -2,7 +2,17 @@ <context_menu layout="topleft" name="Self Pie"> - <menu_item_call + <menu_item_call + label="Sit Down" + layout="topleft" + name="Sit Down Here"> + <menu_item_call.on_click + function="Self.SitDown" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableSitDown" /> + </menu_item_call> + <menu_item_call label="Stand Up" layout="topleft" name="Stand Up"> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index ea18e02ca1..30c2cde552 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -6,6 +6,16 @@ visible="false" name="Gear Menu"> <menu_item_call + label="Sit Down" + enabled="true" + name="sit_down_here"> + <menu_item_call.on_click + function="Self.SitDown" + parameter="" /> + <menu_item_call.on_visible + function="Self.EnableSitDown" /> + </menu_item_call> + <menu_item_call label="Stand Up" enabled="true" name="stand_up"> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 9fac296e26..751dc0bf3e 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -64,6 +64,7 @@ parameter="UseDebugMenus" /> </menu_item_check> <menu + create_jump_keys="true" visible="false" create_jump_keys="true" label="Debug" @@ -102,6 +103,7 @@ </menu_item_call> --> <menu + create_jump_keys="true" label="UI Tests" name="UI Tests" tear_off="true"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0b85074eb6..c79a484ef6 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -4,6 +4,7 @@ follows="left|top|right" name="Main Menu"> <menu + create_jump_keys="true" label="Me" name="Me" tear_off="true"> @@ -94,6 +95,7 @@ parameter="voice_effect" /> </menu_item_check> <menu + create_jump_keys="true" label="My Status" name="Status" tear_off="true"> @@ -138,6 +140,7 @@ </menu_item_call> </menu> <menu + create_jump_keys="true" label="Communicate" name="Communicate" tear_off="true"> @@ -188,6 +191,7 @@ </menu_item_call> </menu> <menu + create_jump_keys="true" label="World" name="World" tear_off="true"> @@ -901,6 +905,7 @@ </menu> </menu> <menu + create_jump_keys="true" label="Help" name="Help" tear_off="true"> @@ -947,6 +952,7 @@ </menu_item_call> </menu> <menu + create_jump_keys="true" label="Advanced" name="Advanced" tear_off="true" @@ -1451,6 +1457,7 @@ <menu_item_separator/> <menu + create_jump_keys="true" label="Shortcuts" name="Shortcuts" tear_off="true" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 0499873fb0..6b136495d2 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -130,7 +130,7 @@ control_name="LoginLocation" max_chars="128" top_pad="0" name="start_location_combo" - width="135"> + width="170"> <combo_box.item label="My last location" name="MyLastLocation" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index cf174da2f0..e6714af943 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -295,7 +295,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap auto_resize="true" default_tab_group="3" height="450" - min_height="53" + min_height="73" name="add_wearables_panel" width="313" tab_group="2" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 676bef2d0b..cf040b10c7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3005,6 +3005,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_default_text_label">Click here to instant message.</string> <string name="IM_to_label">To</string> <string name="IM_moderator_label">(Moderator)</string> + <string name="Saved_message">(Saved [LONG_TIMESTAMP])</string> <!-- voice calls --> <string name="answered_call">Your call has been answered</string> diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml index 1b3e1c1c90..b3ab2f4f90 100644 --- a/indra/newview/skins/default/xui/fr/panel_login.xml +++ b/indra/newview/skins/default/xui/fr/panel_login.xml @@ -20,7 +20,7 @@ <text name="start_location_text"> Lieu de départ : </text> - <combo_box name="start_location_combo" width="152"> + <combo_box name="start_location_combo"> <combo_box.item label="Dernier emplacement" name="MyLastLocation"/> <combo_box.item label="Domicile" name="MyHome"/> <combo_box.item label="<Saisir le nom de la région>" name="Typeregionname"/> diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml index 47d7a88b4c..808f19a16d 100644 --- a/indra/newview/skins/default/xui/ja/panel_login.xml +++ b/indra/newview/skins/default/xui/ja/panel_login.xml @@ -20,7 +20,7 @@ <text name="start_location_text"> 開始地点: </text> - <combo_box name="start_location_combo" width="160"> + <combo_box name="start_location_combo"> <combo_box.item label="最後にログアウトした場所" name="MyLastLocation"/> <combo_box.item label="ホーム" name="MyHome"/> <combo_box.item label="<地域名を入力>" name="Typeregionname"/> diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index b5adb217fd..40425a5caf 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -150,6 +150,7 @@ namespace tut ensure_equals(" slurl, region + coords", slurl.getSLURLString(), "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + LLGridManager::getInstance()->setGridChoice("my.grid.com"); slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); ensure_equals("grid slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("grid slurl, region + coords", slurl.getSLURLString(), @@ -206,6 +207,7 @@ namespace tut ensure_equals("region" , "myregion", slurl.getRegion()); ensure_equals("grid4", "util.aditi.lindenlab.com", slurl.getGrid()); + LLGridManager::getInstance()->setGridChoice("my.grid.com"); slurl = LLSLURL("https://my.grid.com/app/foo/bar?12345"); ensure_equals("app", slurl.getType(), LLSLURL::APP); ensure_equals("appcmd", slurl.getAppCmd(), "foo"); @@ -246,6 +248,7 @@ namespace tut template<> template<> void slurlTestObject::test<3>() { + LLGridManager::getInstance()->setGridChoice("my.grid.com"); LLSLURL slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); ensure_equals("login string", slurl.getLoginString(), "uri:my region&1&2&3"); ensure_equals("location string", slurl.getLocationString(), "my region/1/2/3"); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index e963bcc9f7..08ba8c13b1 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -930,10 +930,10 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname try: - self.path("libkdu_v42R.so", "libkdu.so") + self.path("libkdu.so") pass except: - print "Skipping libkdu_v42R.so - not found" + print "Skipping libkdu.so - not found" pass try: self.path("libfmod-3.75.so") |