From b0d773bc181a4b885d0732ee2393b4473f90689e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 21 Jul 2014 10:53:01 +0300 Subject: MAINT-4254 FIXED Don't change selection in Inventory panel when image's uuid is null. --- indra/newview/lltexturectrl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c12753acb0..b9eb68556d 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -240,7 +240,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? mImageAssetID = image_id; LLUUID item_id = findItemID(mImageAssetID, FALSE); - if (item_id.isNull()) + if (image_id.isNull()) { mInventoryPanel->getRootFolder()->clearSelection(); } @@ -461,7 +461,10 @@ BOOL LLFloaterTexturePicker::postBuild() // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input - mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO); + if(!mImageAssetID.isNull()) + { + mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO); + } } mModeSelector = getChild("mode_selection"); -- cgit v1.2.3 From 673afb955b6f22244e7af100bcfbece6a688aef3 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 22 Jul 2014 11:36:27 +0300 Subject: MAINT-4253 FIXED Don't call setSelection() twice. --- indra/newview/lltexturectrl.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index b9eb68556d..a426669b5e 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -118,7 +118,7 @@ public: /*virtual*/ void onClose(bool app_settings); // New functions - void setImageID( const LLUUID& image_asset_id); + void setImageID( const LLUUID& image_asset_id, bool set_selection = true); void updateImageStats(); const LLUUID& getAssetID() { return mImageAssetID; } const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only); @@ -232,7 +232,7 @@ LLFloaterTexturePicker::~LLFloaterTexturePicker() { } -void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) +void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selection /*=true*/) { if( mImageAssetID != image_id && mActive) { @@ -240,7 +240,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? mImageAssetID = image_id; LLUUID item_id = findItemID(mImageAssetID, FALSE); - if (image_id.isNull()) + if (item_id.isNull()) { mInventoryPanel->getRootFolder()->clearSelection(); } @@ -253,6 +253,10 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) getChild("apply_immediate_check")->setValue(FALSE); mNoCopyTextureSelected = TRUE; } + } + + if (set_selection) + { mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO); } } @@ -823,7 +827,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::dequegetAssetUUID()); + setImageID(itemp->getAssetUUID(),false); mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? if (user_action && mCanPreview) { -- cgit v1.2.3 From 1874170f4f2bc826a6ea03473ab52c0952a7247d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 22 Jul 2014 15:43:18 +0300 Subject: MAINT-4255 FIXED In the Edit menu when opening the texture picker for normal map selection and clicking Cancel the already applied texture is changed to None even with or without any prior change or if the prior applied texture was full perms. --- indra/newview/llpanelface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e3be1312e4..02e05d3d9a 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1848,6 +1848,8 @@ void LLPanelFace::onCancelNormalTexture(const LLSD& data) U8 bumpy = 0; bool identical_bumpy = false; LLSelectedTE::getBumpmap(bumpy, identical_bumpy); + LLUUID spec_map_id = getChild("bumpytexture control")->getImageAssetID(); + bumpy = spec_map_id.isNull() ? bumpy : BUMPY_TEXTURE; sendBump(bumpy); } -- cgit v1.2.3 From 01ad2bcd04a4d35b38e2d23487f20fee9ba9975d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 23 Jul 2014 11:34:55 +0300 Subject: MAINT-4238 FIXED Accept new types of tokens/delimiters as well as TT_WORD --- indra/newview/llpreviewscript.cpp | 26 +++++++++++++++++++++++--- indra/newview/llpreviewscript.h | 1 + 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 8eea5ea73e..a41986373e 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -663,12 +663,13 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) LLTextSegmentPtr segment = NULL; std::vector selected_segments; mEditor->getSelectedSegments(selected_segments); - + LLKeywordToken* token; // try segments in selection range first std::vector::iterator segment_iter; for (segment_iter = selected_segments.begin(); segment_iter != selected_segments.end(); ++segment_iter) { - if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::TT_WORD) + token = (*segment_iter)->getToken(); + if(token && isKeyword(token)) { segment = *segment_iter; break; @@ -679,7 +680,8 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) if (!segment) { const LLTextSegmentPtr test_segment = mEditor->getPreviousSegment(); - if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::TT_WORD) + token = test_segment->getToken(); + if(token && isKeyword(token)) { segment = test_segment; } @@ -708,6 +710,24 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) } } +bool LLScriptEdCore::isKeyword(LLKeywordToken* token) +{ + switch(token->getType()) + { + case LLKeywordToken::TT_CONSTANT: + case LLKeywordToken::TT_CONTROL: + case LLKeywordToken::TT_EVENT: + case LLKeywordToken::TT_FUNCTION: + case LLKeywordToken::TT_SECTION: + case LLKeywordToken::TT_TYPE: + case LLKeywordToken::TT_WORD: + return true; + + default: + return false; + } +} + void LLScriptEdCore::setHelpPage(const std::string& help_string) { LLFloater* help_floater = mLiveHelpHandle.get(); diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 515f277c4a..66727bceee 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -133,6 +133,7 @@ protected: void deleteBridges(); void setHelpPage(const std::string& help_string); void updateDynamicHelp(BOOL immediate = FALSE); + bool isKeyword(LLKeywordToken* token); void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); -- cgit v1.2.3 From 7ef544a07f6f23c553e94b10931dc14e2a0f26b2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 23 Jul 2014 17:49:43 +0300 Subject: MAINT-1849 FIXED Disable 'Rename' menu item when multiple items are selected. --- indra/newview/llpanelobjectinventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6b74d90708..6354b5a02b 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -698,6 +698,10 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if(isItemRenameable()) { items.push_back(std::string("Task Rename")); + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Task Rename")); + } } if(isItemRemovable()) { -- cgit v1.2.3 From c4433e4fc8b35b3403503a9e5062e169c35258f5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 9 Jul 2014 18:02:01 +0300 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render when ALM is enabled --- indra/newview/lldrawpool.cpp | 2 +- indra/newview/lldrawpool.h | 2 +- indra/newview/lldrawpoolmaterials.cpp | 2 +- indra/newview/llspatialpartition.cpp | 2 +- indra/newview/llvovolume.cpp | 17 ++++++++++++++--- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 5b151bdcda..f74164aea6 100755 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -443,7 +443,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_ } } -void LLRenderPass::applyModelMatrix(LLDrawInfo& params) +void LLRenderPass::applyModelMatrix(const LLDrawInfo& params) { if (params.mModelMatrix != gGLLastMatrix) { diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 3bde0d29be..bc299cc89f 100755 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -168,7 +168,7 @@ public: BOOL isDead() { return FALSE; } void resetDrawOrders() { } - static void applyModelMatrix(LLDrawInfo& params); + static void applyModelMatrix(const LLDrawInfo& params); virtual void pushBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE); virtual void pushMaskBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE); virtual void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures = FALSE); diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 514411aef5..f92320490a 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -96,7 +96,7 @@ void LLDrawPoolMaterials::endDeferredPass(S32 pass) void LLDrawPoolMaterials::renderDeferred(S32 pass) { - U32 type_list[] = + static const U32 type_list[] = { LLRenderPass::PASS_MATERIAL, //LLRenderPass::PASS_MATERIAL_ALPHA, diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 0a8257f42b..5e342099d7 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1632,7 +1632,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask) { LLDrawInfo* params = NULL; - LLColor4 colors[] = { + static const LLColor4 colors[] = { LLColor4::green, LLColor4::green1, LLColor4::green2, diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a83e2e020e..c25722b635 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2040,7 +2040,18 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { - S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + S32 res = 0; + + if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) + { + LLViewerObject::setTEMaterialID(te, LLMaterialID::null); + res = LLViewerObject::setTEMaterialParams(te, nullptr); + } + else + { + res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + } + LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast(this), te) ? " selected" : " not selected" ) << LL_ENDL; @@ -4328,7 +4339,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_info->mBump = bump; draw_info->mShiny = shiny; - float alpha[4] = + static const float alpha[4] = { 0.00f, 0.25f, @@ -5652,7 +5663,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac if (material_pass) { - U32 pass[] = + static const U32 pass[] = { LLRenderPass::PASS_MATERIAL, LLRenderPass::PASS_ALPHA, //LLRenderPass::PASS_MATERIAL_ALPHA, -- cgit v1.2.3 From f40dd76521c9ddab1fcd3ddca029802cf3bdd99b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 24 Jul 2014 00:38:18 +0300 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render when ALM is enabled : replace nullptr to NULL (please use modern compilers) --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c25722b635..4295ea02d5 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2045,7 +2045,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) { LLViewerObject::setTEMaterialID(te, LLMaterialID::null); - res = LLViewerObject::setTEMaterialParams(te, nullptr); + res = LLViewerObject::setTEMaterialParams(te, NULL); } else { -- cgit v1.2.3 From 906e2024580cd824e10e8c6799f13453fb2acd89 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 Jul 2014 17:27:38 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to COF folder is also limited now. --- indra/newview/llinventorybridge.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 13236ea7d9..33e557cddd 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2279,6 +2279,29 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } + U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit"); + if (is_movable + && move_is_into_current_outfit + && descendent_items.size() > max_items_to_wear) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + + if (items.size() > max_items_to_wear) + { + // Can't move 'large' folders into current outfit: MAINT-4086 + is_movable = FALSE; + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items_to_wear); + tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); + } + } if (is_movable && move_is_into_trash) { for (S32 i=0; i < descendent_items.size(); ++i) -- cgit v1.2.3 From 7d8b90ce98e0b88cf8cfb5c6f6d4e0ce31eaaf64 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Jul 2014 17:55:06 +0300 Subject: MAINT-4289 FIXED [BEAR] Recent Items "Reset Filters" not working correctly --- indra/llui/llfolderviewitem.cpp | 36 ++++++++++++++++++---------- indra/llui/llfolderviewitem.h | 1 + indra/newview/llfolderviewmodelinventory.cpp | 4 +--- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 9a14d0e419..e3ec333e21 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -256,6 +256,24 @@ BOOL LLFolderViewItem::passedFilter(S32 filter_generation) return getViewModelItem()->passedFilter(filter_generation); } +BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation) +{ + // Item should be visible if: + // 1. item passed current filter + // 2. item was updated (gen < 0) but has descendants that passed filter + // 3. item was recently updated and was visible before update + + LLFolderViewModelItem* model = getViewModelItem(); + if (model->getLastFilterGeneration() < 0) + { + return model->descendantsPassedFilter(filter_generation) || getVisible(); + } + else + { + return model->passedFilter(filter_generation); + } +} + void LLFolderViewItem::refresh() { LLFolderViewModelItem& vmi = *getViewModelItem(); @@ -970,9 +988,8 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) LL_RECORD_BLOCK_TIME(FTM_ARRANGE); // evaluate mHasVisibleChildren - bool default_filter = getRoot()->getFolderViewModel()->getFilter().isDefault(); - mHasVisibleChildren = default_filter && (mItems.size() || mFolders.size()); - if (!default_filter && getViewModelItem()->descendantsPassedFilter()) + mHasVisibleChildren = false; + if (getViewModelItem()->descendantsPassedFilter()) { // We have to verify that there's at least one child that's not filtered out bool found = false; @@ -980,7 +997,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) for (items_t::iterator iit = mItems.begin(); iit != mItems.end(); ++iit) { LLFolderViewItem* itemp = (*iit); - found = itemp->passedFilter(); + found = itemp->isPotentiallyVisible(); if (found) break; } @@ -990,7 +1007,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) for (folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) { LLFolderViewFolder* folderp = (*fit); - found = folderp->passedFilter(); + found = folderp->isPotentiallyVisible(); if (found) break; } @@ -1023,12 +1040,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) { LLFolderViewFolder* folderp = (*fit); - - // passedFilter() will show everything that passed filter or has descendants that passed filter - // also it will hide all filter-pending folders (they will be shown later if needed). - // but since refreshed folders are 'pending', they can be rendered invisible by passedFilter() - // even if we are not using filter at the moment, default_filter is used to prevent it - folderp->setVisible(default_filter || folderp->passedFilter()); + folderp->setVisible(folderp->isPotentiallyVisible()); if (folderp->getVisible()) { @@ -1047,7 +1059,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) iit != mItems.end(); ++iit) { LLFolderViewItem* itemp = (*iit); - itemp->setVisible(default_filter || itemp->passedFilter()); + itemp->setVisible(itemp->isPotentiallyVisible()); if (itemp->getVisible()) { diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index a9b0201236..0cd20a0f2d 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -254,6 +254,7 @@ public: S32 getIndentation() { return mIndentation; } virtual BOOL passedFilter(S32 filter_generation = -1); + virtual BOOL isPotentiallyVisible(S32 filter_generation = -1); // refresh information from the object being viewed. virtual void refresh(); diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 11d49ff784..7615c12043 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -129,15 +129,13 @@ void LLFolderViewModelItemInventory::requestSort() void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) { - bool init_state = getLastFilterGeneration() < 0; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || (init_state && before && !mFolderViewItem->getVisible())) + if (before != mPrevPassedAllFilters) { // Need to rearrange the folder if the filtered state of the item changed - // or folder was hidden during update as filter-dirty (MAINT-4218) LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); if (parent_folder) { -- cgit v1.2.3 From b18e4f7a51203a6d2bb1be85a2d5efc5bc04731e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 30 Jul 2014 18:33:49 +0300 Subject: MAINT-4218 Adding clothing from inventory closes THAT clothing folder and hides THAT folder fixed issue with 'yet to be started filter' and 'dirty-visible' item. --- indra/llui/llfolderviewitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index e3ec333e21..d251544ee5 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -264,7 +264,7 @@ BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation) // 3. item was recently updated and was visible before update LLFolderViewModelItem* model = getViewModelItem(); - if (model->getLastFilterGeneration() < 0) + if (model->getLastFilterGeneration() < 0 && !getFolderViewModel()->getFilter().isModified()) { return model->descendantsPassedFilter(filter_generation) || getVisible(); } -- cgit v1.2.3 From 33178d576647d89199b6017dfedee7d99540179a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 4 Aug 2014 12:11:48 +0300 Subject: MAINT-4317 FIXED the Joystick Configuration help link does not point to the correct page. --- indra/newview/skins/default/xui/en/floater_joystick.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml index 259acccb68..3dfdf8e1a5 100755 --- a/indra/newview/skins/default/xui/en/floater_joystick.xml +++ b/indra/newview/skins/default/xui/en/floater_joystick.xml @@ -4,7 +4,7 @@ height="500" layout="topleft" name="Joystick" - help_topic="joystick" + help_topic="Viewerhelp:Joystick_Configuration" title="JOYSTICK CONFIGURATION" width="569"> Date: Mon, 4 Aug 2014 17:16:02 +0300 Subject: MAINT-4304 FIXED Avatar stuck running if releasing shift during double-tap strafe --- indra/newview/llviewerkeyboard.cpp | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b0f4802e20..a4a05587d3 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -88,18 +88,25 @@ void agent_push_down( EKeystate s ) gAgent.moveUp(-1); } +static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode) +{ + if (gAgent.mDoubleTapRunMode == mode && + gAgent.getRunning() && + !gAgent.getAlwaysRun()) + { + // Turn off temporary running. + gAgent.clearRunning(); + gAgent.sendWalkRun(gAgent.getRunning()); + } +} + static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode) { if (KEYSTATE_UP == s) { - if (gAgent.mDoubleTapRunMode == mode && - gAgent.getRunning() && - !gAgent.getAlwaysRun()) - { - // Turn off temporary running. - gAgent.clearRunning(); - gAgent.sendWalkRun(gAgent.getRunning()); - } + // Note: in case shift is already released, slide left/right run + // will be released in agent_turn_left()/agent_turn_right() + agent_check_temporary_run(mode); } else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && KEYSTATE_DOWN == s && @@ -218,7 +225,12 @@ void agent_turn_left( EKeystate s ) } else { - if (KEYSTATE_UP == s) return; + if (KEYSTATE_UP == s) + { + // Check temporary running. In case user released 'left' key with shift already released. + agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDELEFT); + return; + } F32 time = gKeyboard->getCurKeyElapsedTime(); gAgent.moveYaw( LLFloaterMove::getYawRate( time ) ); } @@ -241,7 +253,12 @@ void agent_turn_right( EKeystate s ) } else { - if (KEYSTATE_UP == s) return; + if (KEYSTATE_UP == s) + { + // Check temporary running. In case user released 'right' key with shift already released. + agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDERIGHT); + return; + } F32 time = gKeyboard->getCurKeyElapsedTime(); gAgent.moveYaw( -LLFloaterMove::getYawRate( time ) ); } -- cgit v1.2.3 From 3aa0359b2f11c6b9183cd09ba7cd2ce542a536eb Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 6 Aug 2014 16:10:30 -0400 Subject: SL-90 FIX - support folder_name option in wear_folder SLURL --- indra/newview/llappearancemgr.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 29534a4382..e35cf011c7 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4056,17 +4056,33 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - LLPointer category = new LLInventoryCategory(query_map["folder_id"], - LLUUID::null, - LLFolderType::FT_CLOTHING, - "Quick Appearance"); - LLSD::UUID folder_uuid = query_map["folder_id"].asUUID(); - if ( gInventory.getCategory( folder_uuid ) != NULL ) - { - LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); + LLSD::UUID folder_uuid; - // *TODOw: This may not be necessary if initial outfit is chosen already -- josh - gAgent.setOutfitChosen(TRUE); + if (folder_uuid.isNull() && query_map.has("folder_name")) + { + std::string outfit_folder_name = query_map["folder_name"]; + folder_uuid = findDescendentCategoryIDByName( + gInventory.getLibraryRootFolderID(), + outfit_folder_name); + } + if (folder_uuid.isNull() && query_map.has("folder_id")) + { + folder_uuid = query_map["folder_id"].asUUID(); + } + + if (folder_uuid.notNull()) + { + LLPointer category = new LLInventoryCategory(folder_uuid, + LLUUID::null, + LLFolderType::FT_CLOTHING, + "Quick Appearance"); + if ( gInventory.getCategory( folder_uuid ) != NULL ) + { + LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); + + // *TODOw: This may not be necessary if initial outfit is chosen already -- josh + gAgent.setOutfitChosen(TRUE); + } } // release avatar picker keyboard focus -- cgit v1.2.3 From c9d24fefc0794bc8828db1deb97aac2308cab067 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Aug 2014 15:36:42 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to Nested folders fix --- indra/newview/llinventorybridge.cpp | 33 +++++++++++++++------------------ indra/newview/lltooldraganddrop.cpp | 31 ++++++++++++++----------------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 33e557cddd..8e6ac20eaa 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3779,24 +3779,21 @@ void LLFolderBridge::modifyOutfit(BOOL append) // checking amount of items to wear U32 max_items = gSavedSettings.getU32("WearFolderLimit"); - if (cat->getDescendentCount() > max_items) - { - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - not_worn); - - if (items.size() > max_items) - { - LLSD args; - args["AMOUNT"] = llformat("%d", max_items); - LLNotificationsUtil::add("TooManyWearables", args); - return; - } + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(cat->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + + if (items.size() > max_items) + { + LLSD args; + args["AMOUNT"] = llformat("%d", max_items); + LLNotificationsUtil::add("TooManyWearables", args); + return; } LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 575e5c5c52..8561d265de 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -2173,23 +2173,20 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( } U32 max_items = gSavedSettings.getU32("WearFolderLimit"); - if (category->getDescendentCount()>max_items) - { - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(category->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - not_worn); - if (items.size() > max_items) - { - LLStringUtil::format_map_t args; - args["AMOUNT"] = llformat("%d", max_items); - mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args); - return ACCEPT_NO_CUSTOM; - } + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(category->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + if (items.size() > max_items) + { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items); + mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args); + return ACCEPT_NO_CUSTOM; } if(mSource == SOURCE_AGENT) -- cgit v1.2.3 From 3fda7e8c3f6566c7619eb3b0018142b56041bd6e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Aug 2014 20:28:33 +0300 Subject: MAINT-4305 FIXED Viewer sometimes crashes when pasting an invalid character into a script. Wrong functions were in use for llwchar type variables. --- indra/llui/llkeywords.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 75773d7dfd..6750ee482a 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -505,7 +505,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW } // Skip white space - while( *cur && isspace(*cur) && (*cur != '\n') ) + while( *cur && iswspace(*cur) && (*cur != '\n') ) { cur++; } @@ -548,7 +548,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW } // Skip white space - while( *cur && isspace(*cur) && (*cur != '\n') ) + while( *cur && iswspace(*cur) && (*cur != '\n') ) { cur++; } @@ -655,10 +655,10 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW // check against words llwchar prev = cur > base ? *(cur-1) : 0; - if( !isalnum( prev ) && (prev != '_') ) + if( !iswalnum( prev ) && (prev != '_') ) { const llwchar* p = cur; - while( isalnum( *p ) || (*p == '_') ) + while( iswalnum( *p ) || (*p == '_') ) { p++; } -- cgit v1.2.3 From 55fa4b1c37ced0a3f0b38cb17bd6da5dfbc0b69c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 18 Aug 2014 16:06:20 +0300 Subject: MAINT-4334 FIXED Request confirmation from the user when paying another avatar to ensure that the destination avatar and L$ amount is correct and intended before the money is sent --- indra/newview/llfloaterpay.cpp | 75 ++++++-- indra/newview/skins/default/xui/en/floater_pay.xml | 187 ++++++++++++-------- .../skins/default/xui/en/floater_pay_object.xml | 194 +++++++++++++-------- .../newview/skins/default/xui/en/notifications.xml | 13 ++ 4 files changed, 303 insertions(+), 166 deletions(-) diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index f0c010b545..a4d13ce1d5 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -40,8 +40,10 @@ #include "lltextbox.h" #include "lllineeditor.h" #include "llmutelist.h" +#include "llnotificationsutil.h" #include "llfloaterreporter.h" #include "llslurl.h" +#include "llstatusbar.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -90,6 +92,9 @@ public: static void payDirectly(money_callback callback, const LLUUID& target_id, bool is_group); + static bool payConfirmationCallback(const LLSD& notification, + const LLSD& response, + LLGiveMoneyInfo* info); private: static void onCancel(void* data); @@ -111,14 +116,12 @@ protected: LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; LLSafeHandle mObjectSelection; - - static S32 sLastAmount; }; -S32 LLFloaterPay::sLastAmount = 0; const S32 MAX_AMOUNT_LENGTH = 10; const S32 FASTPAY_BUTTON_WIDTH = 80; +const S32 PAY_AMOUNT_NOTIFICATION = 200; LLFloaterPay::LLFloaterPay(const LLSD& key) : LLFloater(key), @@ -188,17 +191,9 @@ BOOL LLFloaterPay::postBuild() getChildView("amount text")->setVisible(FALSE); - - std::string last_amount; - if(sLastAmount > 0) - { - last_amount = llformat("%d", sLastAmount); - } - getChildView("amount")->setVisible(FALSE); getChild("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); - getChild("amount")->setValue(last_amount); getChild("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); info = new LLGiveMoneyInfo(this, 0); @@ -207,7 +202,7 @@ BOOL LLFloaterPay::postBuild() childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); getChildView("pay btn")->setVisible(FALSE); - getChildView("pay btn")->setEnabled((sLastAmount > 0)); + getChildView("pay btn")->setEnabled(FALSE); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); @@ -419,7 +414,24 @@ void LLFloaterPay::payDirectly(money_callback callback, floater->finishPayUI(target_id, is_group); } - + +bool LLFloaterPay::payConfirmationCallback(const LLSD& notification, const LLSD& response, LLGiveMoneyInfo* info) +{ + if (!info || !info->mFloater) + { + return false; + } + + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + info->mFloater->give(info->mAmount); + info->mFloater->closeFloater(); + } + + return false; +} + void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) { std::string slurl; @@ -470,10 +482,40 @@ void LLFloaterPay::onKeystroke(LLLineEditor*, void* data) void LLFloaterPay::onGive(void* data) { LLGiveMoneyInfo* info = reinterpret_cast(data); - if(info && info->mFloater) + LLFloaterPay* floater = info->mFloater; + if(info && floater) { - info->mFloater->give(info->mAmount); - info->mFloater->closeFloater(); + S32 amount = info->mAmount; + if(amount == 0) + { + amount = atoi(floater->getChild("amount")->getValue().asString().c_str()); + } + if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) + { + LLUUID payee_id; + BOOL is_group; + if (floater->mObjectSelection.notNull()) + { + LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); + node->mPermissions->getOwnership(payee_id, is_group); + } + else + { + is_group = floater->mTargetIsGroup; + payee_id = floater->mTargetUUID; + } + + LLSD args; + args["TARGET"] = LLSLURL( is_group ? "group" : "agent", payee_id, "completename").getSLURLString(); + args["AMOUNT"] = amount; + + LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info)); + } + else + { + floater->give(amount); + floater->closeFloater(); + } } } @@ -487,7 +529,6 @@ void LLFloaterPay::give(S32 amount) { amount = atoi(getChild("amount")->getValue().asString().c_str()); } - sLastAmount = amount; // Try to pay an object. if (mObjectSelection.notNull()) diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml index 41a7134b1d..9d91f801a6 100755 --- a/indra/newview/skins/default/xui/en/floater_pay.xml +++ b/indra/newview/skins/default/xui/en/floater_pay.xml @@ -2,12 +2,12 @@ + width="261"> Pay Group @@ -21,88 +21,129 @@ type="string" length="1" follows="left|top" - font="SansSerifSmall" height="16" layout="topleft" left="10" - name="payee_name" - top="25" - use_ellipses="true" - width="230"> - Test Name That Is Extremely Long To Check Clipping + top="24" + name="paying_text" + width="180"> + You are paying: - + + -- cgit v1.2.3 From 208fe31200030ced08556970d68f37c182cea7ff Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 28 Aug 2014 19:36:47 +0300 Subject: MAINT-3967 FIXED Up arrow key does not move the cursor up in chat field. Reverted previous two fixes and modified LLTextBase::changeLine() --- indra/llui/lltextbase.cpp | 34 +++++++----------------- indra/llui/lltextbase.h | 1 - indra/llui/lltexteditor.cpp | 64 ++------------------------------------------- 3 files changed, 11 insertions(+), 88 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2d7062e71d..9b125a85b9 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -218,8 +218,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mParseHighlights(p.parse_highlights), mBGVisible(p.bg_visible), mScroller(NULL), - mStyleDirty(true), - mDrawRightmostCursor(false) + mStyleDirty(true) { if(p.allow_scroll) { @@ -1505,11 +1504,6 @@ void LLTextBase::reflow() // find and erase line info structs starting at start_index and going to end of document if (!mLineInfoList.empty()) { - if (mDrawRightmostCursor) - { - start_index--; - } - // find first element whose end comes after start_index line_list_t::iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), start_index, line_end_compare()); line_start_index = iter->mDocIndexStart; @@ -1698,11 +1692,6 @@ S32 LLTextBase::getLineNumFromDocIndex( S32 doc_index, bool include_wordwrap) co } else { - if (mDrawRightmostCursor) - { - doc_index--; - } - line_list_t::const_iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), doc_index, line_end_compare()); if (include_wordwrap) { @@ -1731,11 +1720,6 @@ S32 LLTextBase::getLineOffsetFromDocIndex( S32 startpos, bool include_wordwrap) } else { - if (mDrawRightmostCursor) - { - startpos--; - } - line_list_t::const_iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), startpos, line_end_compare()); return startpos - iter->mDocIndexStart; } @@ -2456,7 +2440,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, } else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd) { - if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum && !mDrawRightmostCursor) + if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum) { // if segment wraps to the next line we should step one char back // to compensate for the space char between words @@ -2489,13 +2473,7 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const // clamp pos to valid values pos = llclamp(pos, 0, mLineInfoList.back().mDocIndexEnd - 1); - S32 corrected_pos = pos; - if (mDrawRightmostCursor && pos > 0) - { - corrected_pos--; - } - - line_list_t::const_iterator line_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), corrected_pos, line_end_compare()); + line_list_t::const_iterator line_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), pos, line_end_compare()); doc_rect.mLeft = line_iter->mRect.mLeft; doc_rect.mBottom = line_iter->mRect.mBottom; @@ -2670,6 +2648,12 @@ void LLTextBase::changeLine( S32 delta ) LLRect visible_region = getVisibleDocumentRect(); S32 new_cursor_pos = getDocIndexFromLocalCoord(mDesiredXPixel, mLineInfoList[new_line].mRect.mBottom + mVisibleTextRect.mBottom - visible_region.mBottom, TRUE); + S32 actual_line = getLineNumFromDocIndex(new_cursor_pos); + if (actual_line != new_line) + { + // line edge, correcting position by 1 to move onto proper line + new_cursor_pos += new_line - actual_line; + } setCursorPos(new_cursor_pos, true); } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 9c3bc3ed98..738b4d5b8e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -618,7 +618,6 @@ protected: // cursor S32 mCursorPos; // I-beam is just after the mCursorPos-th character. - bool mDrawRightmostCursor; // When cursor is on the rightmost position on the line S32 mDesiredXPixel; // X pixel position where the user wants the cursor to be LLFrameTimer mCursorBlinkTimer; // timer that controls cursor blinking diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 9219490bf2..cf5fdef539 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1124,13 +1124,6 @@ void LLTextEditor::addChar(llwchar wc) setCursorPos(new_cursor_pos); } } - - if (mCursorPos > 0) - { - LLRect current_cursor_rect = getDocRectFromDocIndex(mCursorPos); - LLRect prev_cursor_rect = getDocRectFromDocIndex(mCursorPos - 1); - mDrawRightmostCursor = current_cursor_rect.mBottom < prev_cursor_rect.mBottom; - } } void LLTextEditor::addLineBreakChar(BOOL group_together) @@ -1277,12 +1270,6 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) break; case KEY_HOME: - if(mDrawRightmostCursor && mCursorPos > 0) - { - mCursorPos--; - mDrawRightmostCursor = false; - } - startOfLine(); break; @@ -1297,23 +1284,6 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) case KEY_END: endOfLine(); - { - S32 last_line_index = mLineInfoList.size() - 1; - if (getLineNumFromDocIndex(mCursorPos, true) < last_line_index) - { - mDrawRightmostCursor = true; - setCursorPos(mCursorPos + 1); - } - else if (last_line_index > 0) // only for two and more lines - { - S32 prev_line_width = mLineInfoList[last_line_index - 1].mRect.getWidth(); - S32 last_line_width = mLineInfoList[last_line_index].mRect.getWidth(); - if (prev_line_width <= last_line_width) - { - mDrawRightmostCursor = true; - } - } - } break; case KEY_LEFT: @@ -1325,18 +1295,7 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) { if( 0 < mCursorPos ) { - LLRect current_cursor_rect = getDocRectFromDocIndex(mCursorPos); - LLRect next_cursor_rect = getDocRectFromDocIndex(mCursorPos - 1); - - if (current_cursor_rect.mBottom < next_cursor_rect.mBottom) - { - mDrawRightmostCursor = true; - } - else - { - mDrawRightmostCursor = false; - setCursorPos(mCursorPos - 1); - } + setCursorPos(mCursorPos - 1); } else { @@ -1354,26 +1313,7 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) { if( mCursorPos < getLength() ) { - LLRect current_cursor_rect = getDocRectFromDocIndex(mCursorPos); - LLRect next_cursor_rect = getDocRectFromDocIndex(mCursorPos + 1); - - if (current_cursor_rect.mBottom > next_cursor_rect.mBottom) - { - if (mDrawRightmostCursor) - { - mDrawRightmostCursor = false; - } - else - { - mDrawRightmostCursor = true; - setCursorPos(mCursorPos + 1); - } - } - else - { - mDrawRightmostCursor = false; - setCursorPos(mCursorPos + 1); - } + setCursorPos(mCursorPos + 1); } else { -- cgit v1.2.3 From 8b88633761b0ebffebdec24be038868b439971f3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:32:22 -0400 Subject: MAINT-4158 WIP - track position overrides requested by attachments so they can be undone intelligently --- indra/llappearance/llavatarappearance.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- indra/llcharacter/lljoint.cpp | 56 +++++++++++-------------- indra/llcharacter/lljoint.h | 17 +------- indra/newview/llfloatermodelpreview.cpp | 3 +- indra/newview/llvovolume.cpp | 3 +- 6 files changed, 31 insertions(+), 52 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index c1107f674e..9904f454d6 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,7 +605,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - joint->setDefaultFromCurrentXform(); + //joint->setDefaultFromCurrentXform(); if (info->mIsJoint) { diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index ea29cbd451..fbc312c426 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -213,7 +213,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) LLVector3 scaleDelta = iter->second; newScale = newScale + (effective_weight * scaleDelta) - (mLastWeight * scaleDelta); //An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached - joint->storeScaleForReset( newScale ); + // needed? // joint->storeScaleForReset( newScale ); joint->setScale(newScale); } diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index f6e95fdc8d..bad9c198ad 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -36,6 +36,20 @@ S32 LLJoint::sNumUpdates = 0; S32 LLJoint::sNumTouches = 0; + +//----------------------------------------------------------------------------- +// LLJoint::AttachmentOverrideRecord::AttachmentOverrideRecord() +//----------------------------------------------------------------------------- +LLJoint::AttachmentOverrideRecord::AttachmentOverrideRecord() +{ +} + +template +bool attachment_map_iter_compare_name(const T& a, const T& b) +{ + return a.second.name < b.second.name; +} + //----------------------------------------------------------------------------- // LLJoint() // Class Constructor @@ -48,8 +62,6 @@ void LLJoint::init() mParent = NULL; mXform.setScaleChildOffset(TRUE); mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); - mOldXform.setScaleChildOffset(TRUE); - mOldXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; mUpdateXform = TRUE; } @@ -242,15 +254,6 @@ void LLJoint::setPosition( const LLVector3& pos ) touch(MATRIX_DIRTY | POSITION_DIRTY); } - -//-------------------------------------------------------------------- -// setDefaultFromCurrentXform() -//-------------------------------------------------------------------- -void LLJoint::setDefaultFromCurrentXform( void ) -{ - mDefaultXform = mXform; -} - //-------------------------------------------------------------------- // addAttachmentPosOverride() //-------------------------------------------------------------------- @@ -262,14 +265,14 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const std::string& } if (m_attachmentOverrides.empty()) { - LL_WARNS() << "saving m_posBeforeOverrides " << getPosition() << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " saving m_posBeforeOverrides " << getPosition() << LL_ENDL; m_posBeforeOverrides = getPosition(); } AttachmentOverrideRecord rec; rec.name = attachment_name; rec.pos = pos; m_attachmentOverrides[attachment_name] = rec; - LL_WARNS() << "addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; updatePos(); } @@ -285,46 +288,35 @@ void LLJoint::removeAttachmentPosOverride( const std::string& attachment_name ) attachment_map_t::iterator it = m_attachmentOverrides.find(attachment_name); if (it != m_attachmentOverrides.end()) { - LL_WARNS() << "removeAttachmentPosOverride for " << attachment_name << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " removeAttachmentPosOverride for " << attachment_name << LL_ENDL; m_attachmentOverrides.erase(it); } updatePos(); } +//-------------------------------------------------------------------- +// updatePos() +//-------------------------------------------------------------------- void LLJoint::updatePos() { LLVector3 pos; attachment_map_t::iterator it = std::max_element(m_attachmentOverrides.begin(), - m_attachmentOverrides.end()); + m_attachmentOverrides.end(), + attachment_map_iter_compare_name); if (it != m_attachmentOverrides.end()) { AttachmentOverrideRecord& rec = it->second; - LL_WARNS() << "updatePos, winner is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " updatePos, winner of " << m_attachmentOverrides.size() << " is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; pos = rec.pos; } else { - LL_WARNS() << "updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; pos = m_posBeforeOverrides; } setPosition(pos); } -//-------------------------------------------------------------------- -// storeScaleForReset() -//-------------------------------------------------------------------- -void LLJoint::storeScaleForReset( const LLVector3& scale ) -{ - mOldXform.setScale( scale ); -} -//-------------------------------------------------------------------- -// restoreOldXform() -//-------------------------------------------------------------------- -void LLJoint::restoreOldXform( void ) -{ - mXform = mOldXform; - mDirtyFlags = ALL_DIRTY; -} //-------------------------------------------------------------------- // getWorldPosition() //-------------------------------------------------------------------- diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index f6f1cd2fe4..0ef054d9c1 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -79,8 +79,6 @@ protected: // explicit transformation members LLXformMatrix mXform; - LLXformMatrix mOldXform; - LLXformMatrix mDefaultXform; LLUUID mId; @@ -103,16 +101,9 @@ public: struct AttachmentOverrideRecord { - AttachmentOverrideRecord() - { - } + AttachmentOverrideRecord(); LLVector3 pos; std::string name; - - bool operator<(const AttachmentOverrideRecord& other) const - { - return name < other.name; - } }; typedef std::map attachment_map_t; attachment_map_t m_attachmentOverrides; @@ -177,7 +168,7 @@ public: // get/set local scale const LLVector3& getScale(); void setScale( const LLVector3& scale ); - void storeScaleForReset( const LLVector3& scale ); + // get/set world matrix const LLMatrix4 &getWorldMatrix(); void setWorldMatrix( const LLMatrix4& mat ); @@ -200,10 +191,6 @@ public: virtual BOOL isAnimatable() const { return TRUE; } S32 getJointNum() const { return mJointNum; } - - void restoreOldXform( void ); - void setDefaultFromCurrentXform( void ); - void storeCurrentXform( const LLVector3& pos ); void addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ); void removeAttachmentPosOverride( const std::string& attachment_name ); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 039ff848cb..93c18c5c8b 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel() LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) { - LL_WARNS() << "Aieee, now what!" << LL_ENDL; + pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); + //LL_WARNS() << "Aieee, now what!" << LL_ENDL; //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0ef48c4c70..0dc5ae5058 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4626,8 +4626,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position - const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); - //pJoint->storeCurrentXform( jointPos ); + const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); pJoint->addAttachmentPosOverride( jointPos, attachment_name ); //If joint is a pelvis then handle old/new pelvis to foot values -- cgit v1.2.3 From da515164894cd91d7b0705525f2a0f80d2f39cab Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:37:25 -0400 Subject: MAINT-4158 WIP - comment change --- indra/llappearance/llavatarappearance.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 9904f454d6..6c3bde20ca 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,8 +605,6 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - //joint->setDefaultFromCurrentXform(); - if (info->mIsJoint) { joint->setSkinOffset( info->mPivot ); -- cgit v1.2.3 From 6efd9d09b91f5bbecfcde68c8a59f8fc56b89ad8 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 1 Sep 2014 11:33:55 +0300 Subject: MAINT-2699 FIXED Disable voice and release mic button when status is changed to STATUS_VOICE_DISABLED. --- indra/newview/llvoicechannel.cpp | 2 ++ indra/newview/llvoicevivox.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9a84cae403..426ca332e4 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -725,6 +725,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) // do not notify user when leaving proximal channel return; case STATUS_VOICE_DISABLED: + LLVoiceClient::getInstance()->setUserPTTState(false); + gAgent.setVoiceConnected(false); //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 54b4119331..2f3cd4d24c 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -3169,7 +3169,7 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent( session->mErrorStatusCode = statusCode; break; } - + switch(state) { case streamStateIdle: @@ -5433,7 +5433,8 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta // skipped to avoid speak button blinking if ( status != LLVoiceClientStatusObserver::STATUS_JOINING - && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) + && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL + && status != LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED) { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); -- cgit v1.2.3 From 9ffa7471bb9e611440e3c12e654b83dfbead2e83 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 3 Sep 2014 18:26:04 +0300 Subject: MAINT-4363 FIXED In-use script dialogs and pending inventory offers are forced out of view and into their chiclet every time a new conversation is started by another resident or a new group chat session opens --- indra/newview/llfloaterimsessiontab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index fbdaca0e6f..2864f018b2 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -47,7 +47,7 @@ const F32 REFRESH_INTERVAL = 1.0f; LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) -: LLTransientDockableFloater(NULL, true, session_id), +: LLTransientDockableFloater(NULL, false, session_id), mIsP2PChat(false), mExpandCollapseBtn(NULL), mTearOffBtn(NULL), -- cgit v1.2.3 From 7d9372b96d8eaa3df6f0b6b1aff67a4b6a710f70 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 4 Sep 2014 14:13:47 +0300 Subject: MAINT-4323 FIXED Mouselook - right-click locks cam position (mac-only) --- doc/contributions.txt | 2 ++ indra/llwindow/llopenglview-objc.mm | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 7e8ab46b1a..e157e82aac 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1017,6 +1017,8 @@ Peekay Semyorka VWR-19 VWR-49 VWR-79 +Pell Smit + MAINT-4323 Peter Lameth VWR-7331 PeterPunk Mooney diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index f7031341eb..1bb93d05d6 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -349,9 +349,14 @@ attributedStringInfo getSegments(NSAttributedString *str) callMiddleMouseUp(mMousePos, mModifiers); } +- (void) rightMouseDragged:(NSEvent *)theEvent +{ + [self mouseDragged:theEvent]; +} + - (void) otherMouseDragged:(NSEvent *)theEvent { - + [self mouseDragged:theEvent]; } - (void) scrollWheel:(NSEvent *)theEvent -- cgit v1.2.3 From c053dbe02c301b92c151eb835f6c770b61a46859 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 5 Sep 2014 15:47:11 +0300 Subject: MAINT-1192 FIXED Empty folders remain in the recent items tab of inventory until relog --- indra/newview/llpanelmaininventory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 90dfb24377..e8a006d0be 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -151,7 +151,9 @@ BOOL LLPanelMainInventory::postBuild() recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - recent_items_panel->getFilter().markDefault(); + LLInventoryFilter& recent_filter = recent_items_panel->getFilter(); + recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY)); + recent_filter.markDefault(); recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2)); } @@ -825,9 +827,9 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } - if (!filtered_by_all_types) + if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE)) { - // don't include folders in filter, unless I've selected everything + // don't include folders in filter, unless I've selected everything or filtering by date filter &= ~(0x1 << LLInventoryType::IT_CATEGORY); } -- cgit v1.2.3 From deddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 5 Sep 2014 15:05:51 -0400 Subject: MAINT-4158 cleanup --- indra/llappearance/llavatarappearance.cpp | 21 --------------------- indra/newview/llfloatermodelpreview.cpp | 2 -- 2 files changed, 23 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 6c3bde20ca..c0ad8315af 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -480,18 +480,6 @@ void LLAvatarAppearance::computeBodySize() knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - foot.mV[VZ] * ankle_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mAvatarOffset.mV[VZ] " << mAvatarOffset.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "mPelvisToFoot " << mPelvisToFoot << LL_ENDL; - // LL_INFOS("Avatar") << "- hip.mV[VZ] " << hip.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- pelvis_scale.mV[VZ] " << pelvis_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee.mV[VZ] " << knee.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle.mV[VZ] " << ankle.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee_scale.mV[VZ] " << knee_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- foot.mV[VZ] " << foot.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle_scale.mV[VZ] " << ankle_scale.mV[VZ] << LL_ENDL; - // } LLVector3 new_body_size; new_body_size.mV[VZ] = mPelvisToFoot + @@ -502,10 +490,6 @@ void LLAvatarAppearance::computeBodySize() neck.mV[VZ] * chest_scale.mV[VZ] + chest.mV[VZ] * torso_scale.mV[VZ] + torso.mV[VZ] * pelvis_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "new_body_size.mV[VZ] " << new_body_size.mV[VZ] << LL_ENDL; - // } // TODO -- measure the real depth and width new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; @@ -518,11 +502,6 @@ void LLAvatarAppearance::computeBodySize() { mBodySize = new_body_size; } - - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mBodySize.mV[VZ] " << mBodySize.mV[VZ] << LL_ENDL; - // } } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 93c18c5c8b..195a7f5ffe 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1936,8 +1936,6 @@ bool LLModelLoader::doLoadModel() if ( pJoint ) { pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); - //LL_WARNS() << "Aieee, now what!" << LL_ENDL; - //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else { -- cgit v1.2.3 From 2802a0e8392169ba77edd79544b6c8a2ec1851b8 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 5 Sep 2014 16:00:10 -0700 Subject: MAINT-3440 (Refix) Viewer freezes and not responding after trying to open 5 new media browsers tabs directed to yahoo.com link --- indra/newview/llfloaterwebcontent.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 3f3d87b564..024e315632 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -293,6 +293,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key) void LLFloaterWebContent::onClose(bool app_quitting) { // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. LLFloater* fbc_web = LLFloaterReg::findInstance("fbc_web"); if (fbc_web == this) { @@ -302,7 +303,8 @@ void LLFloaterWebContent::onClose(bool app_quitting) } } // Same with Flickr - LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. + LLFloater* flickr_web = LLFloaterReg::findInstance("flickr_web"); if (flickr_web == this) { if (!LLFlickrConnect::instance().isConnected()) @@ -311,7 +313,8 @@ void LLFloaterWebContent::onClose(bool app_quitting) } } // And Twitter - LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. + LLFloater* twitter_web = LLFloaterReg::findInstance("twitter_web"); if (twitter_web == this) { if (!LLTwitterConnect::instance().isConnected()) -- cgit v1.2.3 From 32282f8d9e0cd3652a68c1cea8a552f52ef8f631 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 8 Sep 2014 10:56:31 +0300 Subject: MAINT-4422 FIXED Inventory re-sorts itself if any of the Filters are enabled and you detach an item from your Avatar --- indra/llui/llfolderviewmodel.h | 15 +++++++++++++-- indra/newview/llinventorypanel.cpp | 29 ++++++++++------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index cad3ca9d8d..f6550eae42 100755 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -185,6 +185,7 @@ public: virtual void setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0) = 0; virtual void setPassedFolderFilter(bool passed, S32 filter_generation) = 0; virtual void dirtyFilter() = 0; + virtual void dirtyDescendantsFilter() = 0; virtual bool hasFilterStringMatch() = 0; virtual std::string::size_type getFilterStringOffset() = 0; virtual std::string::size_type getFilterStringSize() = 0; @@ -261,6 +262,14 @@ public: mParent->dirtyFilter(); } } + void dirtyDescendantsFilter() + { + mMostFilteredDescendantGeneration = -1; + if (mParent) + { + mParent->dirtyDescendantsFilter(); + } + } bool hasFilterStringMatch(); std::string::size_type getFilterStringOffset(); std::string::size_type getFilterStringSize(); @@ -279,7 +288,7 @@ public: return; } } - mChildren.push_back(child); + mChildren.push_back(child); child->setParent(this); dirtyFilter(); requestSort(); @@ -287,7 +296,8 @@ public: virtual void removeChild(LLFolderViewModelItem* child) { mChildren.remove(child); - child->setParent(NULL); + child->setParent(NULL); + dirtyDescendantsFilter(); dirtyFilter(); } @@ -297,6 +307,7 @@ public: // This is different and not equivalent to calling removeChild() on each child std::for_each(mChildren.begin(), mChildren.end(), DeletePointer()); mChildren.clear(); + dirtyDescendantsFilter(); dirtyFilter(); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ce7d4f50ad..db540b6199 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -537,12 +537,13 @@ void LLInventoryPanel::modelChanged(U32 mask) // This item already exists in both memory and UI. It was probably reparented. else if (model_item && view_item) { + LLFolderViewFolder* old_parent = view_item->getParentFolder(); // Don't process the item if it is the root - if (view_item->getParentFolder()) + if (old_parent) { LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); // Item has been moved. - if (view_item->getParentFolder() != new_parent) + if (old_parent != new_parent) { if (new_parent != NULL) { @@ -568,6 +569,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // doesn't include trash). Just remove the item's UI. view_item->destroyView(); } + old_parent->getViewModelItem()->dirtyDescendantsFilter(); } } } @@ -578,27 +580,16 @@ void LLInventoryPanel::modelChanged(U32 mask) else if (!model_item && view_item && viewmodel_item) { // Remove the item's UI. - removeItemID(viewmodel_item->getUUID()); + LLFolderViewFolder* parent = view_item->getParentFolder(); + removeItemID(viewmodel_item->getUUID()); view_item->destroyView(); + if(parent) + { + parent->getViewModelItem()->dirtyDescendantsFilter(); + } } } } - - if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE)) - { - // STRUCTURE and REMOVE model changes usually fail to update (clean) - // mMostFilteredDescendantGeneration of parent folder and dirtyFilter() - // is not sufficient for successful filter update, so we need to check - // all already passed element over again to remove obsolete elements. - // New items or moved items should be sufficiently covered by - // dirtyFilter(). - LLInventoryFilter& filter = getFilter(); - if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE - || filter.isNotDefault()) - { - filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE); - } - } } LLUUID LLInventoryPanel::getRootFolderID() -- cgit v1.2.3 From 53e5a79bd1784ec8cd3f69583c9c7a6746a68dfd Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 8 Sep 2014 17:34:38 -0400 Subject: Updated appearance utility version --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index b6586b25b7..19fa1b8d82 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1314,9 +1314,9 @@ archive hash - 54e46715e72b7805d9d3f84d45b6b1b7 + 0e15751836ac0492250001b80aea379f url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/290120/arch/Linux/installer/llappearanceutility_source-0.1-linux-20140519.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/293888/arch/Linux/installer/llappearanceutility_source-0.1-linux-20140908.tar.bz2 name linux -- cgit v1.2.3 From 136a20f155d0f89accce0b24446e5a2c62935ab6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 9 Sep 2014 10:46:56 +0300 Subject: MAINT-4432 FIXED Packets Lost under Help -> About Second Life does not display correctly --- indra/newview/skins/default/xui/fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 46fcbe005f..35b373f13a 100755 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -71,7 +71,7 @@ Version Qt Webkit : [QT_WEBKIT_VERSION] Version serveur vocal : [VOICE_VERSION] - Paquets perdus : [PACKETS_LOST,nombre,0]/[PACKETS_IN,nombre,0] ([PACKETS_PCT,nombre,1]%) + Paquets perdus : [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) Erreur lors de la récupération de l'URL des notes de version du serveur. -- cgit v1.2.3 From 1285807ec2f58c7dcab2f747461195e126ef26e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 8 Sep 2014 20:01:41 +0300 Subject: MAINT-4397 FIXED It's possible to size the viewer window where some menus will draw beyond its bounds --- indra/llui/llmenugl.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 604dc92789..d3ed4a1286 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1276,7 +1276,15 @@ void LLMenuItemBranchGL::openMenu() { // open upwards if menu extends past bottom // adjust by the height of the menu item branch since it is a submenu - delta_y = branch_rect.getHeight() - getRect().getHeight(); + if (y + 2 * branch_rect.getHeight() - getRect().getHeight() > menu_region_rect.mTop) + { + // overlaps with top border, align with top + delta_y = menu_region_rect.mTop - y - branch_rect.getHeight(); + } + else + { + delta_y = branch_rect.getHeight() - getRect().getHeight(); + } } if( x + branch_rect.getWidth() > menu_region_rect.mRight ) @@ -3258,6 +3266,11 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) CURSOR_WIDTH + MOUSE_CURSOR_PADDING * 2, CURSOR_HEIGHT + MOUSE_CURSOR_PADDING * 2); menu->translateIntoRectWithExclusion( menu_region_rect, mouse_rect ); + if (menu->getRect().mTop > menu_region_rect.mTop) + { + // not enough space: align with top, ignore exclusion + menu->translateIntoRect( menu_region_rect ); + } menu->getParent()->sendChildToFront(menu); } -- cgit v1.2.3 From 87a2cccb3ea7da76c8c8fd508b79b7da3b5c6504 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 10 Sep 2014 13:49:13 +0300 Subject: MAINT-4334 modified ignoretext for notification --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 570ecf241e..ea1bc66236 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5251,7 +5251,7 @@ Warning: The 'Pay object' click action has been set, but it will only Confirm that you want to pay L$[AMOUNT] to [TARGET]. confirm -- cgit v1.2.3 From d47efdfe03095d2b33fe8a1e6c3adccd25dfdc8b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 10 Sep 2014 21:08:08 +0300 Subject: MAINT-3964 FIXED Textures with Alpha won't Animate on Rigged Mesh when worn : fix in shader (mul texcoord to tex matrix), array's optimization --- indra/llrender/llrender.cpp | 2 +- indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 5 ++--- indra/newview/lldrawpoolavatar.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 388d3a4f1a..0af402efea 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1168,7 +1168,7 @@ void LLRender::syncMatrices() { stop_glerror(); - U32 name[] = + static const U32 name[] = { LLShaderMgr::MODELVIEW_MATRIX, LLShaderMgr::PROJECTION_MATRIX, diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index b40785bbd7..506118d381 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -111,10 +111,9 @@ void main() #ifdef USE_INDEXED_TEX passTextureIndex(); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; -#else - vary_texcoord0 = texcoord0; #endif + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; vary_norm = norm; vary_position = pos.xyz; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 90e6dfe351..afd5b84537 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -375,7 +375,7 @@ void LLDrawPoolAvatar::endPostDeferredAlpha() void LLDrawPoolAvatar::renderPostDeferred(S32 pass) { - const S32 actual_pass[] = + static const S32 actual_pass[] = { //map post deferred pass numbers to what render() expects 2, //skinned 4, // rigged fullbright -- cgit v1.2.3 From a4fc0b26b07e739348555ef936257bc25352279b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 18 Aug 2014 15:12:16 +0300 Subject: MAINT-3511 FIXED When one surface of mesh object is set transparent all object is invisible : compare rotation quaternions with predefined epsilon --- indra/llmath/llquaternion.h | 18 ++++++++++++++++++ indra/newview/llviewerobject.cpp | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h index e56929ed0f..aa0b1752f4 100755 --- a/indra/llmath/llquaternion.h +++ b/indra/llmath/llquaternion.h @@ -71,6 +71,9 @@ public: void quantize8(F32 lower, F32 upper); // changes the vector to reflect quatization void loadIdentity(); // Loads the quaternion that represents the identity rotation + bool isEqualEps(const LLQuaternion &quat, F32 epsilon) const; + bool isNotEqualEps(const LLQuaternion &quat, F32 epsilon) const; + const LLQuaternion& set(F32 x, F32 y, F32 z, F32 w); // Sets Quaternion to normalize(x, y, z, w) const LLQuaternion& set(const LLQuaternion &quat); // Copies Quaternion const LLQuaternion& set(const F32 *q); // Sets Quaternion to normalize(quat[VX], quat[VY], quat[VZ], quat[VW]) @@ -239,6 +242,21 @@ inline void LLQuaternion::loadIdentity() mQ[VW] = 1.0f; } +inline bool LLQuaternion::isEqualEps(const LLQuaternion &quat, F32 epsilon) const +{ + return ( fabs(mQ[VX] - quat.mQ[VX]) < epsilon + && fabs(mQ[VY] - quat.mQ[VY]) < epsilon + && fabs(mQ[VZ] - quat.mQ[VZ]) < epsilon + && fabs(mQ[VS] - quat.mQ[VS]) < epsilon ); +} + +inline bool LLQuaternion::isNotEqualEps(const LLQuaternion &quat, F32 epsilon) const +{ + return ( fabs(mQ[VX] - quat.mQ[VX]) > epsilon + || fabs(mQ[VY] - quat.mQ[VY]) > epsilon + || fabs(mQ[VZ] - quat.mQ[VZ]) > epsilon + || fabs(mQ[VS] - quat.mQ[VS]) > epsilon ); +} inline const LLQuaternion& LLQuaternion::set(F32 x, F32 y, F32 z, F32 w) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 97cefaf33c..33b442815d 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2274,7 +2274,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } - if ((new_rot != getRotation()) + if ((new_rot.isNotEqualEps(getRotation(), F_ALMOST_ZERO)) || (new_angv != old_angv)) { if (new_rot != mPreviousRotation) -- cgit v1.2.3 From eba76107ba2d40998f28582d85d6b9f5b6188263 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Tue, 19 Aug 2014 15:38:56 -0700 Subject: Set null position before value gets transformed. --- indra/newview/llvoicevivox.cpp | 44 ++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 4f89972192..efe4f15b00 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1644,7 +1644,7 @@ void LLVivoxVoiceClient::stateMachine() void LLVivoxVoiceClient::closeSocket(void) { #ifdef LL_WINDOWS - _sleep(3000); //Wait a moment for socket to close. SPATTERS + _sleep(3000); //Wait a moment for socket to close. #endif mSocket.reset(); mConnected = false; @@ -2334,8 +2334,8 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe void LLVivoxVoiceClient::setHidden(bool hidden) { - //SPATTERS hide me mHidden = hidden; + sendPositionalUpdate(); return; } @@ -2361,6 +2361,14 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) l = mAvatarRot.getLeftRow(); u = mAvatarRot.getUpRow(); a = mAvatarRot.getFwdRow(); + + pos = mAvatarPosition; + vel = mAvatarVelocity; + + // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. + // The old transform is replicated by this function. + oldSDKTransform(l, u, a, pos, vel); + if (mHidden) { for (int i=0;i<3;++i) @@ -2368,17 +2376,8 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) pos.mdV[i] = VX_NULL_POSITION; } } - else - { - pos = mAvatarPosition; - } - vel = mAvatarVelocity; - - // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. - // The old transform is replicated by this function. - oldSDKTransform(l, u, a, pos, vel); - stream + stream << "" << "" << pos.mdV[VX] << "" << "" << pos.mdV[VY] << "" @@ -2438,6 +2437,14 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) l = earRot.getLeftRow(); u = earRot.getUpRow(); a = earRot.getFwdRow(); + + pos = earPosition; + vel = earVelocity; + +// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; + + oldSDKTransform(l, u, a, pos, vel); + if (mHidden) { for (int i=0;i<3;++i) @@ -2445,17 +2452,8 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) pos.mdV[i] = VX_NULL_POSITION; } } - else - { - pos = earPosition; - } - vel = earVelocity; - -// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; - - oldSDKTransform(l, u, a, pos, vel); - - stream + + stream << "" << "" << pos.mdV[VX] << "" << "" << pos.mdV[VY] << "" -- cgit v1.2.3 From 86e2bd75bc6a04fa175a0ac9df51371498355f58 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Wed, 20 Aug 2014 14:02:48 -0700 Subject: Wait for response from SLVoice when sending shutdown. --- indra/newview/llvoicevivox.cpp | 15 +++++++++++---- indra/newview/llvoicevivox.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index efe4f15b00..642c6c1f76 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -323,6 +323,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mCaptureBufferRecording(false), mCaptureBufferRecorded(false), mCaptureBufferPlaying(false), + mShutdownComplete(true), mPlayRequestCount(0), mAvatarNameCacheConnection() @@ -377,7 +378,14 @@ void LLVivoxVoiceClient::terminate() if(mConnected) { logout(); - connectorShutdown(); + connectorShutdown(); + int count=0; + while (!mShutdownComplete && 10 > count++) + { + stateMachine(); + _sleep(1000); + } + closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. cleanUp(); } @@ -512,6 +520,7 @@ void LLVivoxVoiceClient::connectorShutdown() << "" << "\n\n\n"; + mShutdownComplete = false; mConnectorHandle.clear(); writeString(stream.str()); @@ -1564,6 +1573,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateConnectorStopping case stateConnectorStopping: // waiting for connector stop // The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped. + mShutdownComplete = true; break; //MARK: stateConnectorStopped @@ -1643,9 +1653,6 @@ void LLVivoxVoiceClient::stateMachine() void LLVivoxVoiceClient::closeSocket(void) { -#ifdef LL_WINDOWS - _sleep(3000); //Wait a moment for socket to close. -#endif mSocket.reset(); mConnected = false; mConnectorHandle.clear(); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 10ebac730d..a4ec9f2a69 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -723,6 +723,7 @@ private: bool mRenderDeviceDirty; bool mIsInitialized; + bool mShutdownComplete; bool checkParcelChanged(bool update = false); -- cgit v1.2.3 From e77f33f8de63d2de2738f2e9af9cb797adc115c9 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Wed, 20 Aug 2014 14:04:53 -0700 Subject: Windows only. --- indra/newview/llvoicevivox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 642c6c1f76..0387b18673 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -379,6 +379,7 @@ void LLVivoxVoiceClient::terminate() { logout(); connectorShutdown(); +#ifdef LL_WINDOWS int count=0; while (!mShutdownComplete && 10 > count++) { @@ -386,6 +387,7 @@ void LLVivoxVoiceClient::terminate() _sleep(1000); } +#endif closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. cleanUp(); } -- cgit v1.2.3 From 79bb641310775c56cb742c5ea938d5681117585c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 21 Aug 2014 14:18:35 -0400 Subject: MAINT-4158 WIP - fix for bug caused by multiple wearables with the same asset id --- indra/llappearance/llavatarappearance.cpp | 21 +++++++++++++++++++++ indra/newview/llagentwearables.cpp | 5 +++++ indra/newview/llvoavatar.cpp | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 6fdf9e2e07..c1107f674e 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -480,6 +480,18 @@ void LLAvatarAppearance::computeBodySize() knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - foot.mV[VZ] * ankle_scale.mV[VZ]; + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "mAvatarOffset.mV[VZ] " << mAvatarOffset.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "mPelvisToFoot " << mPelvisToFoot << LL_ENDL; + // LL_INFOS("Avatar") << "- hip.mV[VZ] " << hip.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- pelvis_scale.mV[VZ] " << pelvis_scale.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- knee.mV[VZ] " << knee.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- ankle.mV[VZ] " << ankle.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- knee_scale.mV[VZ] " << knee_scale.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- foot.mV[VZ] " << foot.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- ankle_scale.mV[VZ] " << ankle_scale.mV[VZ] << LL_ENDL; + // } LLVector3 new_body_size; new_body_size.mV[VZ] = mPelvisToFoot + @@ -490,6 +502,10 @@ void LLAvatarAppearance::computeBodySize() neck.mV[VZ] * chest_scale.mV[VZ] + chest.mV[VZ] * torso_scale.mV[VZ] + torso.mV[VZ] * pelvis_scale.mV[VZ]; + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "new_body_size.mV[VZ] " << new_body_size.mV[VZ] << LL_ENDL; + // } // TODO -- measure the real depth and width new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; @@ -502,6 +518,11 @@ void LLAvatarAppearance::computeBodySize() { mBodySize = new_body_size; } + + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "mBodySize.mV[VZ] " << mBodySize.mV[VZ] << LL_ENDL; + // } } //----------------------------------------------------------------------------- diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 49fedb8df8..3928bbadc8 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1009,6 +1009,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it continue; } + // Don't care about this case - ordering of wearables with the same asset id has no effect. + // Causes the two-alphas error case in MAINT-4158. + // We should actually disallow wearing two wearables with the same asset id. +#if 0 if (curr_wearable->getName() != new_item->getName() || curr_wearable->getItemID() != new_item->getUUID()) { @@ -1019,6 +1023,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it mismatched++; continue; } +#endif // If we got here, everything matches. matched++; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c32a44b779..53da1dbfb8 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5625,7 +5625,7 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o } //----------------------------------------------------------------------------- -// attachObject() +// getNumAttachments() //----------------------------------------------------------------------------- U32 LLVOAvatar::getNumAttachments() const { -- cgit v1.2.3 From 33f66ac2344f996a2310b179173232b98c8bd026 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Aug 2014 16:52:52 -0400 Subject: WIP on attachment offset management in joints --- indra/llcharacter/lljoint.cpp | 82 +++++++++++++++++++++++---------- indra/llcharacter/lljoint.h | 29 +++++++++--- indra/newview/llfloatermodelpreview.cpp | 3 +- indra/newview/llviewerobject.cpp | 11 +++++ indra/newview/llviewerobject.h | 2 + indra/newview/llvoavatar.cpp | 14 +++--- indra/newview/llvoavatar.h | 2 +- indra/newview/llvovolume.cpp | 4 +- 8 files changed, 105 insertions(+), 42 deletions(-) diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index c78c38c3a7..f6e95fdc8d 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -52,7 +52,6 @@ void LLJoint::init() mOldXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; mUpdateXform = TRUE; - mResetAfterRestoreOldXform = false; } LLJoint::LLJoint() : @@ -245,7 +244,7 @@ void LLJoint::setPosition( const LLVector3& pos ) //-------------------------------------------------------------------- -// setPosition() +// setDefaultFromCurrentXform() //-------------------------------------------------------------------- void LLJoint::setDefaultFromCurrentXform( void ) { @@ -253,14 +252,62 @@ void LLJoint::setDefaultFromCurrentXform( void ) } //-------------------------------------------------------------------- -// storeCurrentXform() +// addAttachmentPosOverride() //-------------------------------------------------------------------- -void LLJoint::storeCurrentXform( const LLVector3& pos ) -{ - mOldXform = mXform; - mResetAfterRestoreOldXform = true; - setPosition( pos ); - touch(ALL_DIRTY); +void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ) +{ + if (attachment_name.empty()) + { + return; + } + if (m_attachmentOverrides.empty()) + { + LL_WARNS() << "saving m_posBeforeOverrides " << getPosition() << LL_ENDL; + m_posBeforeOverrides = getPosition(); + } + AttachmentOverrideRecord rec; + rec.name = attachment_name; + rec.pos = pos; + m_attachmentOverrides[attachment_name] = rec; + LL_WARNS() << "addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; + updatePos(); +} + +//-------------------------------------------------------------------- +// removeAttachmentPosOverride() +//-------------------------------------------------------------------- +void LLJoint::removeAttachmentPosOverride( const std::string& attachment_name ) +{ + if (attachment_name.empty()) + { + return; + } + attachment_map_t::iterator it = m_attachmentOverrides.find(attachment_name); + if (it != m_attachmentOverrides.end()) + { + LL_WARNS() << "removeAttachmentPosOverride for " << attachment_name << LL_ENDL; + m_attachmentOverrides.erase(it); + } + updatePos(); +} + +void LLJoint::updatePos() +{ + LLVector3 pos; + attachment_map_t::iterator it = std::max_element(m_attachmentOverrides.begin(), + m_attachmentOverrides.end()); + if (it != m_attachmentOverrides.end()) + { + AttachmentOverrideRecord& rec = it->second; + LL_WARNS() << "updatePos, winner is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; + pos = rec.pos; + } + else + { + LL_WARNS() << "updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; + pos = m_posBeforeOverrides; + } + setPosition(pos); } //-------------------------------------------------------------------- @@ -276,7 +323,6 @@ void LLJoint::storeScaleForReset( const LLVector3& scale ) void LLJoint::restoreOldXform( void ) { mXform = mOldXform; - mResetAfterRestoreOldXform = false; mDirtyFlags = ALL_DIRTY; } //-------------------------------------------------------------------- @@ -325,7 +371,7 @@ void LLJoint::setWorldPosition( const LLVector3& pos ) //-------------------------------------------------------------------- -// mXform.getRotation() +// getRotation() //-------------------------------------------------------------------- const LLQuaternion& LLJoint::getRotation() { @@ -548,20 +594,6 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot) break; } } - - // 2003.03.26 - This code was just using up cpu cycles. AB - -// LLVector3 old_axis = main_axis * old_rot; -// LLVector3 new_axis = main_axis * new_rot; - -// for (S32 i = 0; i < mConstraintSilhouette.size() - 1; i++) -// { -// LLVector3 vert1 = mConstraintSilhouette[i]; -// LLVector3 vert2 = mConstraintSilhouette[i + 1]; - - // figure out how to clamp rotation to line on 3-sphere - -// } } // End diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index b65d6979d4..f6f1cd2fe4 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -88,8 +88,6 @@ public: U32 mDirtyFlags; BOOL mUpdateXform; - BOOL mResetAfterRestoreOldXform; - // describes the skin binding pose LLVector3 mSkinOffset; @@ -103,6 +101,25 @@ public: static S32 sNumTouches; static S32 sNumUpdates; + struct AttachmentOverrideRecord + { + AttachmentOverrideRecord() + { + } + LLVector3 pos; + std::string name; + + bool operator<(const AttachmentOverrideRecord& other) const + { + return name < other.name; + } + }; + typedef std::map attachment_map_t; + attachment_map_t m_attachmentOverrides; + LLVector3 m_posBeforeOverrides; + + void updatePos(); + public: LLJoint(); LLJoint(S32 joint_num); @@ -188,15 +205,13 @@ public: void setDefaultFromCurrentXform( void ); void storeCurrentXform( const LLVector3& pos ); + void addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ); + void removeAttachmentPosOverride( const std::string& attachment_name ); + //Accessor for the joint id LLUUID getId( void ) { return mId; } //Setter for the joints id void setId( const LLUUID& id ) { mId = id;} - - //If the old transform flag has been set, then the reset logic in avatar needs to be aware(test) of it - const BOOL doesJointNeedToBeReset( void ) const { return mResetAfterRestoreOldXform; } - void setJointResetFlag( bool val ) { mResetAfterRestoreOldXform = val; } - }; #endif // LL_LLJOINT_H diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b17ce97a2e..039ff848cb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel() LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) { - pJoint->storeCurrentXform( jointTransform.getTranslation() ); + LL_WARNS() << "Aieee, now what!" << LL_ENDL; + //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 4f992fc184..97cefaf33c 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6193,6 +6193,17 @@ const LLUUID &LLViewerObject::extractAttachmentItemID() return getAttachmentItemID(); } +const std::string& LLViewerObject::getAttachmentItemName() +{ + static std::string empty; + LLInventoryItem *item = gInventory.getItem(getAttachmentItemID()); + if (isAttachment() && item) + { + return item->getName(); + } + return empty; +} + //virtual LLVOAvatar* LLViewerObject::getAvatar() const { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index bab107cc57..22ac4ce0db 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -170,6 +170,8 @@ public: void setOnActiveList(BOOL on_active) { mOnActiveList = on_active; } virtual BOOL isAttachment() const { return FALSE; } + const std::string& getAttachmentItemName(); + virtual LLVOAvatar* getAvatar() const; //get the avatar this object is attached to, or NULL if object is not an attachment virtual BOOL isHUDAttachment() const { return FALSE; } virtual BOOL isTempAttachment() const; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 53da1dbfb8..6bd6570589 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5058,9 +5058,9 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) return jointp; } //----------------------------------------------------------------------------- -// resetJointPositionsToDefault +// resetJointPositionsOnDetach //----------------------------------------------------------------------------- -void LLVOAvatar::resetJointPositionsToDefault( void ) +void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name) { //Subsequent joints are relative to pelvis avatar_joint_list_t::iterator iter = mSkeleton.begin(); @@ -5072,17 +5072,16 @@ void LLVOAvatar::resetJointPositionsToDefault( void ) { LLJoint* pJoint = (*iter); //Reset joints except for pelvis - if ( pJoint && pJoint != pJointPelvis && pJoint->doesJointNeedToBeReset() ) + if ( pJoint && pJoint != pJointPelvis) { pJoint->setId( LLUUID::null ); - pJoint->restoreOldXform(); + pJoint->removeAttachmentPosOverride(attachment_name); } else - if ( pJoint && pJoint == pJointPelvis && pJoint->doesJointNeedToBeReset() ) + if ( pJoint && pJoint == pJointPelvis) { pJoint->setId( LLUUID::null ); pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) ); - pJoint->setJointResetFlag( false ); } } @@ -5746,7 +5745,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) && pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig && pSkinData->mAlternateBindMatrix.size() > 0 ) { - LLVOAvatar::resetJointPositionsToDefault(); + const std::string& attachment_name = pVO->getAttachmentItemName(); + LLVOAvatar::resetJointPositionsOnDetach(attachment_name); //Need to handle the repositioning of the cam, updating rig data etc during outfit editing //This handles the case where we detach a replacement rig. if ( gAgentCamera.cameraCustomizeAvatar() ) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 42ff7bff92..66a357ff62 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -199,7 +199,7 @@ public: virtual LLJoint* getJoint(const std::string &name); - void resetJointPositionsToDefault( void ); + void resetJointPositionsOnDetach(const std::string& attachment_name); /*virtual*/ const LLUUID& getID() const; /*virtual*/ void addDebugText(const std::string& text); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a83e2e020e..0ef48c4c70 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4626,7 +4626,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position - pJoint->storeCurrentXform( jointPos ); + const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); + //pJoint->storeCurrentXform( jointPos ); + pJoint->addAttachmentPosOverride( jointPos, attachment_name ); //If joint is a pelvis then handle old/new pelvis to foot values if ( lookingForJoint == "mPelvis" ) -- cgit v1.2.3 From 2cb14c7fdcf835816176d6edc0c05b99bcb39873 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:32:22 -0400 Subject: MAINT-4158 WIP - track position overrides requested by attachments so they can be undone intelligently --- indra/llappearance/llavatarappearance.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- indra/llcharacter/lljoint.cpp | 56 +++++++++++-------------- indra/llcharacter/lljoint.h | 17 +------- indra/newview/llfloatermodelpreview.cpp | 3 +- indra/newview/llvovolume.cpp | 3 +- 6 files changed, 31 insertions(+), 52 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index c1107f674e..9904f454d6 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,7 +605,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - joint->setDefaultFromCurrentXform(); + //joint->setDefaultFromCurrentXform(); if (info->mIsJoint) { diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index ea29cbd451..fbc312c426 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -213,7 +213,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) LLVector3 scaleDelta = iter->second; newScale = newScale + (effective_weight * scaleDelta) - (mLastWeight * scaleDelta); //An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached - joint->storeScaleForReset( newScale ); + // needed? // joint->storeScaleForReset( newScale ); joint->setScale(newScale); } diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index f6e95fdc8d..bad9c198ad 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -36,6 +36,20 @@ S32 LLJoint::sNumUpdates = 0; S32 LLJoint::sNumTouches = 0; + +//----------------------------------------------------------------------------- +// LLJoint::AttachmentOverrideRecord::AttachmentOverrideRecord() +//----------------------------------------------------------------------------- +LLJoint::AttachmentOverrideRecord::AttachmentOverrideRecord() +{ +} + +template +bool attachment_map_iter_compare_name(const T& a, const T& b) +{ + return a.second.name < b.second.name; +} + //----------------------------------------------------------------------------- // LLJoint() // Class Constructor @@ -48,8 +62,6 @@ void LLJoint::init() mParent = NULL; mXform.setScaleChildOffset(TRUE); mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); - mOldXform.setScaleChildOffset(TRUE); - mOldXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; mUpdateXform = TRUE; } @@ -242,15 +254,6 @@ void LLJoint::setPosition( const LLVector3& pos ) touch(MATRIX_DIRTY | POSITION_DIRTY); } - -//-------------------------------------------------------------------- -// setDefaultFromCurrentXform() -//-------------------------------------------------------------------- -void LLJoint::setDefaultFromCurrentXform( void ) -{ - mDefaultXform = mXform; -} - //-------------------------------------------------------------------- // addAttachmentPosOverride() //-------------------------------------------------------------------- @@ -262,14 +265,14 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const std::string& } if (m_attachmentOverrides.empty()) { - LL_WARNS() << "saving m_posBeforeOverrides " << getPosition() << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " saving m_posBeforeOverrides " << getPosition() << LL_ENDL; m_posBeforeOverrides = getPosition(); } AttachmentOverrideRecord rec; rec.name = attachment_name; rec.pos = pos; m_attachmentOverrides[attachment_name] = rec; - LL_WARNS() << "addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; updatePos(); } @@ -285,46 +288,35 @@ void LLJoint::removeAttachmentPosOverride( const std::string& attachment_name ) attachment_map_t::iterator it = m_attachmentOverrides.find(attachment_name); if (it != m_attachmentOverrides.end()) { - LL_WARNS() << "removeAttachmentPosOverride for " << attachment_name << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " removeAttachmentPosOverride for " << attachment_name << LL_ENDL; m_attachmentOverrides.erase(it); } updatePos(); } +//-------------------------------------------------------------------- +// updatePos() +//-------------------------------------------------------------------- void LLJoint::updatePos() { LLVector3 pos; attachment_map_t::iterator it = std::max_element(m_attachmentOverrides.begin(), - m_attachmentOverrides.end()); + m_attachmentOverrides.end(), + attachment_map_iter_compare_name); if (it != m_attachmentOverrides.end()) { AttachmentOverrideRecord& rec = it->second; - LL_WARNS() << "updatePos, winner is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " updatePos, winner of " << m_attachmentOverrides.size() << " is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; pos = rec.pos; } else { - LL_WARNS() << "updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; + LL_DEBUGS("Avatar") << getName() << " updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; pos = m_posBeforeOverrides; } setPosition(pos); } -//-------------------------------------------------------------------- -// storeScaleForReset() -//-------------------------------------------------------------------- -void LLJoint::storeScaleForReset( const LLVector3& scale ) -{ - mOldXform.setScale( scale ); -} -//-------------------------------------------------------------------- -// restoreOldXform() -//-------------------------------------------------------------------- -void LLJoint::restoreOldXform( void ) -{ - mXform = mOldXform; - mDirtyFlags = ALL_DIRTY; -} //-------------------------------------------------------------------- // getWorldPosition() //-------------------------------------------------------------------- diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index f6f1cd2fe4..0ef054d9c1 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -79,8 +79,6 @@ protected: // explicit transformation members LLXformMatrix mXform; - LLXformMatrix mOldXform; - LLXformMatrix mDefaultXform; LLUUID mId; @@ -103,16 +101,9 @@ public: struct AttachmentOverrideRecord { - AttachmentOverrideRecord() - { - } + AttachmentOverrideRecord(); LLVector3 pos; std::string name; - - bool operator<(const AttachmentOverrideRecord& other) const - { - return name < other.name; - } }; typedef std::map attachment_map_t; attachment_map_t m_attachmentOverrides; @@ -177,7 +168,7 @@ public: // get/set local scale const LLVector3& getScale(); void setScale( const LLVector3& scale ); - void storeScaleForReset( const LLVector3& scale ); + // get/set world matrix const LLMatrix4 &getWorldMatrix(); void setWorldMatrix( const LLMatrix4& mat ); @@ -200,10 +191,6 @@ public: virtual BOOL isAnimatable() const { return TRUE; } S32 getJointNum() const { return mJointNum; } - - void restoreOldXform( void ); - void setDefaultFromCurrentXform( void ); - void storeCurrentXform( const LLVector3& pos ); void addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ); void removeAttachmentPosOverride( const std::string& attachment_name ); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 039ff848cb..93c18c5c8b 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel() LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) { - LL_WARNS() << "Aieee, now what!" << LL_ENDL; + pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); + //LL_WARNS() << "Aieee, now what!" << LL_ENDL; //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0ef48c4c70..0dc5ae5058 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4626,8 +4626,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position - const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); - //pJoint->storeCurrentXform( jointPos ); + const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); pJoint->addAttachmentPosOverride( jointPos, attachment_name ); //If joint is a pelvis then handle old/new pelvis to foot values -- cgit v1.2.3 From 807f4dff74ee08d86895ee3329e985bb898eae24 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:37:25 -0400 Subject: MAINT-4158 WIP - comment change --- indra/llappearance/llavatarappearance.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 9904f454d6..6c3bde20ca 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,8 +605,6 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - //joint->setDefaultFromCurrentXform(); - if (info->mIsJoint) { joint->setSkinOffset( info->mPivot ); -- cgit v1.2.3 From 983ab95365cf45138aa05ab694c492fc141be2a8 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Thu, 4 Sep 2014 11:28:42 -0700 Subject: Added code to allow alternate directory destination for vivox log. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvoicevivox.cpp | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fa348e0bcd..eb5b1786d8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13509,6 +13509,17 @@ Value 0 + VivoxLogDirectory + + Comment + Default log path is Application Support/SecondLife/logs specify alternate absolute path here. + Persist + 1 + Type + String + Value + + VivoxShutdownTimeout Comment diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 0387b18673..f980f886cf 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -810,7 +810,13 @@ void LLVivoxVoiceClient::stateMachine() params.args.add("-ll"); params.args.add(loglevel); - std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + std::string log_folder = gSavedSettings.getString("VivoxLogDirectory"); + + if (log_folder.empty()) + { + log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + } + params.args.add("-lf"); params.args.add(log_folder); -- cgit v1.2.3 From 2c0a0f4a5763d1f34ec1368dcc83ebb085c565e0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 5 Sep 2014 15:05:51 -0400 Subject: MAINT-4158 cleanup --- indra/llappearance/llavatarappearance.cpp | 21 --------------------- indra/newview/llfloatermodelpreview.cpp | 2 -- 2 files changed, 23 deletions(-) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 6c3bde20ca..c0ad8315af 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -480,18 +480,6 @@ void LLAvatarAppearance::computeBodySize() knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - foot.mV[VZ] * ankle_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mAvatarOffset.mV[VZ] " << mAvatarOffset.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "mPelvisToFoot " << mPelvisToFoot << LL_ENDL; - // LL_INFOS("Avatar") << "- hip.mV[VZ] " << hip.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- pelvis_scale.mV[VZ] " << pelvis_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee.mV[VZ] " << knee.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle.mV[VZ] " << ankle.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee_scale.mV[VZ] " << knee_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- foot.mV[VZ] " << foot.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle_scale.mV[VZ] " << ankle_scale.mV[VZ] << LL_ENDL; - // } LLVector3 new_body_size; new_body_size.mV[VZ] = mPelvisToFoot + @@ -502,10 +490,6 @@ void LLAvatarAppearance::computeBodySize() neck.mV[VZ] * chest_scale.mV[VZ] + chest.mV[VZ] * torso_scale.mV[VZ] + torso.mV[VZ] * pelvis_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "new_body_size.mV[VZ] " << new_body_size.mV[VZ] << LL_ENDL; - // } // TODO -- measure the real depth and width new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; @@ -518,11 +502,6 @@ void LLAvatarAppearance::computeBodySize() { mBodySize = new_body_size; } - - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mBodySize.mV[VZ] " << mBodySize.mV[VZ] << LL_ENDL; - // } } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 93c18c5c8b..195a7f5ffe 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1936,8 +1936,6 @@ bool LLModelLoader::doLoadModel() if ( pJoint ) { pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); - //LL_WARNS() << "Aieee, now what!" << LL_ENDL; - //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else { -- cgit v1.2.3 From e44dfc0a4eb2c1dc63592f8ced7e35debbbf6238 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Mon, 8 Sep 2014 13:55:23 -0700 Subject: Fix position hiding on failed teleports on mac. --- indra/newview/llagent.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 059f21e91e..43e2b22689 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3873,6 +3873,11 @@ void LLAgent::handleTeleportFinished() void LLAgent::handleTeleportFailed() { + if(LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->setHidden(FALSE); + } + if (mTeleportRequest != NULL) { mTeleportRequest->setStatus(LLTeleportRequest::kFailed); -- cgit v1.2.3 From 5b3f8554a39a31851be747169bc229eac3b69463 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 8 Sep 2014 17:34:38 -0400 Subject: Updated appearance utility version --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3cfec2e8f8..571921032e 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1314,9 +1314,9 @@ archive hash - 54e46715e72b7805d9d3f84d45b6b1b7 + 0e15751836ac0492250001b80aea379f url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/290120/arch/Linux/installer/llappearanceutility_source-0.1-linux-20140519.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/293888/arch/Linux/installer/llappearanceutility_source-0.1-linux-20140908.tar.bz2 name linux -- cgit v1.2.3 From 271ca5e08c3441801034dfa219c2ee8579fa03fc Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 11:18:36 +0300 Subject: MAINT-4438 FIXED Warning message is changed to debug message. --- indra/llui/llview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 77c8878f4b..9e6bebc93b 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -885,7 +885,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) handled = handleKeyHere( key, mask ); if (handled) { - LL_WARNS() << "Key handled by " << getName() << LL_ENDL; + LL_DEBUGS() << "Key handled by " << getName() << LL_ENDL; } } } -- cgit v1.2.3 From c62ac0cae77a4dbe7807c7638af5dc708f8c5933 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 11:59:19 +0300 Subject: MAINT-3569 FIXED Handle window hide/unhide and minimize/unminimize events on mac. --- indra/llwindow/llopenglview-objc.mm | 18 ++++++++++++++++++ indra/llwindow/llwindowmacosx-objc.h | 2 ++ indra/llwindow/llwindowmacosx.cpp | 16 ++++++++++++++++ indra/newview/llappdelegate-objc.mm | 10 ++++++++++ 4 files changed, 46 insertions(+) diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 1bb93d05d6..1b5804ec83 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -124,6 +124,14 @@ attributedStringInfo getSegments(NSAttributedString *str) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowResized:) name:NSWindowDidResizeNotification + object:[self window]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification + object:[self window]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:[self window]]; } @@ -141,6 +149,16 @@ attributedStringInfo getSegments(NSAttributedString *str) } } +- (void)windowWillMiniaturize:(NSNotification *)notification; +{ + callWindowHide(); +} + +- (void)windowDidDeminiaturize:(NSNotification *)notification; +{ + callWindowUnhide(); +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index d64525fbdd..f02052ca6a 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -116,6 +116,8 @@ void callScrollMoved(float delta); void callMouseExit(); void callWindowFocus(); void callWindowUnfocus(); +void callWindowHide(); +void callWindowUnhide(); void callDeltaUpdate(float *delta, unsigned int mask); void callMiddleMouseDown(float *pos, unsigned int mask); void callMiddleMouseUp(float *pos, unsigned int mask); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 18d5152015..e8d0a8bdb8 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -349,6 +349,22 @@ void callWindowUnfocus() gWindowImplementation->getCallbacks()->handleFocusLost(gWindowImplementation); } +void callWindowHide() +{ + if ( gWindowImplementation && gWindowImplementation->getCallbacks() ) + { + gWindowImplementation->getCallbacks()->handleActivate(gWindowImplementation, false); + } +} + +void callWindowUnhide() +{ + if ( gWindowImplementation && gWindowImplementation->getCallbacks() ) + { + gWindowImplementation->getCallbacks()->handleActivate(gWindowImplementation, true); + } +} + void callDeltaUpdate(float *delta, MASK mask) { gWindowImplementation->updateMouseDeltas(delta); diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 988058aad3..549df80fa1 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -84,6 +84,16 @@ callWindowUnfocus(); } +- (void) applicationDidHide:(NSNotification *)notification +{ + callWindowHide(); +} + +- (void) applicationDidUnhide:(NSNotification *)notification +{ + callWindowUnhide(); +} + - (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender { if (!runMainLoop()) -- cgit v1.2.3 From 61fb8c3fe31c73ce9121daac545aa7c8fc79ec8c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 17:37:37 +0300 Subject: MAINT-4239 FIXED Border and text around top two buttons are added --- .../skins/default/xui/en/floater_openobject.xml | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml index a130439baa..912db80bcc 100755 --- a/indra/newview/skins/default/xui/en/floater_openobject.xml +++ b/indra/newview/skins/default/xui/en/floater_openobject.xml @@ -3,9 +3,9 @@ legacy_header_height="18" can_resize="true" default_tab_group="1" - height="350" + height="370" layout="topleft" - min_height="160" + min_height="190" min_width="285" name="objectcontents" help_topic="objectcontents" @@ -31,22 +31,41 @@ background_visible="false" draw_border="false" follows="all" - height="250" + height="240" layout="topleft" left="10" name="object_contents" top_pad="0" width="284" /> - + + + Copy to inventory and wear + -