From e50dd76c61e425d2ef851db9e4614f43f57ae959 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Nov 2025 19:03:32 +1000 Subject: [PATCH 01/13] [FIRE-36095] Fixed missing string for Favorites and updated help topics for favorites inventory tab --- indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml | 2 +- indra/newview/skins/default/xui/en/panel_main_inventory.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 1 + indra/newview/skins/starlight/xui/en/panel_main_inventory.xml | 2 +- .../newview/skins/starlightcui/xui/en/panel_main_inventory.xml | 2 +- indra/newview/skins/vintage/xui/en/panel_main_inventory.xml | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 07122d6243..9c87cd6a79 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -852,7 +852,7 @@ bevel_style="none" follows="all" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 03927fef32..ce252ab6ac 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -272,7 +272,7 @@ bevel_style="none" follows="all" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9093cf1851..94a24b1a4a 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3271,6 +3271,7 @@ Your current position: [AVATAR_POS] All Items Recent Items Worn Items + Favorites A group member named [NAME] (online) diff --git a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml index 77b7206680..2213841452 100644 --- a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml @@ -274,7 +274,7 @@ bevel_style="none" follows="all" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true" diff --git a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml index e79530721a..d3c36df606 100644 --- a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml @@ -278,7 +278,7 @@ follows="all" height="338" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true" diff --git a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml index 44afa1a770..d9567c6345 100644 --- a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml @@ -871,7 +871,7 @@ bevel_style="in" follows="all" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true"> From 5fb9e75cd8bed23c57757c269de5bbfcd9b99503 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Nov 2025 01:45:07 +1000 Subject: [PATCH 02/13] [FIRE-36087] Fix crash in updateImagesCreateTextures accessing potentially freed image pointer Merged upstream in SLViewer PR#4984 --- indra/newview/llviewertexturelist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 50d1d69576..17152b8e46 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1124,7 +1124,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->postCreateTexture(); imagep->mCreatePending = false; - mCreateTextureList.pop(); if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() && (imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL)) @@ -1136,6 +1135,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->scaleDown(); } + mCreateTextureList.pop(); + if (create_timer.getElapsedTimeF32() > max_time) { break; From b3a549b8b5e01809b2dd2006d6bf92a7a4d6baf7 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Nov 2025 01:56:26 +1000 Subject: [PATCH 03/13] [FIRE-36090] Fix crash in handleHover accessing null parent Merged upstream in SLViewer PR#4986 --- indra/newview/llmaniptranslate.cpp | 40 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 4b93d946ec..ca3b9a7ae4 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llmaniptranslate.cpp * @brief LLManipTranslate class implementation * @@ -716,24 +716,28 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // handle attachments in local space if (object->isAttachment() && object->mDrawable.notNull()) { - // calculate local version of relative move - LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation(); - objWorldRotation.transQuat(); - - LLVector3 old_position_local = object->getPosition(); - LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); - - //RN: I forget, but we need to do this because of snapping which doesn't often result - // in position changes even when the mouse moves - object->setPosition(new_position_local); - rebuild(object); - gAgentAvatarp->clampAttachmentPositions(); - new_position_local = object->getPosition(); - - if (selectNode->mIndividualSelection) + LLXform* object_xform_parent = object->mDrawable->mXform.getParent(); + if (object_xform_parent) { - // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_local - new_position_local, true); + // calculate local version of relative move + LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation(); + objWorldRotation.transQuat(); + + LLVector3 old_position_local = object->getPosition(); + LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); + + //RN: I forget, but we need to do this because of snapping which doesn't often result + // in position changes even when the mouse moves + object->setPosition(new_position_local); + rebuild(object); + gAgentAvatarp->clampAttachmentPositions(); + new_position_local = object->getPosition(); + + if (selectNode->mIndividualSelection) + { + // counter-translate child objects if we are moving the root as an individual + object->resetChildrenPosition(old_position_local - new_position_local, true); + } } } else From 17ff1613f1640ce9f10ebb7a67e905017a7e379c Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Nov 2025 01:58:19 +1000 Subject: [PATCH 04/13] [FIRE-36091] Fix crash in updateDistance updating LOD on null mVObjp Merged upstream in SLViewer PR#4988 --- indra/newview/lldrawable.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index e85358f6cc..855e6b30b6 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -938,7 +938,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } return; } } @@ -949,7 +952,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) pos -= camera.getOrigin(); mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } } } From edcfa9e3c18cbc9338554eb8b710d8e82f175606 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Nov 2025 16:53:10 +1000 Subject: [PATCH 05/13] [FIRE-36091] Follow-up null checks on mVObjp to prevent crashes Merged upstream in SLViewer PR#4996 --- indra/newview/lldrawable.cpp | 5 +++++ indra/newview/llface.h | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llvograss.cpp | 2 +- indra/newview/pipeline.cpp | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 855e6b30b6..4d6c296166 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -967,6 +967,11 @@ void LLDrawable::updateTexture() return; } + if (!mVObjp) + { + return; + } + if (getNumFaces() != mVObjp->getNumTEs()) { //drawable is transitioning its face count return; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index febb367d1b..4b6c2a9d50 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -133,7 +133,7 @@ public: void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; } void setWorldMatrix(const LLMatrix4& mat); - const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); } + const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; } LLFacePool* getPool() const { return mDrawPoolp; } U32 getPoolType() const { return mPoolType; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 81a9138939..98b854dc51 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -7459,7 +7459,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender void LLStaticViewerObject::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index db37563e14..c133f1f5d2 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -781,7 +781,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group) void LLVOGrass::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 597ba16f13..cc4bdbd771 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3093,7 +3093,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - if (!drawablep || drawablep->isDead()) + if (!drawablep || drawablep->isDead() || !drawablep->getVObj()) { return; } @@ -3127,7 +3127,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) iter != mShiftList.end(); iter++) { LLDrawable *drawablep = *iter; - if (drawablep->isDead()) + if (drawablep->isDead() || !drawablep->getVObj()) { continue; } From 218276893b6260ec8230e5ae9463fe4ae1ba7ce0 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 13 Nov 2025 19:39:40 +0100 Subject: [PATCH 06/13] Translate the 'favourite' title for inventory finder floater in all applicable languages Signed-off-by: PanteraPolnocy --- indra/newview/skins/default/xui/az/strings.xml | 3 +++ indra/newview/skins/default/xui/de/strings.xml | 3 +++ indra/newview/skins/default/xui/fr/strings.xml | 3 +++ indra/newview/skins/default/xui/it/strings.xml | 3 +++ indra/newview/skins/default/xui/ja/strings.xml | 1 + indra/newview/skins/default/xui/pl/strings.xml | 3 +++ indra/newview/skins/default/xui/ru/strings.xml | 3 +++ indra/newview/skins/default/xui/zh/strings.xml | 3 +++ 8 files changed, 22 insertions(+) diff --git a/indra/newview/skins/default/xui/az/strings.xml b/indra/newview/skins/default/xui/az/strings.xml index ce90cacad2..04e1f9e83b 100644 --- a/indra/newview/skins/default/xui/az/strings.xml +++ b/indra/newview/skins/default/xui/az/strings.xml @@ -6697,6 +6697,9 @@ Yerləşməniz: [AVATAR_POS] Daşınan əşyalar + + Sevimlilərim + [NAME] adlı qrup üzvü diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 949726a1ea..5f2cb86f03 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -7203,6 +7203,9 @@ Ihre aktuelle Position: [AVATAR_POS] Angezogene Objekte + + Favoriten + Ein Gruppenmitglied namens [NAME] diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 1d6a09c50c..061309ac1f 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -7076,6 +7076,9 @@ Votre position actuelle : [AVATAR_POS] Eléments portés + + Mes Favoris + Un membre du groupe nommé [NAME] diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 303d09e3bc..30a021414b 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -6615,6 +6615,9 @@ Assistenza nel sito SecondLife.com e segnala il problema. Indossati + + Preferiti + Un membro del gruppo di nome [NAME] diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index 9c9d611627..0d66735dcb 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -6527,6 +6527,7 @@ Rez時間:[OBJECT_REZ_TIME] 全てのアイテム 最近のアイテム 着用中 + お気に入り [NAME]というグループメンバー名 (オンライン) diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 46f39a575c..ab99e80cb4 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -6576,6 +6576,9 @@ Twoja aktualna pozycja: [AVATAR_POS] Założone + + Ulubione + Osoba z grupy o imieniu [NAME] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 545ca2b8c2..04d8394794 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -6821,6 +6821,9 @@ ID объекта: [INSPECTING_KEY] Надетые предметы + + Избранные + Член группы по имени [NAME] diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index 90fe8ca8c6..5296088f08 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -7422,6 +7422,9 @@ SecondLife.com網站的「支援」部分 已穿物件 + + 收藏 + 群組成員名 [NAME] From 115aca2a4fb9b41483e12232821b524797184d80 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Sat, 15 Nov 2025 02:28:46 +1000 Subject: [PATCH 07/13] [FIRE-36102] Fix the cache from being cleared every launch if NewCacheLocation is invalid --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 300e835128..b0e3a24906 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5199,6 +5199,8 @@ bool LLAppViewer::initCache() LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; gSavedSettings.setString("CacheLocation", ""); gSavedSettings.setString("CacheLocationTopFolder", ""); + gSavedSettings.setString("NewCacheLocation", ""); + gSavedSettings.setString("NewCacheLocationTopFolder", ""); } // Sound cache From 11c76817cb6b7d2d09fcc21c83453946bed38547 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 16 Nov 2025 03:01:24 +0100 Subject: [PATCH 08/13] FIRE-36089 Connect bottom gear menu button to the gear menu, in Wearing tab, in Outfits window Signed-off-by: PanteraPolnocy --- indra/newview/llpanelwearing.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 8001c4c6e0..86ffc84054 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -305,6 +305,14 @@ bool LLPanelWearing::postBuild() // Show avatar complexity in appearance floater mAvatarComplexityLabel = getChild("avatar_complexity_label"); + // FIRE-36089: Connect bottom gear menu button to the gear menu + LLMenuButton* gear_btn = findChild("options_gear_btn"); + if (gear_btn) + { + gear_btn->setMenu(mGearMenu->getMenu()); + } + // + return true; } From d1b45eabc9863276200ba891c1f227e9776ded5c Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 16 Nov 2025 14:45:31 +0100 Subject: [PATCH 09/13] FIRE-36059 Optional custom script inserted into prim when pressing the "New Script" Translators: Custom script checkbox, item drop target, display text and new preferences tab header Signed-off-by: PanteraPolnocy --- .../app_settings/settings_per_account.xml | 24 + indra/newview/fspanelprefs.cpp | 38 ++ indra/newview/fspanelprefs.h | 3 + indra/newview/llpanelcontents.cpp | 18 + .../xui/az/panel_preferences_firestorm.xml | 58 +-- .../xui/de/panel_preferences_firestorm.xml | 63 +-- .../xui/en/panel_preferences_firestorm.xml | 464 +++++++++++------- .../xui/es/panel_preferences_firestorm.xml | 22 +- .../xui/fr/panel_preferences_firestorm.xml | 36 +- .../xui/it/panel_preferences_firestorm.xml | 46 +- .../xui/ja/panel_preferences_firestorm.xml | 54 +- .../xui/pl/panel_preferences_firestorm.xml | 55 ++- .../xui/ru/panel_preferences_firestorm.xml | 58 +-- .../xui/zh/panel_preferences_firestorm.xml | 50 +- 14 files changed, 595 insertions(+), 394 deletions(-) diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 4193a4edca..1641ec6b89 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1141,6 +1141,30 @@ Value + FSBuildPrefs_UseCustomScript + + Comment + Use custom script template when clicking New Script button + Persist + 1 + Type + Boolean + Value + 0 + + FSBuildPrefs_CustomScriptItem + + HideFromEditor + 1 + Comment + Script UUID to use as template for New Script button + Persist + 1 + Type + String + Value + + FSllOwnerSayToScriptDebugWindow Comment diff --git a/indra/newview/fspanelprefs.cpp b/indra/newview/fspanelprefs.cpp index 8ddf3fe0e6..a27984ad5f 100644 --- a/indra/newview/fspanelprefs.cpp +++ b/indra/newview/fspanelprefs.cpp @@ -49,6 +49,7 @@ FSPanelPrefs::FSPanelPrefs() : LLPanelPreference() mCommitCallbackRegistrar.add("Perms.Trans", boost::bind(&FSPanelPrefs::onCommitTrans, this)); mEmbeddedItem = gSavedPerAccountSettings.getString("FSBuildPrefs_Item"); + mCustomScriptItem = gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem"); } bool FSPanelPrefs::postBuild() @@ -75,6 +76,9 @@ bool FSPanelPrefs::postBuild() mInvDropTarget = getChild("embed_item"); mInvDropTarget->setDADCallback(boost::bind(&FSPanelPrefs::onDADEmbeddedItem, this, _1)); + mCustomScriptDropTarget = getChild("custom_script"); + mCustomScriptDropTarget->setDADCallback(boost::bind(&FSPanelPrefs::onDADCustomScript, this, _1)); + return LLPanelPreference::postBuild(); } @@ -101,12 +105,35 @@ void FSPanelPrefs::onOpen(const LLSD& key) getChild("build_item_add_disp_rect_txt")->setTextArg("[ITEM]", getString("EmbeddedItemNotAvailable")); } } + + getChild("FSBuildPrefs_UseCustomScript")->setEnabled(true); + mCustomScriptItem = gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem"); + LLUUID script_id(mCustomScriptItem); + if (script_id.isNull()) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotSet")); + } + else + { + LLInventoryObject* script = gInventory.getObject(script_id); + if (script) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", script->getName()); + } + else + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotAvailable")); + } + } + getChild("reset_default_folders")->setEnabled(true); } else { getChild("FSBuildPrefs_EmbedItem")->setEnabled(false); getChild("build_item_add_disp_rect_txt")->setTextArg("[ITEM]", getString("EmbeddedItemNotLoggedIn")); + getChild("FSBuildPrefs_UseCustomScript")->setEnabled(false); + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotLoggedIn")); getChild("reset_default_folders")->setEnabled(false); } } @@ -118,6 +145,7 @@ void FSPanelPrefs::apply() if (LLStartUp::getStartupState() == STATE_STARTED) { gSavedPerAccountSettings.setString("FSBuildPrefs_Item", mEmbeddedItem); + gSavedPerAccountSettings.setString("FSBuildPrefs_CustomScriptItem", mCustomScriptItem); } } @@ -277,6 +305,16 @@ void FSPanelPrefs::onDADEmbeddedItem(const LLUUID& item_id) } } +void FSPanelPrefs::onDADCustomScript(const LLUUID& item_id) +{ + LLInventoryObject* item = gInventory.getObject(item_id); + if (item && item->getType() == LLAssetType::AT_LSL_TEXT) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", item->getName()); + mCustomScriptItem = item_id.asString(); + } +} + void FSPanelPrefs::onResetDefaultFolders() { gSavedPerAccountSettings.getControl("ModelUploadFolder")->resetToDefault(true); diff --git a/indra/newview/fspanelprefs.h b/indra/newview/fspanelprefs.h index e0f37d880a..a349314101 100644 --- a/indra/newview/fspanelprefs.h +++ b/indra/newview/fspanelprefs.h @@ -55,11 +55,14 @@ private: void onCommitTrans(); void onDADEmbeddedItem(const LLUUID& item_id); + void onDADCustomScript(const LLUUID& item_id); void onResetDefaultFolders(); FSEmbeddedItemDropTarget* mInvDropTarget; + FSEmbeddedItemDropTarget* mCustomScriptDropTarget; std::string mEmbeddedItem; + std::string mCustomScriptItem; }; #endif // FS_PANELPREFS_H diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 82ccca2600..a593e7b375 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -52,8 +52,10 @@ #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" +#include "lltooldraganddrop.h" // For custom script template #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewercontrol.h" // For custom script template #include "llviewerinventory.h" #include "llviewermenu.h" // Script reset in edit floater #include "llviewerobject.h" @@ -280,6 +282,22 @@ void LLPanelContents::onClickNewScript(void *userdata) } // [/RLVa:KB] + // FIRE-36059 Optional custom script template for New Script button + if (gSavedPerAccountSettings.getBOOL("FSBuildPrefs_UseCustomScript")) + { + LLUUID custom_script_id(gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem")); + if (custom_script_id.notNull()) + { + LLInventoryItem* custom_script = dynamic_cast(gInventory.getObject(custom_script_id)); + if (custom_script && custom_script->getType() == LLAssetType::AT_LSL_TEXT) + { + LLToolDragAndDrop::dropScript(object, custom_script, true, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); + return; + } + } + } + // + LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); diff --git a/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml index 7dc384fefa..1d6de6043c 100644 --- a/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml @@ -165,33 +165,6 @@ + + - - - - Script Editor Font: - - - - - - - - - - - - - - - - - - - - - - Preprocessor include path: - - - - - External Editor: - - - @@ -1608,14 +1516,6 @@ tool_tip="When checked, object for sale info is saved on change instead of requiring a confirm." name="FSCommitForSaleOnChange_toggle" control_name="FSCommitForSaleOnChange"/> - + + + + Script Editor Font: + + + + + + + + + + + + + + + + + + + + + + + + + Preprocessor include path: + + + + + External Editor: + + + + + - - - - - - - Ruta include del preprocesador: - - + + + + + + + + + Constrain rotations to multiples of + + + + degrees, when not using 'snap to grid' + + + + + objects + + + + - - - - - - - - Constrain rotations to multiples of - - - - degrees, when not using 'snap to grid' - - - - - objects - - - - Actualmente establecido a: [ITEM] + + + Drop a script here. + + + Actualmente establecido a: [SCRIPT] + + + + + Punto de pivotaje - @@ -140,10 +150,6 @@ - - - - diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/fr/panel_preferences_firestorm.xml index e8affbbf45..6547e65c95 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_firestorm.xml @@ -111,15 +111,10 @@ Glissez un objet ici. Actuellement : [ITEM] - Point de pivot - - - - - + + Drop a script here. + Actuellement: [SCRIPT]