From eb0bafc33a323296001bfa6b6a97f0c32b17b63f Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:57:49 -0700 Subject: [PATCH 01/16] Backport fix for secondlife/viewer#1856 Add error handling for intel crashes from GLTF Scene shader (#2456) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/gltfscenemanager.cpp | 8 ++++++++ indra/newview/llviewermenu.cpp | 15 +++++++++++++-- indra/newview/llviewershadermgr.cpp | 9 ++++++++- .../skins/default/xui/en/notifications.xml | 10 ++++++++++ 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 219901ae78..148bf7f718 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10484,6 +10484,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + RenderCanUseGLTFPBROpaqueShaders + + Comment + Hardware has support for GLTF scene shaders + Persist + 0 + Type + Boolean + Value + 1 + RenderClass1MemoryBandwidth Comment diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 318e765cdb..611162485c 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -44,6 +44,7 @@ #include "llfloaterperms.h" #include "llagentbenefits.h" #include "llfilesystem.h" +#include "llviewercontrol.h" #include "boost/json.hpp" #define GLTF_SIM_SUPPORT 1 @@ -597,6 +598,13 @@ void GLTFSceneManager::render(Asset& asset, U8 variant) { LL_PROFILE_ZONE_SCOPED_CATEGORY_GLTF; + static LLCachedControl can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + if (!can_use_shaders) + { + // user should already have been notified of unsupported hardware + return; + } + for (U32 ds = 0; ds < 2; ++ds) { RenderData& rd = asset.mRenderData[ds]; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4abad087ff..f9c66a64a6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4014,7 +4014,9 @@ bool enable_os_exception() bool enable_gltf() { static LLCachedControl enablegltf(gSavedSettings, "GLTFEnabled", false); - return enablegltf; + static LLCachedControl can_use(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + + return enablegltf && can_use; } bool enable_gltf_save_as() @@ -10102,7 +10104,16 @@ class LLAdvancedClickGLTFOpen: public view_listener_t { bool handleEvent(const LLSD& userdata) { - LL::GLTFSceneManager::instance().load(); + static LLCachedControl can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + if (can_use_shaders) + { + LL::GLTFSceneManager::instance().load(); + } + else + { + LLNotificationsUtil::add("NoSupportGLTFShader"); + } + return true; } }; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 266dd5e409..16da555351 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1344,7 +1344,14 @@ bool LLViewerShaderMgr::loadShadersDeferred() success = make_gltf_variants(gGLTFPBRMetallicRoughnessProgram, use_sun_shadow); - llassert(success); + //llassert(success); + if (!success) + { + LL_WARNS() << "Failed to create GLTF PBR Metallic Roughness Shader, disabling!" << LL_ENDL; + gSavedSettings.setBOOL("RenderCanUseGLTFPBROpaqueShaders", false); + // continue as if this shader never happened + success = true; + } } if (success) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b31b06efad..7e691a0f9e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -14474,6 +14474,16 @@ This will replace the items in the selected outfit with the items you are wearin yestext="OK"/> + + GLTF scenes are not yet supported on your graphics hardware. + fail + + Date: Thu, 5 Sep 2024 15:48:48 +0200 Subject: [PATCH 02/16] Adding this translation for the 3rd time now... --- indra/newview/skins/default/xui/de/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index da01c7c979..9bc1a13c73 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5113,6 +5113,10 @@ Möchten Sie fortfahren? Upload wird gerade durchgeführt. Bitte versuchen Sie es später erneut. + + GLTF-Szenen werden auf Ihrer Hardware momentan noch nicht unterstützt. + + Keine gültige Einstellung für die Umgebung ausgewählt. From df60c3dd488cc693c50de548e0ecd8e0464e1416 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:57:49 -0700 Subject: [PATCH 03/16] Backport fix for secondlife/viewer#1856 Add error handling for intel crashes from GLTF Scene shader (#2456) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/gltfscenemanager.cpp | 8 ++++++++ indra/newview/llviewermenu.cpp | 15 +++++++++++++-- indra/newview/llviewershadermgr.cpp | 9 ++++++++- .../skins/default/xui/en/notifications.xml | 10 ++++++++++ 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 219901ae78..148bf7f718 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10484,6 +10484,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + RenderCanUseGLTFPBROpaqueShaders + + Comment + Hardware has support for GLTF scene shaders + Persist + 0 + Type + Boolean + Value + 1 + RenderClass1MemoryBandwidth Comment diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 318e765cdb..611162485c 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -44,6 +44,7 @@ #include "llfloaterperms.h" #include "llagentbenefits.h" #include "llfilesystem.h" +#include "llviewercontrol.h" #include "boost/json.hpp" #define GLTF_SIM_SUPPORT 1 @@ -597,6 +598,13 @@ void GLTFSceneManager::render(Asset& asset, U8 variant) { LL_PROFILE_ZONE_SCOPED_CATEGORY_GLTF; + static LLCachedControl can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + if (!can_use_shaders) + { + // user should already have been notified of unsupported hardware + return; + } + for (U32 ds = 0; ds < 2; ++ds) { RenderData& rd = asset.mRenderData[ds]; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9aaa34d03a..62a8553d8b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4014,7 +4014,9 @@ bool enable_os_exception() bool enable_gltf() { static LLCachedControl enablegltf(gSavedSettings, "GLTFEnabled", false); - return enablegltf; + static LLCachedControl can_use(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + + return enablegltf && can_use; } bool enable_gltf_save_as() @@ -10102,7 +10104,16 @@ class LLAdvancedClickGLTFOpen: public view_listener_t { bool handleEvent(const LLSD& userdata) { - LL::GLTFSceneManager::instance().load(); + static LLCachedControl can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + if (can_use_shaders) + { + LL::GLTFSceneManager::instance().load(); + } + else + { + LLNotificationsUtil::add("NoSupportGLTFShader"); + } + return true; } }; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 266dd5e409..16da555351 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1344,7 +1344,14 @@ bool LLViewerShaderMgr::loadShadersDeferred() success = make_gltf_variants(gGLTFPBRMetallicRoughnessProgram, use_sun_shadow); - llassert(success); + //llassert(success); + if (!success) + { + LL_WARNS() << "Failed to create GLTF PBR Metallic Roughness Shader, disabling!" << LL_ENDL; + gSavedSettings.setBOOL("RenderCanUseGLTFPBROpaqueShaders", false); + // continue as if this shader never happened + success = true; + } } if (success) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b31b06efad..7e691a0f9e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -14474,6 +14474,16 @@ This will replace the items in the selected outfit with the items you are wearin yestext="OK"/> + + GLTF scenes are not yet supported on your graphics hardware. + fail + + Date: Thu, 5 Sep 2024 18:47:36 +0200 Subject: [PATCH 04/16] Apply some VRAM detection changes from DeltaFPS --- indra/llrender/llgl.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 09252cd167..ff87f0407e 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1188,7 +1188,7 @@ bool LLGLManager::initGL() // U32 old_vram = mVRAM; // mVRAM = 0; -#if LL_WINDOWS +#if 0 //LL_WINDOWS Special handling down below if (mHasAMDAssociations) { GLuint gl_gpus_count = wglGetGPUIDsAMD(0, 0); @@ -1249,6 +1249,32 @@ bool LLGLManager::initGL() LL_INFOS("RenderInit") << "VRAM Detected (NVXMemInfo):" << mVRAM << LL_ENDL; } + if (mHasAMDAssociations && mVRAM == 0) + { + GLuint gl_gpus_count = wglGetGPUIDsAMD(0, 0); + if (gl_gpus_count > 0) + { + GLuint* ids = new GLuint[gl_gpus_count]; + wglGetGPUIDsAMD(gl_gpus_count, ids); + + GLuint mem_mb = 0; + for (U32 i = 0; i < gl_gpus_count; i++) + { + wglGetGPUInfoAMD(ids[i], + WGL_GPU_RAM_AMD, + GL_UNSIGNED_INT, + sizeof(GLuint), + &mem_mb); + if (mVRAM < mem_mb) + { + // basically pick the best AMD and trust driver/OS to know to switch + mVRAM = mem_mb; + } + } + } + LL_INFOS("RenderInit") << "VRAM Detected (AMDAssociations):" << mVRAM << LL_ENDL; + } + if (mHasATIMemInfo && mVRAM == 0) { //ask the gl how much vram is free at startup and attempt to use no more than half of that S32 meminfo[4]; From 1f477be2cef1ee96e2f01a5d704ac6e41750f6ba Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 5 Sep 2024 21:08:09 +0200 Subject: [PATCH 05/16] In or out? Just throw it out! :) --- indra/llwindow/llwindowwin32.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 6e26ebd3ad..b9ed1e1017 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1662,9 +1662,6 @@ const S32 max_format = (S32)num_formats - 1; close(); return false; } - //LL_PROFILER_GPU_CONTEXT; TODO(Beq) review this - - LL_PROFILER_GPU_CONTEXT // Disable vertical sync for swap toggleVSync(enable_vsync); From c29a856d7c6b7b3fa32e1b4d6e9afbdfb934a9ae Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 5 Sep 2024 22:41:44 +0200 Subject: [PATCH 06/16] Updated Polish translation --- indra/newview/skins/default/xui/pl/notifications.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index 7df17bbe3a..1060339de1 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -5411,6 +5411,9 @@ Czy chcesz kontynuować? Przesyłanie jest obecnie w toku. Spróbuj ponownie później. + + Sceny GLTF nie są jeszcze obsługiwane przez Twoją kartę graficzną. + Zamierzasz włączyć funkcję AutoFPS. Wszystkie niezapisane ustawienia grafiki zostaną utracone. From 100dfdc7363a72fa7daded697ba77bb02b3d852d Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 5 Sep 2024 22:43:42 +0200 Subject: [PATCH 07/16] FIRE-34475 Russian translation update, by Romka Swallowtail --- .../skins/default/xui/ru/notifications.xml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index e7a4c3479c..d679bae20a 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -5539,8 +5539,38 @@ https://wiki.firestormviewer.org/fs_voice - - Вы должны выбрать объект, который будет действовать как дескриптор просматриваемого вами ресурса GLTF. + + Необходимо выбрать объект, который будет использоваться в качестве дескриптора для просматриваемого вами актива GLTF. + + + + + Не удалось загрузить файл GLTF. Подробности см. в журнале. + + + + + Не удалось сохранить файл GLTF. Подробности см. в журнале. + + + + + Необходимо выбрать объект, с которым связан актив GLTF. + + + + + Необходимо выбрать объект, с которым связан только локальный актив GLTF. + + + + + Загрузка в данный момент выполняется. Повторите попытку позже. + + + + + Сцены GLTF пока не поддерживаются на вашем графическом оборудовании. From bb4385bf0fbe56dc45a92d7d89b8f1e71ab92f18 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 6 Sep 2024 02:34:27 +0200 Subject: [PATCH 08/16] Looks like this only exists on Windows --- indra/llrender/llgl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index ff87f0407e..e1b0642953 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1249,6 +1249,7 @@ bool LLGLManager::initGL() LL_INFOS("RenderInit") << "VRAM Detected (NVXMemInfo):" << mVRAM << LL_ENDL; } +#ifdef LL_WINDOWS if (mHasAMDAssociations && mVRAM == 0) { GLuint gl_gpus_count = wglGetGPUIDsAMD(0, 0); @@ -1274,6 +1275,7 @@ bool LLGLManager::initGL() } LL_INFOS("RenderInit") << "VRAM Detected (AMDAssociations):" << mVRAM << LL_ENDL; } +#endif if (mHasATIMemInfo && mVRAM == 0) { //ask the gl how much vram is free at startup and attempt to use no more than half of that From 8c4c9fbe96fce74b9c4f8f4813130f543a49e1cc Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 6 Sep 2024 14:29:02 +0200 Subject: [PATCH 09/16] Put everything in FSCommon into the namespace with the same name --- indra/newview/NACLfloaterexploresounds.cpp | 2 +- indra/newview/chatbar_as_cmdline.cpp | 276 ++++++++++----------- indra/newview/fschathistory.cpp | 2 +- indra/newview/fscommon.cpp | 8 +- indra/newview/fscommon.h | 14 +- indra/newview/fsconsoleutils.cpp | 6 +- indra/newview/fsfloaterim.cpp | 2 +- indra/newview/fskeywords.cpp | 2 +- indra/newview/fslslbridge.cpp | 50 ++-- indra/newview/fsradar.cpp | 16 +- indra/newview/growlmanager.cpp | 4 +- indra/newview/lggbeammaps.cpp | 8 +- indra/newview/llagentcamera.cpp | 4 +- indra/newview/llenvironment.cpp | 12 +- indra/newview/llimprocessing.cpp | 4 +- indra/newview/llimview.cpp | 6 +- indra/newview/llmutelist.cpp | 4 +- indra/newview/llnetmap.cpp | 2 +- indra/newview/llstartup.cpp | 14 +- indra/newview/lltoastimpanel.cpp | 2 +- indra/newview/llviewermenu.cpp | 18 +- indra/newview/llviewermessage.cpp | 16 +- indra/newview/llviewerparcelmedia.cpp | 28 +-- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatar.cpp | 4 +- indra/newview/streamtitledisplay.cpp | 2 +- 26 files changed, 254 insertions(+), 254 deletions(-) diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index c90a4c7562..a58695824b 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -252,7 +252,7 @@ bool NACLFloaterExploreSounds::tick() { LLStringUtil::format_map_t format_args; format_args["TIME"] = llformat("%.1f", static_cast((LLTimer::getElapsedSeconds() - item.mTimeStopped) / 60.0)); - playing_column["value"] = format_string(str_not_playing, format_args); + playing_column["value"] = FSCommon::format_string(str_not_playing, format_args); } LLSD& type_column = element["columns"][1]; diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index a62d4da495..e5005b41c9 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -103,22 +103,22 @@ public: doZdCleanup(); if (mErrorCode == 1) { - report_to_nearby_chat(llformat("The object with the UUID of \"%s\" can no longer be found in-world.", mDropUUID.c_str())); - report_to_nearby_chat("This can occur if the object was returned or deleted, or if your client is no longer rendering it."); - report_to_nearby_chat(llformat("Transfer from \"%s\" to \"%s\" aborted.", mFolderName.c_str(), mDropUUID.c_str())); + FSCommon::report_to_nearby_chat(llformat("The object with the UUID of \"%s\" can no longer be found in-world.", mDropUUID.c_str())); + FSCommon::report_to_nearby_chat("This can occur if the object was returned or deleted, or if your client is no longer rendering it."); + FSCommon::report_to_nearby_chat(llformat("Transfer from \"%s\" to \"%s\" aborted.", mFolderName.c_str(), mDropUUID.c_str())); } else { if (mPackage) { - report_to_nearby_chat("Packager finished, you may now pick up the prim that contains the objects."); - report_to_nearby_chat(llformat("Packaged what you had selected in world into the folder \"%s\" in your inventory and into the prim with the UUID of \"%s\"", mFolderName.c_str(), mDropUUID.c_str())); - report_to_nearby_chat("Don't worry if you look at the contents of package right now, it may show as empty, it isn't, it's just a bug with Second Life itself."); - report_to_nearby_chat("If you take it into your inventory then rez it back out, all the contents will be there."); + FSCommon::report_to_nearby_chat("Packager finished, you may now pick up the prim that contains the objects."); + FSCommon::report_to_nearby_chat(llformat("Packaged what you had selected in world into the folder \"%s\" in your inventory and into the prim with the UUID of \"%s\"", mFolderName.c_str(), mDropUUID.c_str())); + FSCommon::report_to_nearby_chat("Don't worry if you look at the contents of package right now, it may show as empty, it isn't, it's just a bug with Second Life itself."); + FSCommon::report_to_nearby_chat("If you take it into your inventory then rez it back out, all the contents will be there."); } else { - report_to_nearby_chat(llformat("Completed transfer from \"%s\" to \"%s\".", mFolderName.c_str(), mDropUUID.c_str())); + FSCommon::report_to_nearby_chat(llformat("Completed transfer from \"%s\" to \"%s\".", mFolderName.c_str(), mDropUUID.c_str())); } } } @@ -130,7 +130,7 @@ public: LLViewerObject* objectp = gObjectList.findObject(mDestination); if (objectp) { - report_to_nearby_chat(std::string("Transferring ") + subj->getName()); + FSCommon::report_to_nearby_chat(std::string("Transferring ") + subj->getName()); LLToolDragAndDrop::dropInventory(objectp, subj, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); if (mStack.size() > 0) { @@ -218,11 +218,11 @@ public: if (mPackage) { - report_to_nearby_chat("Packager started. Phase 1 (taking in-world objects into inventory) starting in: "); + FSCommon::report_to_nearby_chat("Packager started. Phase 1 (taking in-world objects into inventory) starting in: "); } else { - report_to_nearby_chat("Ztake activated. Taking selected in-world objects into inventory in: "); + FSCommon::report_to_nearby_chat("Ztake activated. Taking selected in-world objects into inventory in: "); } } @@ -230,7 +230,7 @@ public: { if (!mPackage) { - report_to_nearby_chat("Ztake deactivated."); + FSCommon::report_to_nearby_chat("Ztake deactivated."); } } @@ -239,7 +239,7 @@ public: switch (mState) { case ZTS_COUNTDOWN: - report_to_nearby_chat(llformat("%i...", mCountdown--)); + FSCommon::report_to_nearby_chat(llformat("%i...", mCountdown--)); if (mCountdown == 0) mState = ZTS_SELECTION; break; @@ -301,25 +301,25 @@ public: } else { - report_to_nearby_chat("Ktake has taken all selected objects."); + FSCommon::report_to_nearby_chat("Ktake has taken all selected objects."); doZtCleanup(); mState = ZTS_DONE; } } else { - report_to_nearby_chat("Ztake has taken all selected objects. Say \"ztake off\" to deactivate ztake or select more objects to continue."); + FSCommon::report_to_nearby_chat("Ztake has taken all selected objects. Say \"ztake off\" to deactivate ztake or select more objects to continue."); } } else { if (mPackage) { - report_to_nearby_chat(llformat("Packager: %i objects left to take.", mToTake.size())); + FSCommon::report_to_nearby_chat(llformat("Packager: %i objects left to take.", mToTake.size())); } else { - report_to_nearby_chat(llformat("Ztake: %i objects left to take.", mToTake.size())); + FSCommon::report_to_nearby_chat(llformat("Ztake: %i objects left to take.", mToTake.size())); } } } @@ -328,12 +328,12 @@ public: { if (mPackage) { - report_to_nearby_chat(llformat("Packager: no objects to take.")); + FSCommon::report_to_nearby_chat(llformat("Packager: no objects to take.")); doZtCleanup(); } else { - report_to_nearby_chat(llformat("Ztake: no objects to take.")); + FSCommon::report_to_nearby_chat(llformat("Ztake: no objects to take.")); } } break; @@ -354,14 +354,14 @@ public: { if (itemstack.size() < mPackSize) { - report_to_nearby_chat("Phase 1 of the packager finished, but some items mave have been missed."); + FSCommon::report_to_nearby_chat("Phase 1 of the packager finished, but some items mave have been missed."); } else { - report_to_nearby_chat("Phase 1 of the packager finished."); + FSCommon::report_to_nearby_chat("Phase 1 of the packager finished."); } - report_to_nearby_chat("Do not have the destination prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); + FSCommon::report_to_nearby_chat("Do not have the destination prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); LLUUID sdest{ mPackageDest }; gZDrop = new JCZdrop(itemstack, sdest, mFolderName.c_str(), mPackageDest.asString().c_str(), true); @@ -427,12 +427,12 @@ public: mRunning(false), mCountdown(5) { - report_to_nearby_chat("Mtake activated. Taking selected in-world objects into inventory in: "); + FSCommon::report_to_nearby_chat("Mtake activated. Taking selected in-world objects into inventory in: "); } ~TMZtake() { - report_to_nearby_chat("Mtake deactivated."); + FSCommon::report_to_nearby_chat("Mtake deactivated."); } bool tick() @@ -476,7 +476,7 @@ public: } if (mCountdown > 0) { - report_to_nearby_chat(llformat("%i...", mCountdown--)); + FSCommon::report_to_nearby_chat(llformat("%i...", mCountdown--)); } else if (!mToTake.empty()) { @@ -502,11 +502,11 @@ public: { if (mToTake.empty()) { - report_to_nearby_chat("Mtake has taken all selected objects. Say \"mtake off\" to deactivate Mtake or select more objects to continue."); + FSCommon::report_to_nearby_chat("Mtake has taken all selected objects. Say \"mtake off\" to deactivate Mtake or select more objects to continue."); } else { - report_to_nearby_chat(llformat("Mtake: %i objects left to take.", mToTake.size())); + FSCommon::report_to_nearby_chat(llformat("Mtake: %i objects left to take.", mToTake.size())); } } } @@ -539,7 +539,7 @@ static void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) { name = RlvStrings::getAnonym(av_name); } - report_to_nearby_chat(llformat("%s: (%s)", id.asString().c_str(), name.c_str())); + FSCommon::report_to_nearby_chat(llformat("%s: (%s)", id.asString().c_str(), name.c_str())); } bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gesture) @@ -597,7 +597,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (from_gesture) { - report_to_nearby_chat(LLTrans::getString("DrawDistanceSteppingGestureObsolete")); + FSCommon::report_to_nearby_chat(LLTrans::getString("DrawDistanceSteppingGestureObsolete")); gSavedSettings.setBOOL("FSRenderFarClipStepping", true); return false; } @@ -608,7 +608,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest gAgentCamera.mDrawDistance = drawDist; LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%.0f", drawDist); - report_to_nearby_chat(LLTrans::getString("FSCmdLineDrawDistanceSet", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineDrawDistanceSet", args)); return false; } } @@ -669,7 +669,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest std::string bw_cmd_respond; args["[VALUE]"] = llformat ("%d", band_width); bw_cmd_respond = LLTrans::getString("FSCmdLineRSP", args); - report_to_nearby_chat(bw_cmd_respond); + FSCommon::report_to_nearby_chat(bw_cmd_respond); return false; } } @@ -688,7 +688,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest // send appropriate enable/disable messages to nearby chat - FIRE-24160 if (!aoWasEnabled) { - report_to_nearby_chat(LLTrans::getString("FSAOEnabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSAOEnabled")); } } else if (status == "off") @@ -698,7 +698,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest // send appropriate enable/disable messages to nearby chat - FIRE-24160 if (aoWasEnabled) { - report_to_nearby_chat(LLTrans::getString("FSAODisabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSAODisabled")); } } else if (status == "sit") @@ -742,7 +742,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (!myObject) { - report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); + FSCommon::report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); return false; } @@ -782,7 +782,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest msg->addVector3("Normal", LLVector3::zero); msg->addVector3("Binormal", LLVector3::zero); msg->sendMessage(myObject->getRegion()->getHost()); - report_to_nearby_chat(llformat("Touched object with key %s", target_key.asString().c_str())); + FSCommon::report_to_nearby_chat(llformat("Touched object with key %s", target_key.asString().c_str())); } } return false; @@ -796,7 +796,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (!myObject) { - report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); + FSCommon::report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); return false; } if ((!RlvActions::isRlvEnabled()) || (RlvActions::canSit(myObject, LLVector3::zero))) @@ -811,7 +811,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest msg->addVector3Fast(_PREHASH_Offset, LLVector3::zero); gAgent.getRegion()->sendReliableMessage(); - report_to_nearby_chat(llformat("Sat on object with key %s", target_key.asString().c_str())); + FSCommon::report_to_nearby_chat(llformat("Sat on object with key %s", target_key.asString().c_str())); } } return false; @@ -821,7 +821,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if ( (!RlvActions::isRlvEnabled()) || (RlvActions::canStand()) ) { gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - report_to_nearby_chat(std::string("Standing up")); + FSCommon::report_to_nearby_chat(std::string("Standing up")); } return false; } @@ -859,7 +859,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest gAgent.sendReliableMessage(); LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("agent", target_key, "inspect").getSLURLString(); - report_to_nearby_chat(LLTrans::getString("FSCmdLineTpOffered", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineTpOffered", args)); } return false; } @@ -996,7 +996,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { LLStringUtil::format_map_t args; args["RAND"] = llformat("%s", look_for.c_str()); - report_to_nearby_chat(LLTrans::getString("FSCmdLineCalcRandError", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineCalcRandError", args)); } std::string random_number_text = llformat("%d", random_number); expr.replace(random_string_pos, look_for.length(), random_number_text); @@ -1021,7 +1021,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest result_str << result; out = result_str.str(); } - report_to_nearby_chat(out); + FSCommon::report_to_nearby_chat(out); return false; } } @@ -1054,22 +1054,22 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (gZDrop) { - report_to_nearby_chat("Zdrop is already active."); + FSCommon::report_to_nearby_chat("Zdrop is already active."); } else { std::string destination; if (i >> destination) { - report_to_nearby_chat("Beginning Zdrop."); - report_to_nearby_chat("Verifying destination prim is present inworld..."); + FSCommon::report_to_nearby_chat("Beginning Zdrop."); + FSCommon::report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed and in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed and in view, and that the UUID is correct."); } else { @@ -1085,7 +1085,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLUUID folder_id = gInventory.findCategoryByName(folder); if (folder_id.notNull()) { - report_to_nearby_chat("Verifying folder location..."); + FSCommon::report_to_nearby_chat("Verifying folder location..."); std::stack inventorystack; std::vector > inventory = findInventoryInFolder(folder); for (const auto& item : inventory) @@ -1094,32 +1094,32 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } if (!inventorystack.empty()) { - report_to_nearby_chat(llformat("Found folder \"%s\".", folder.c_str())); - report_to_nearby_chat(llformat("Found prim \"%s\".", destination.c_str())); - report_to_nearby_chat(llformat("Transferring inventory items from \"%s\" to prim \"%s\".", folder.c_str(), destination.c_str())); - report_to_nearby_chat("WARNING: No-copy items will be moved to the destination prim!"); - report_to_nearby_chat("Do not have the prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); - report_to_nearby_chat("Use \"zdrop off\" to stop the transfer"); + FSCommon::report_to_nearby_chat(llformat("Found folder \"%s\".", folder.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found prim \"%s\".", destination.c_str())); + FSCommon::report_to_nearby_chat(llformat("Transferring inventory items from \"%s\" to prim \"%s\".", folder.c_str(), destination.c_str())); + FSCommon::report_to_nearby_chat("WARNING: No-copy items will be moved to the destination prim!"); + FSCommon::report_to_nearby_chat("Do not have the prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); + FSCommon::report_to_nearby_chat("Use \"zdrop off\" to stop the transfer"); LLUUID sdest = LLUUID(destination); gZDrop = new JCZdrop(inventorystack, sdest, folder.c_str(), destination.c_str()); } } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder.c_str())); - report_to_nearby_chat("Zdrop cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder.c_str())); + FSCommon::report_to_nearby_chat("Zdrop cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); - report_to_nearby_chat("Valid command: Zdrop (rezzed prim UUID) (source inventory folder name)"); + FSCommon::report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); + FSCommon::report_to_nearby_chat("Valid command: Zdrop (rezzed prim UUID) (source inventory folder name)"); } } } else { - report_to_nearby_chat("Please specify an object UUID to copy the items in this folder to."); + FSCommon::report_to_nearby_chat("Please specify an object UUID to copy the items in this folder to."); } } } @@ -1127,7 +1127,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (!gZDrop) { - report_to_nearby_chat("Zdrop is already deactivated."); + FSCommon::report_to_nearby_chat("Zdrop is already deactivated."); } else { @@ -1138,13 +1138,13 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: zdrop on (source inventory folder) (rezzed prim UUID); zdrop off", setting.c_str())); + FSCommon::report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: zdrop on (source inventory folder) (rezzed prim UUID); zdrop off", setting.c_str())); } } else { - report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); - report_to_nearby_chat("Valid commands: zdrop on (rezzed prim UUID) (source inventory folder name); zdrop off"); + FSCommon::report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); + FSCommon::report_to_nearby_chat("Valid commands: zdrop on (rezzed prim UUID) (source inventory folder name); zdrop off"); } return false; } @@ -1157,12 +1157,12 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (gZTake) { - report_to_nearby_chat("Ztake is already active."); + FSCommon::report_to_nearby_chat("Ztake is already active."); } else { - report_to_nearby_chat("Beginning Ztake."); - report_to_nearby_chat("Verifying folder location..."); + FSCommon::report_to_nearby_chat("Beginning Ztake."); + FSCommon::report_to_nearby_chat("Verifying folder location..."); std::string folder_name; std::string tmp; while (i >> tmp) @@ -1175,18 +1175,18 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); gZTake = new JCZtake(folder); } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("Ztake cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("Ztake cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } @@ -1194,7 +1194,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (!gZTake) { - report_to_nearby_chat("Ztake is already deactivated."); + FSCommon::report_to_nearby_chat("Ztake is already deactivated."); } else { @@ -1205,14 +1205,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: ztake on (destination inventory folder); ztake off", setting.c_str())); + FSCommon::report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: ztake on (destination inventory folder); ztake off", setting.c_str())); } return false; } else { - report_to_nearby_chat("The Ztake command copies selected rezzed objects into the folder you specify in your inventory."); - report_to_nearby_chat("Valid commands: ztake on (destination inventory folder name); ztake off"); + FSCommon::report_to_nearby_chat("The Ztake command copies selected rezzed objects into the folder you specify in your inventory."); + FSCommon::report_to_nearby_chat("Valid commands: ztake on (destination inventory folder name); ztake off"); } return false; } @@ -1221,14 +1221,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest std::string destination; if (i >> destination) { - report_to_nearby_chat("Verifying destination prim is present inworld..."); + FSCommon::report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1244,24 +1244,24 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); gZTake = new JCZtake(folder, true, LLUUID(destination), folder_name, (command == "cpackage") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY); } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } else { - report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + FSCommon::report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1270,14 +1270,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest std::string destination; if (i >> destination) { - report_to_nearby_chat("Verifying destination prim is present inworld..."); + FSCommon::report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1295,7 +1295,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (!LLUUID::validate(take)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); return false; } else @@ -1303,7 +1303,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLViewerObject* objectp = gObjectList.findObject(LLUUID(take)); if(!objectp) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); return false; } else @@ -1319,30 +1319,30 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (to_take.empty()) { - report_to_nearby_chat("No objects to take."); + FSCommon::report_to_nearby_chat("No objects to take."); } else { - report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); gZTake = new JCZtake(folder, true, LLUUID(destination), folder_name, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, to_take); } } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } } else { - report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + FSCommon::report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1352,14 +1352,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest std::string destination; if (i >> destination) { - report_to_nearby_chat("Verifying destination prim is present inworld..."); + FSCommon::report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1371,7 +1371,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - report_to_nearby_chat(llformat("kpackager started. Destination folder: \"%s\" Listening to object: \"%s\"", folder_name.c_str(), destination.c_str())); + FSCommon::report_to_nearby_chat(llformat("kpackager started. Destination folder: \"%s\" Listening to object: \"%s\"", folder_name.c_str(), destination.c_str())); cmd_line_mPackagerToTake.clear(); cmd_line_mPackagerTargetFolderName = folder_name; @@ -1380,20 +1380,20 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } } else { - report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + FSCommon::report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1405,7 +1405,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest cmd_line_mPackagerTargetFolderName = ""; cmd_line_mPackagerTargetFolder.setNull(); cmd_line_mPackagerDest.setNull(); - report_to_nearby_chat("Packager: Stopped and cleared."); + FSCommon::report_to_nearby_chat("Packager: Stopped and cleared."); return false; } } @@ -1426,7 +1426,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (!LLUUID::validate(take)) { - report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + FSCommon::report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); return false; } else @@ -1434,7 +1434,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLViewerObject* objectp = gObjectList.findObject(LLUUID(take)); if(!objectp) { - report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + FSCommon::report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); return false; } else @@ -1450,23 +1450,23 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (to_take.empty()) { - report_to_nearby_chat("No objects to take."); + FSCommon::report_to_nearby_chat("No objects to take."); } else { - report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); gZTake = new JCZtake(folder, true, LLUUID::null, folder_name, (command == "kcopy") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY, false, to_take); } } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } return false; @@ -1480,12 +1480,12 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (gMTake) { - report_to_nearby_chat("Mtake is already active."); + FSCommon::report_to_nearby_chat("Mtake is already active."); } else { - report_to_nearby_chat("Beginning Mtake."); - report_to_nearby_chat("Verifying folder location..."); + FSCommon::report_to_nearby_chat("Beginning Mtake."); + FSCommon::report_to_nearby_chat("Verifying folder location..."); std::string folder_name; std::string tmp; while (i >> tmp) @@ -1498,18 +1498,18 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + FSCommon::report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); gMTake = new TMZtake(folder); } else { - report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - report_to_nearby_chat("Mtake cannot work if the folder is inside another folder."); + FSCommon::report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + FSCommon::report_to_nearby_chat("Mtake cannot work if the folder is inside another folder."); } } catch (std::out_of_range&) { - report_to_nearby_chat("Please specify a destination folder in your inventory."); + FSCommon::report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } @@ -1517,7 +1517,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (!gMTake) { - report_to_nearby_chat("Mtake is already deactivated."); + FSCommon::report_to_nearby_chat("Mtake is already deactivated."); } else { @@ -1528,14 +1528,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: mtake on (destination inventory folder); mtake off", setting.c_str())); + FSCommon::report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: mtake on (destination inventory folder); mtake off", setting.c_str())); } return false; } else { - report_to_nearby_chat("The Mtake command renames selected rezzed objects to the dimensions of the prim, then copies them into the folder you specify in your inventory."); - report_to_nearby_chat("Valid commands: mtake on (destination inventory folder name); mtake off"); + FSCommon::report_to_nearby_chat("The Mtake command renames selected rezzed objects to the dimensions of the prim, then copies them into the folder you specify in your inventory."); + FSCommon::report_to_nearby_chat("Valid commands: mtake on (destination inventory folder name); mtake off"); } return false; } @@ -1555,11 +1555,11 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest LLStringUtil::format_map_t args; args["[POS]"] = cameraPositionString; - report_to_nearby_chat(LLTrans::getString("FSCameraPositionCopied", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCameraPositionCopied", args)); } else { - report_to_nearby_chat("Could not get a valid region pointer."); + FSCommon::report_to_nearby_chat("Could not get a valid region pointer."); } return false; } @@ -1597,7 +1597,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { LLStringUtil::format_map_t args; args["COMMAND"] = llformat("%s", std::string(sFSCmdLineRollDice).c_str()); - report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceModifiersInvalid", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceModifiersInvalid", args)); return false; } @@ -1613,11 +1613,11 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { result_per_die -= 1; die_penetrated = 0; - report_to_nearby_chat(llformat("#%d 1d%d-1: %d.", die_iter, faces, result_per_die)); + FSCommon::report_to_nearby_chat(llformat("#%d 1d%d-1: %d.", die_iter, faces, result_per_die)); } else { - report_to_nearby_chat(llformat("#%d 1d%d: %d.", die_iter, faces, result_per_die)); + FSCommon::report_to_nearby_chat(llformat("#%d 1d%d: %d.", die_iter, faces, result_per_die)); } result += result_per_die; ++die_iter; @@ -1627,7 +1627,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest // Modifier: Successes lower than a value if (result_per_die <= modifier) { - report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); + FSCommon::report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); ++successes; } else @@ -1640,7 +1640,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest // Modifier: Successes greater than a value if (result_per_die >= modifier) { - report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); + FSCommon::report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); ++successes; } else @@ -1651,13 +1651,13 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest else if ((modifier_type == "!" && result_per_die == modifier) || (modifier_type == "!>" && result_per_die >= modifier) || (modifier_type == "!<" && result_per_die <= modifier)) { // Modifier: Exploding dice - report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceExploded")); + FSCommon::report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceExploded")); --die_iter; } else if ((modifier_type == "!p" && result_per_die == modifier) || (modifier_type == "!p>" && result_per_die >= modifier) || (modifier_type == "!p<" && result_per_die <= modifier)) { // Modifier: Penetrating dice (special style of exploding dice) - report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDicePenetrated")); + FSCommon::report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDicePenetrated")); die_penetrated = 1; --die_iter; } @@ -1665,7 +1665,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { // Modifier: Reroll result -= result_per_die; - report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceReroll")); + FSCommon::report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceReroll")); --die_iter; } @@ -1675,7 +1675,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest // More than 1000 iterations already? We probably have an infinite loop - kill all further rolls // Explosions can trigger this easily, "rolld 1 6 !> 0" for example die_iter = 102; - report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceFreezeGuard")); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceFreezeGuard")); return false; } } @@ -1695,14 +1695,14 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest else if (modifier_type == ">" || modifier_type == "<") { // Modifier: Successes - report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceSuccess") + ": " + llformat("%d", successes)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceSuccess") + ": " + llformat("%d", successes)); } modifier_type = modifier_type + llformat("%d", modifier); } } else { - report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceLimits")); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceLimits")); return false; } } @@ -1718,7 +1718,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest args["FACES"] = llformat("%d", faces); args["RESULT"] = llformat("%d", result); args["MODIFIER"] = llformat("%s", modifier_type.c_str()); - report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceTotal", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceTotal", args)); return false; } } @@ -1844,9 +1844,9 @@ bool cmdline_packager(std::string_view message, const LLUUID& fromID, const LLUU std::string item(csv, start, comma-start); LLStringUtil::trim(item); LLViewerObject* objectp = gObjectList.findObject(LLUUID(item)); - if(!objectp) + if (!objectp) { - report_to_nearby_chat(llformat("Packager: Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct: \"%s\"", item.c_str())); + FSCommon::report_to_nearby_chat(llformat("Packager: Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct: \"%s\"", item.c_str())); return false; } else @@ -1860,14 +1860,14 @@ bool cmdline_packager(std::string_view message, const LLUUID& fromID, const LLUU start = comma + 1; } - while(comma < csv.length()); + while (comma < csv.length()); - report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", static_cast(csv).c_str())); + FSCommon::report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", static_cast(csv).c_str())); return true; } else if (cmd == "kpackagerend") { - report_to_nearby_chat("Packager: finalizing."); + FSCommon::report_to_nearby_chat("Packager: finalizing."); gZTake = new JCZtake(cmd_line_mPackagerTargetFolder, true, cmd_line_mPackagerDest, cmd_line_mPackagerTargetFolderName, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, cmd_line_mPackagerToTake); cmd_line_mPackagerToTake.clear(); cmd_line_mPackagerTargetFolderName = ""; diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 9f5ad93a32..46ff9a47ea 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -1467,7 +1467,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // FS:LO FIRE-2899 - Faded text for IMs in nearby chat //IRC styled /me messages. - bool irc_me = is_irc_me_prefix(chat.mText); + bool irc_me = FSCommon::is_irc_me_prefix(chat.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index c90be48d87..aca85af03c 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -69,7 +69,7 @@ extern S32 gMaxAgentGroups; S32 FSCommon::sObjectAddMsg = 0; -void report_to_nearby_chat(std::string_view message) +void FSCommon::report_to_nearby_chat(std::string_view message) { LLChat chat; chat.mText = message; @@ -77,19 +77,19 @@ void report_to_nearby_chat(std::string_view message) LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD()); } -std::string format_string(std::string text, const LLStringUtil::format_map_t& args) +std::string FSCommon::format_string(std::string text, const LLStringUtil::format_map_t& args) { LLStringUtil::format(text, args); return text; } -bool is_irc_me_prefix(std::string_view text) +bool FSCommon::is_irc_me_prefix(std::string_view text) { const std::string_view prefix = text.substr(0, 4); return (prefix == "/me " || prefix == "/me'"); } -std::string unescape_name(std::string_view name) +std::string FSCommon::unescape_name(std::string_view name) { // bugfix for SL-46920: preventing filenames that break stuff. char * curl_str = curl_unescape(name.data(), static_cast(name.size())); // Calling data() should be ok here because we also pass the length diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index 2e7946b0e5..be912aa9a3 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -34,16 +34,16 @@ class LLAvatarName; class LLViewerObject; class LLViewerParcelMgr; -const F64 AVATAR_UNKNOWN_Z_OFFSET = -1.0; // Const value for avatars at unknown height -const F32 AVATAR_UNKNOWN_RANGE = -1.f; - -void report_to_nearby_chat(std::string_view message); -std::string format_string(std::string text, const LLStringUtil::format_map_t& args); -bool is_irc_me_prefix(std::string_view text); -std::string unescape_name(std::string_view name); +constexpr F64 AVATAR_UNKNOWN_Z_OFFSET = -1.0; // Const value for avatars at unknown height +constexpr F32 AVATAR_UNKNOWN_RANGE = -1.f; namespace FSCommon { + void report_to_nearby_chat(std::string_view message); + std::string format_string(std::string text, const LLStringUtil::format_map_t& args); + bool is_irc_me_prefix(std::string_view text); + std::string unescape_name(std::string_view name); + std::string applyAutoCloseOoc(std::string message); std::string applyMuPose(std::string message); diff --git a/indra/newview/fsconsoleutils.cpp b/indra/newview/fsconsoleutils.cpp index ca03c46926..745ee3051e 100644 --- a/indra/newview/fsconsoleutils.cpp +++ b/indra/newview/fsconsoleutils.cpp @@ -69,7 +69,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args std::string sender_name(chat_msg.mFromName); //IRC styled /me messages. - bool irc_me = is_irc_me_prefix(chat_msg.mText); + bool irc_me = FSCommon::is_irc_me_prefix(chat_msg.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; @@ -128,7 +128,7 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const std::string sender_name(chat_msg.mFromName); //IRC styled /me messages. - bool irc_me = is_irc_me_prefix(chat_msg.mText); + bool irc_me = FSCommon::is_irc_me_prefix(chat_msg.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; @@ -218,7 +218,7 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id, std::string delimiter = ": "; // irc styled messages - if (is_irc_me_prefix(message)) + if (FSCommon::is_irc_me_prefix(message)) { delimiter = LLStringUtil::null; message = message.substr(3); diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 560c39b354..643db2eee1 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -462,7 +462,7 @@ void FSFloaterIM::sendMsgFromInputEditor(EChatType type) str_viewer_mode = "T"; //Build it up - size_t insert_pos = is_irc_me_prefix(utf8_text) ? 4 : 0; + size_t insert_pos = FSCommon::is_irc_me_prefix(utf8_text) ? 4 : 0; //For testing/beta groups, we display the build version since it doesn't speed by and this might change often if (FSData::getInstance()->isTestingGroup(mSessionID)) diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index 5b49f831c2..813d0a0194 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -157,7 +157,7 @@ void FSKeywords::notify(const LLChat& chat) if (FSEnableGrowl) { std::string msg = chat.mFromName; - if (is_irc_me_prefix(chat.mText)) + if (FSCommon::is_irc_me_prefix(chat.mText)) { msg = msg + chat.mText.substr(3); } diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 178794ea30..c2762351d1 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -445,13 +445,13 @@ bool FSLSLBridge::lslToViewer(std::string_view message, const LLUUID& fromID, co { LLStringUtil::format_map_t args2; args2["OBJECT_CHARACTER_TIME"] = scriptInfoArray[5].asString(); - args["PATHFINDING_TEXT"] = " " + format_string(LLTrans::getString("fsbridge_script_info_pf"), args2); + args["PATHFINDING_TEXT"] = " " + FSCommon::format_string(LLTrans::getString("fsbridge_script_info_pf"), args2); } else { args["PATHFINDING_TEXT"] = ""; } - report_to_nearby_chat(format_string(LLTrans::getString("fsbridge_script_info"), args)); + FSCommon::report_to_nearby_chat(FSCommon::format_string(LLTrans::getString("fsbridge_script_info"), args)); if (scriptInfoArrayCount == 27) { LLStringUtil::format_map_t args3; @@ -476,19 +476,19 @@ bool FSLSLBridge::lslToViewer(std::string_view message, const LLUUID& fromID, co args3["OBJECT_TEMP_ATTACHED"] = scriptInfoArray[24].asInteger() == 1 ? LLTrans::getString("Yes") : LLTrans::getString("No"); args3["AVATAR_POS"] = scriptInfoArray[25].asString(); args3["INSPECTING_KEY"] = scriptInfoArray[26].asString(); - report_to_nearby_chat(format_string(LLTrans::getString("fsbridge_script_info_ext"), args3)); + FSCommon::report_to_nearby_chat(FSCommon::format_string(LLTrans::getString("fsbridge_script_info_ext"), args3)); } } else { - report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Object to check is invalid or out of range (warning returned by viewer, data somehow passed bridge script check)" << LL_ENDL; } } else { - report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfomalformed")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfomalformed")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Received malformed response from bridge (missing ending tag)" << LL_ENDL; } } @@ -526,17 +526,17 @@ bool FSLSLBridge::lslToViewer(std::string_view message, const LLUUID& fromID, co { if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 9) == "injection") { - report_to_nearby_chat(LLTrans::getString("fsbridge_error_injection")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_error_injection")); LL_WARNS("FSLSLBridge") << "Script injection detected" << LL_ENDL; } else if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 18) == "scriptinfonotfound") { - report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Object to check is invalid or out of range (warning returned by bridge)" << LL_ENDL; } else if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 7) == "wrongvm") { - report_to_nearby_chat(LLTrans::getString("fsbridge_error_wrongvm")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_error_wrongvm")); LL_WARNS("FSLSLBridge") << "Script is using old LSO (16 KB memory limit) instead of new Mono (64 KB memory limit) virtual machine, which creates high probability of stack-heap collision and bridge failure by running out of memory" << LL_ENDL; } else @@ -618,7 +618,7 @@ void FSLSLBridge::recreateBridge() { // FIRE-11746: Recreate should throw error if disabled LL_WARNS("FSLSLBridge") << "Asked to create bridge, but bridge is disabled. Aborting." << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_cant_create_disabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_cant_create_disabled")); setBridgeCreating(false); // FIRE-11746 return; @@ -627,7 +627,7 @@ void FSLSLBridge::recreateBridge() if (gSavedSettings.getBOOL("NoInventoryLibrary")) { LL_WARNS("FSLSLBridge") << "Asked to create bridge, but we don't have a library. Aborting." << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); setBridgeCreating(false); return; } @@ -635,12 +635,12 @@ void FSLSLBridge::recreateBridge() if (mBridgeCreating) { LL_WARNS("FSLSLBridge") << "Bridge creation already in progress, aborting new attempt." << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_already_creating")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_already_creating")); return; } //announce yourself - report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); setupFSCategory([](const LLUUID& bridge_folder_id) { @@ -739,7 +739,7 @@ void FSLSLBridge::initBridge() if (gSavedSettings.getBOOL("NoInventoryLibrary")) { LL_WARNS("FSLSLBridge") << "Asked to create bridge, but we don't have a library. Aborting." << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); setBridgeCreating(false); return; } @@ -809,7 +809,7 @@ void FSLSLBridge::startCreation() setBridgeCreating(true); mFinishCreation = false; //announce yourself - report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); createNewBridge(); } @@ -871,7 +871,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge not created. Our bridge container attachment isn't named correctly." << LL_ENDL; if (mBridgeCreating) { - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_bad_name")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_bad_name")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -883,7 +883,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge container is still NULL in inventory. Aborting." << LL_ENDL; if (mBridgeCreating) { - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_null")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_null")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -899,7 +899,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac mAllowDetach = true; LLVOAvatarSelf::detachAttachmentIntoInventory(fsObject->getUUID()); LL_WARNS("FSLSLBridge") << "Attempt to attach to bridge point an object other than current bridge" << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_wrong_object")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_wrong_object")); if (mBridgeCreating) { setBridgeCreating(false); //in case we interrupted the creation @@ -917,7 +917,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge container isn't in the correct inventory location. Detaching it and aborting." << LL_ENDL; if (mBridgeCreating) { - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_wrong_location")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_wrong_location")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -933,7 +933,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Something unknown just got attached to bridge point, detaching and aborting." << LL_ENDL; if (mBridgeCreating) { - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_point_in_use")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_point_in_use")); setBridgeCreating(false); //in case we interrupted the creation } LLVOAvatarSelf::detachAttachmentIntoInventory(mpBridge->getUUID()); @@ -1009,7 +1009,7 @@ void FSLSLBridge::inventoryChanged(LLViewerObject* object, } else { - report_to_nearby_chat(LLTrans::getString("fsbridge_warning_unexpected_items")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_warning_unexpected_items")); LL_WARNS("FSLSLBridge") << "The bridge inventory contains items other than bridge script." << LL_ENDL; if (!isOurScript) //some junk but no valid script? Unlikely to happen, but lets add script anyway. { @@ -1033,7 +1033,7 @@ void FSLSLBridge::inventoryChanged(LLViewerObject* object, LL_INFOS("FSLSLBridge") << "Bridge created." << LL_ENDL; mFinishCreation = false; mAllowedDetachables.clear(); - report_to_nearby_chat(LLTrans::getString("fsbridge_created")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_created")); } } @@ -1119,11 +1119,11 @@ void FSLSLBridge::processDetach(LLViewerObject* object, const LLViewerJointAttac if (mpBridge && mpBridge->getUUID() == fsObject->getUUID()) { mpBridge = nullptr; - report_to_nearby_chat(LLTrans::getString("fsbridge_detached")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_detached")); mIsFirstCallDone = false; if (mBridgeCreating) { - report_to_nearby_chat(LLTrans::getString("fsbridge_warning_not_finished")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_warning_not_finished")); setBridgeCreating(false); //in case we interrupted the creation mAllowedDetachables.clear(); } @@ -1320,7 +1320,7 @@ void FSLSLBridgeScriptCallback::fire(const LLUUID& inv_item) } else { - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_create_script")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_create_script")); cleanup = true; } } @@ -1440,7 +1440,7 @@ void FSLSLBridge::cleanUpBridge() { //something unexpected went wrong. Try to clean up and not crash. LL_WARNS("FSLSLBridge") << "Bridge object not found. Can't proceed with creation, exiting." << LL_ENDL; - report_to_nearby_chat(LLTrans::getString("fsbridge_failure_not_found")); + FSCommon::report_to_nearby_chat(LLTrans::getString("fsbridge_failure_not_found")); if (isBridgeValid()) { diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp index 8658ae1cc4..c9b982769c 100644 --- a/indra/newview/fsradar.cpp +++ b/indra/newview/fsradar.cpp @@ -392,7 +392,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_chat_entering, args); + std::string message = FSCommon::format_string(str_chat_entering, args); make_ui_sound("UISndRadarChatEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -400,7 +400,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_draw_distance_entering, args); + std::string message = FSCommon::format_string(str_draw_distance_entering, args); make_ui_sound("UISndRadarDrawEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -411,7 +411,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_region_entering_distance, args); + std::string message = FSCommon::format_string(str_region_entering_distance, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } else @@ -449,7 +449,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_chat_entering, args); + std::string message = FSCommon::format_string(str_chat_entering, args); make_ui_sound("UISndRadarChatEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -465,7 +465,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_draw_distance_entering, args); + std::string message = FSCommon::format_string(str_draw_distance_entering, args); make_ui_sound("UISndRadarDrawEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -484,7 +484,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = format_string(str_region_entering_distance, args); + std::string message = FSCommon::format_string(str_region_entering_distance, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } else @@ -544,7 +544,7 @@ void FSRadar::updateRadarList() make_ui_sound("UISndRadarAgeAlert"); LLStringUtil::format_map_t args; args["AGE"] = llformat("%d", avAge); - std::string message = format_string(str_avatar_age_alert, args); + std::string message = FSCommon::format_string(str_avatar_age_alert, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } ent->mAgeAlertPerformed = true; @@ -1020,7 +1020,7 @@ void FSRadar::zoomAvatar(const LLUUID& avatar_id, std::string_view name) { LLStringUtil::format_map_t args; args["AVATARNAME"] = static_cast(name); - report_to_nearby_chat(LLTrans::getString("camera_no_focus", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("camera_no_focus", args)); } } diff --git a/indra/newview/growlmanager.cpp b/indra/newview/growlmanager.cpp index 9f514c4127..94f074da9c 100644 --- a/indra/newview/growlmanager.cpp +++ b/indra/newview/growlmanager.cpp @@ -340,7 +340,7 @@ void GrowlManager::onInstantMessage(const LLSD& im) } std::string message = im["message"].asString(); - if (is_irc_me_prefix(message)) + if (FSCommon::is_irc_me_prefix(message)) { message = message.substr(3); } @@ -390,7 +390,7 @@ void GrowlManager::onNearbyChatMessage(const LLSD& chat) if ((EChatType)chat["chat_type"].asInteger() == CHAT_TYPE_IM) { std::string message = chat["message"].asString(); - if (is_irc_me_prefix(message)) + if (FSCommon::is_irc_me_prefix(message)) { message = message.substr(3); } diff --git a/indra/newview/lggbeammaps.cpp b/indra/newview/lggbeammaps.cpp index 654ae844bb..ed63acdc02 100644 --- a/indra/newview/lggbeammaps.cpp +++ b/indra/newview/lggbeammaps.cpp @@ -275,7 +275,7 @@ string_vec_t lggBeamMaps::getFileNames() if (found) { name = name.erase(name.length() - 4); - names.push_back(unescape_name(name)); + names.push_back(FSCommon::unescape_name(name)); } } @@ -288,7 +288,7 @@ string_vec_t lggBeamMaps::getFileNames() if (found) { name = name.erase(name.length() - 4); - names.push_back(unescape_name(name)); + names.push_back(FSCommon::unescape_name(name)); } } return names; @@ -307,7 +307,7 @@ string_vec_t lggBeamMaps::getColorsFileNames() if (found) { name = name.erase(name.length() - 4); - names.push_back(unescape_name(name)); + names.push_back(FSCommon::unescape_name(name)); } } @@ -321,7 +321,7 @@ string_vec_t lggBeamMaps::getColorsFileNames() if (found) { name = name.erase(name.length() - 4); - names.push_back(unescape_name(name)); + names.push_back(FSCommon::unescape_name(name)); } } return names; diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 66ca3f6875..1e9d7b4b91 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -3373,13 +3373,13 @@ void LLAgentCamera::loadCameraPosition() if (stored_camera_pos.isNull()) { - report_to_nearby_chat(LLTrans::getString("LoadCameraPositionNoneSaved")); + FSCommon::report_to_nearby_chat(LLTrans::getString("LoadCameraPositionNoneSaved")); return; } if (dist_vec_squared(gAgent.getPositionGlobal(), stored_camera_pos) > far_clip_squared) { - report_to_nearby_chat(LLTrans::getString("LoadCameraPositionOutsideDrawDistance")); + FSCommon::report_to_nearby_chat(LLTrans::getString("LoadCameraPositionOutsideDrawDistance")); return; } diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 4f197437a1..c370ab8ed1 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -886,8 +886,8 @@ void LLEnvironment::loadLegacyPresets() if (found) { name = name.erase(name.length() - 4); - mLegacySkies.push_back(unescape_name(name)); - LL_DEBUGS("WindlightCaps") << "Added Legacy Sky: " << unescape_name(name) << LL_ENDL; + mLegacySkies.push_back(FSCommon::unescape_name(name)); + LL_DEBUGS("WindlightCaps") << "Added Legacy Sky: " << FSCommon::unescape_name(name) << LL_ENDL; } } @@ -901,8 +901,8 @@ void LLEnvironment::loadLegacyPresets() if (found) { name = name.erase(name.length() - 4); - mLegacyWater.push_back(unescape_name(name)); - LL_DEBUGS("WindlightCaps") << "Added Legacy Water: " << unescape_name(name) << LL_ENDL; + mLegacyWater.push_back(FSCommon::unescape_name(name)); + LL_DEBUGS("WindlightCaps") << "Added Legacy Water: " << FSCommon::unescape_name(name) << LL_ENDL; } } @@ -916,8 +916,8 @@ void LLEnvironment::loadLegacyPresets() if (found) { name = name.erase(name.length() - 4); - mLegacyDayCycles.push_back(unescape_name(name)); - LL_DEBUGS("WindlightCaps") << "Added Legacy Day Cycle: " << unescape_name(name) << LL_ENDL; + mLegacyDayCycles.push_back(FSCommon::unescape_name(name)); + LL_DEBUGS("WindlightCaps") << "Added Legacy Day Cycle: " << FSCommon::unescape_name(name) << LL_ENDL; } } } diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index cd4aaea2de..d531443468 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -443,7 +443,7 @@ void inventory_offer_handler(LLOfferInfo* info) message_type = "InvOfferAutoAcceptUser"; } - report_to_nearby_chat(LLTrans::getString(message_type, chat_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString(message_type, chat_args)); make_ui_sound("UISndInventoryOffer"); } // @@ -1626,7 +1626,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // Consolidate IRC /me prefix checks //std::string prefix = message.substr(0, 4); //if (prefix == "/me " || prefix == "/me'") - if (is_irc_me_prefix(message)) + if (FSCommon::is_irc_me_prefix(message)) // { chat.mChatStyle = CHAT_STYLE_IRC; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 3a8868d4fa..602a8fcab5 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3527,7 +3527,7 @@ void LLIMMgr::addMessage( { LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("group", new_session_id, "about").getSLURLString(); - report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); } clearPendingInvitation(new_session_id); clearPendingAgentListUpdates(new_session_id); @@ -3624,7 +3624,7 @@ void LLIMMgr::addMessage( else if (reportIgnoredAdHocSession) { // report_to_nearby_chat(LLTrans::getString("IgnoredAdHocSession")); - report_to_nearby_chat(LLTrans::getString("IgnoredAdHocSession", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("IgnoredAdHocSession", args)); } // return; @@ -4981,7 +4981,7 @@ public: { LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("group", session_id, "about").getSLURLString(); - report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); } //KC: make sure we leave the group chat at the server end as well diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 1563dfa10a..f7fd8159ab 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -400,7 +400,7 @@ void LLMuteList::updateAdd(const LLMute& mute, bool show_message /* = true */) { LLStringUtil::format_map_t args; args["NAME"] = mute.mName; - report_to_nearby_chat(LLTrans::getString("Mute_Add", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("Mute_Add", args)); } // } @@ -512,7 +512,7 @@ void LLMuteList::updateRemove(const LLMute& mute) { LLStringUtil::format_map_t args; args["NAME"] = mute.mName; - report_to_nearby_chat(LLTrans::getString("Mute_Remove", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("Mute_Remove", args)); } // } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 2a57c15954..ed9861fee0 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -2132,7 +2132,7 @@ void LLNetMap::handleCam() } else { - report_to_nearby_chat(LLTrans::getString("minimap_no_focus")); + FSCommon::report_to_nearby_chat(LLTrans::getString("minimap_no_focus")); } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6d83d13499..4fd058a68f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -418,7 +418,7 @@ void downloadGridlistError( LLSD const &aData, std::string const &aURL ) if (rawData.size() == 0) { - report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); + FSCommon::report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - empty output" << LL_ENDL; return; } @@ -490,17 +490,17 @@ void downloadGridlistError( LLSD const &aData, std::string const &aURL ) LLStringUtil::trim(newsTitle); LLStringUtil::trim(newsDesc); LLStringUtil::trim(newsLink); - report_to_nearby_chat("[ " + newsTitle + " ] " + newsDesc + " [ " + newsLink + " ]"); + FSCommon::report_to_nearby_chat("[ " + newsTitle + " ] " + newsDesc + " [ " + newsLink + " ]"); } else { - report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); + FSCommon::report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - inner tag(s) missing" << LL_ENDL; } } else { - report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); + FSCommon::report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - output without " << LL_ENDL; } } @@ -512,13 +512,13 @@ void downloadGridstatusError(LLSD const &aData, std::string const &aURL) if (status.getType() == HTTP_INTERNAL_ERROR) { - report_to_nearby_chat(LLTrans::getString("SLGridStatusTimedOut")); + FSCommon::report_to_nearby_chat(LLTrans::getString("SLGridStatusTimedOut")); } else { LLStringUtil::format_map_t args; args["STATUS"] = llformat("%d", status.getType()); - report_to_nearby_chat(LLTrans::getString("SLGridStatusOtherError", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("SLGridStatusOtherError", args)); } } // @@ -3299,7 +3299,7 @@ bool idle_startup() // FIRE-6643 Display MOTD when login screens are disabled if (gSavedSettings.getBOOL("FSDisableLoginScreens")) { - report_to_nearby_chat(gAgent.mMOTD); + FSCommon::report_to_nearby_chat(gAgent.mMOTD); } // // diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 2f7bbeea14..197a0f6ff6 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -75,7 +75,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif // Consolidate IRC /me prefix checks //std::string prefix = p.message.substr(0, 4); //if (prefix == "/me " || prefix == "/me'") - if (is_irc_me_prefix(p.message)) + if (FSCommon::is_irc_me_prefix(p.message)) // { //style_params.font.style = "UNDERLINE"; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 62a8553d8b..0bf8a2e3f7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -829,16 +829,16 @@ class LLAdvancedToggleHUDInfo : public view_listener_t } else if ("badge" == info_type) { - report_to_nearby_chat("Hippos!"); + FSCommon::report_to_nearby_chat("Hippos!"); } else if ("cookies" == info_type) { - report_to_nearby_chat("Cookies!"); + FSCommon::report_to_nearby_chat("Cookies!"); } // else if ("motd" == info_type) { - report_to_nearby_chat(gAgent.mMOTD); + FSCommon::report_to_nearby_chat(gAgent.mMOTD); } // return true; @@ -7715,13 +7715,13 @@ class LLWorldAlwaysRun : public view_listener_t { gAgent.clearAlwaysRun(); // gAgent.clearRunning(); - report_to_nearby_chat(LLTrans::getString("AlwaysRunDisabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("AlwaysRunDisabled")); } else { gAgent.setAlwaysRun(); // gAgent.setRunning(); - report_to_nearby_chat(LLTrans::getString("AlwaysRunEnabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("AlwaysRunEnabled")); } // tell the simulator. @@ -9799,7 +9799,7 @@ void handle_selected_texture_info(void*) //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - report_to_nearby_chat(msg); + FSCommon::report_to_nearby_chat(msg); // } } @@ -10203,7 +10203,7 @@ void setDoubleClickAction(const std::string& control) bool ignore_mask = true; conflictHandler.registerControl(control, index, click, key, mask, ignore_mask); - report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportEnabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportEnabled")); } else { @@ -10214,7 +10214,7 @@ void setDoubleClickAction(const std::string& control) if (data.mMouse == click && data.mKey == key && data.mMask == mask) { conflictHandler.clearControl(control, i); - report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportDisabled")); + FSCommon::report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportDisabled")); } } } @@ -10685,7 +10685,7 @@ class FSDumpSimulatorFeaturesToChat : public view_listener_t std::stringstream out_str; region->getSimulatorFeatures(sim_features); LLSDSerialize::toPrettyXML(sim_features, out_str); - report_to_nearby_chat(out_str.str()); + FSCommon::report_to_nearby_chat(out_str.str()); } return true; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d2bace66ab..1333ce477d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -203,7 +203,7 @@ public: { if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport")) { - report_to_nearby_chat("Refreshing attachments..."); + FSCommon::report_to_nearby_chat("Refreshing attachments..."); } mEventTimer.stop(); LLAttachmentsMgr::instance().refreshAttachments(); @@ -3050,7 +3050,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Consolidate IRC /me prefix checks //std::string prefix = mesg.substr(0, 4); //if (prefix == "/me " || prefix == "/me'") - if (is_irc_me_prefix(mesg)) + if (FSCommon::is_irc_me_prefix(mesg)) // { ircstyle = true; @@ -4571,7 +4571,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport")) { - report_to_nearby_chat(message); + FSCommon::report_to_nearby_chat(message); } continue; @@ -4992,11 +4992,11 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) if (change_count > 0) { - report_to_nearby_chat(format_string(increase_message, args)); + FSCommon::report_to_nearby_chat(FSCommon::format_string(increase_message, args)); } else if (change_count < 0) { - report_to_nearby_chat(format_string(decrease_message, args)); + FSCommon::report_to_nearby_chat(FSCommon::format_string(decrease_message, args)); } } } @@ -6401,7 +6401,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // make_ui_sound("UISndRestart"); - report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat + FSCommon::report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat fs_report_region_restart_to_channel(seconds); // Announce region restart to a defined chat channel } @@ -6663,7 +6663,7 @@ void process_alert_core(const std::string& message, bool modal) } make_ui_sound("UISndRestartOpenSim"); - report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat + FSCommon::report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat fs_report_region_restart_to_channel(seconds); // Announce region restart to a defined chat channel return; } @@ -6836,7 +6836,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use action = LLTrans::getString("Collision_UnknownType", args); return; } - report_to_nearby_chat(action); + FSCommon::report_to_nearby_chat(action); } // Nearby Chat Collision Messages // Report Collision Messages to scripts diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 766366fa3c..5c8e7355bb 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -910,7 +910,7 @@ void LLViewerParcelMedia::filterMediaUrl(LLParcel* parcel) { LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentBlocked", format_args)); mMediaLastActionPlay = false; } else @@ -992,7 +992,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); inst->mCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1009,7 +1009,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); } else if ((option == 2) && allow) // Whitelist URL { @@ -1020,7 +1020,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysAllowed", format_args)); inst->mCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1037,7 +1037,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysBlocked", format_args)); } // We've dealt with the alert, so mark it as inactive. @@ -1110,7 +1110,7 @@ void callback_media_alert_single(const LLSD ¬ification, const LLSD &response, inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); } else if (option == 3) // Whitelist domain { @@ -1121,7 +1121,7 @@ void callback_media_alert_single(const LLSD ¬ification, const LLSD &response, inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); inst->mCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1316,7 +1316,7 @@ void LLViewerParcelMedia::filterAudioUrl(std::string media_url) { LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentBlocked", format_args)); LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); mAudioLastActionPlay = false; } @@ -1401,7 +1401,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); if (gAudiop) { inst->mCurrentMusic = media_url; @@ -1418,7 +1418,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); if (gAudiop) { inst->mCurrentMusic = ""; @@ -1435,7 +1435,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysAllowed", format_args)); if (gAudiop) { inst->mCurrentMusic = media_url; @@ -1452,7 +1452,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysBlocked", format_args)); if (gAudiop) { inst->mCurrentMusic = ""; @@ -1534,7 +1534,7 @@ void callback_audio_alert_single(const LLSD ¬ification, const LLSD &response, inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); if (gAudiop) { inst->mCurrentMusic = media_url; @@ -1551,7 +1551,7 @@ void callback_audio_alert_single(const LLSD ¬ification, const LLSD &response, inst->saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); if (gAudiop) { inst->mCurrentMusic = ""; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6822cb6c2f..2819f52695 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5946,7 +5946,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save { LLStringUtil::format_map_t args; args["FILENAME"] = filepath; - report_to_nearby_chat(LLTrans::getString("SnapshotSavedToDisk", args)); + FSCommon::report_to_nearby_chat(LLTrans::getString("SnapshotSavedToDisk", args)); } success_cb(); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bc4865f416..b2d6d6e141 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3990,7 +3990,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) LLStringUtil::format_map_t label_args; label_args["COMPLEXITY"] = complexity_string; - addNameTagLine(format_string(complexity_label, label_args), complexity_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); + addNameTagLine(FSCommon::format_string(complexity_label, label_args), complexity_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); // only show texture area if this is the reason for jelly baby rendering static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f); @@ -3999,7 +3999,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) LLResMgr::getInstance()->getIntegerString(complexity_string, mAttachmentSurfaceArea); label_args["TEXTURE_AREA"] = complexity_string; - addNameTagLine(format_string(texture_area_label, label_args), LLColor4::red, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); + addNameTagLine(FSCommon::format_string(texture_area_label, label_args), LLColor4::red, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); } } // diff --git a/indra/newview/streamtitledisplay.cpp b/indra/newview/streamtitledisplay.cpp index fdd4bfa7ff..53341640bd 100644 --- a/indra/newview/streamtitledisplay.cpp +++ b/indra/newview/streamtitledisplay.cpp @@ -94,7 +94,7 @@ void StreamTitleDisplay::checkMetadata(const LLSD& metadata) if (ShowStreamMetadata > 1) { chat = LLTrans::getString("StreamtitleNowPlaying") + " " + chat; - report_to_nearby_chat(chat); + FSCommon::report_to_nearby_chat(chat); } else if (ShowStreamMetadata == 1 && (metadata.has("TITLE") || metadata.has("ARTIST"))) { From 832adb49961f060810fe6adcd70ede46ab63ac90 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 6 Sep 2024 14:06:45 +0100 Subject: [PATCH 10/16] FIRE-34403 - remove downgrade the assertion. Previously, an assertion failure would occur if mComplete.size() was zero. This has been downgraded to a warning message and early return, improving stability especially for large inventories or slow grid asset servers. --- indra/newview/llagentwearablesfetch.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 08c52c6cff..9d516c7bbe 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -131,7 +131,15 @@ void LLInitialWearablesFetch::processContents() LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; LLFindWearables is_wearable; - llassert_always(mComplete.size() != 0); + // FIRE-34403 - Still Occasional crashes on large inventories (or slow grid asset servers?) . + // Let's downgrade this assertion. This entire codepath is only accessed by OpenSim until they get AISV3 then we can remove it. + // llassert_always(mComplete.size() != 0); + if (mComplete.size() == 0) + { + LL_WARNS() << "LLInitialWearablesFetch::processContents() called with no items in complete." << LL_ENDL; + return; + } + // gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, is_wearable); From 1dc1316e799d79f6159b85654ee88f5778c12149 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 6 Sep 2024 14:08:15 +0100 Subject: [PATCH 11/16] FIRE-33989 - Noto-Sans font fallbacks not finding the default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applying a correction to replace the non-existent NotoSans.ttf as the default fallback.  It has been "wrong" for a long time suggesting that it was an unrelated change (possibly aligning our fallbacks with LL) that triggered this, so there may be other issues. We may need to review this further if it has other side-effects. --- indra/newview/fonts/fonts_noto.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/fonts/fonts_noto.xml b/indra/newview/fonts/fonts_noto.xml index 9378473d66..68a1b44e6c 100644 --- a/indra/newview/fonts/fonts_noto.xml +++ b/indra/newview/fonts/fonts_noto.xml @@ -2,7 +2,7 @@ - NotoSans.ttf + NotoSansCombined-Regular.ttf TwemojiSVG.ttf NotoEmoji-Regular.ttf From 1d4534d1155d6764e74faf3a0ab8912855e0ca25 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 3 Sep 2024 19:47:32 -0500 Subject: [PATCH 12/16] #1852 Fix for some visual corruption caused by divide by zero in lighting functions (#2488) --- .../shaders/class1/deferred/deferredUtil.glsl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index ab0e4fd4d8..3319e32cdf 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -99,10 +99,13 @@ void calcHalfVectors(vec3 lv, vec3 n, vec3 v, { l = normalize(lv); h = normalize(l + v); - nh = clamp(dot(n, h), 0.0, 1.0); - nl = clamp(dot(n, l), 0.0, 1.0); - nv = clamp(dot(n, v), 0.0, 1.0); - vh = clamp(dot(v, h), 0.0, 1.0); + + // lower bound to avoid divide by zero + float eps = 0.000001; + nh = clamp(dot(n, h), eps, 1.0); + nl = clamp(dot(n, l), eps, 1.0); + nv = clamp(dot(n, v), eps, 1.0); + vh = clamp(dot(v, h), eps, 1.0); lightDist = length(lv); } From e42e4d0db39d2faccb96065f447adbdc6c94c4ae Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 6 Sep 2024 15:33:44 +0100 Subject: [PATCH 13/16] Updated MacOS BugSplat handling to pacify gatekeeper Borrowed from LL: IThe BugsplatMac framework currently causes Gatekeeper popups at viewer start. LL used this code to workaround that. Perhaps it will work for us? The update also ensures that 'strip' keeps enough info for annotated backtraces, making crash logs more useful. --- indra/newview/viewer_manifest.py | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 2727dff1d6..190e9dd8c9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1459,6 +1459,46 @@ class Darwin_x86_64_Manifest(ViewerManifest): if self.args.get('bugsplat'): self.path2basename(relpkgdir, "BugsplatMac.framework") + with self.prefix(dst="MacOS"): + executable = self.dst_path_of(self.channel()) + if self.args.get('bugsplat'): + # According to Apple Technical Note TN2206: + # https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG207 + # "If an app uses @rpath or an absolute path to link to a + # dynamic library outside of the app, the app will be + # rejected by Gatekeeper. ... Neither the codesign nor the + # spctl tool will show the error." + # (Thanks, Apple. Maybe fix spctl to warn?) + # The BugsplatMac framework embeds @rpath, which is + # causing scary Gatekeeper popups at viewer start. Work + # around this by changing the reference baked into our + # viewer. The install_name_tool -change option needs the + # previous value. Instead of guessing -- which might + # silently be defeated by a BugSplat SDK update that + # changes their baked-in @rpath -- ask for the path + # stamped into the framework. + # Let exception, if any, propagate -- if this doesn't + # work, we need the build to noisily fail! + oldpath = subprocess.check_output( + ['objdump', '--macho', '--dylib-id', '--non-verbose', + os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")], + text=True + ).splitlines()[-1] # take the last line of output + self.run_command( + ['install_name_tool', '-change', oldpath, + '@executable_path/../Frameworks/BugsplatMac.framework/BugsplatMac', + executable]) + + # NOTE: the -S argument to strip causes it to keep + # enough info for annotated backtraces (i.e. function + # names in the crash log). 'strip' with no arguments + # yields a slightly smaller binary but makes crash + # logs mostly useless. This may be desirable for the + # final release. Or not. + if ("package" in self.args['actions'] or + "unpacked" in self.args['actions']): + self.run_command( + ['strip', '-S', executable]) # most everything goes in the Resources directory with self.prefix(dst="Resources"): From 3aae77cc6f39c11dc91373686b7263ae6f735623 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 6 Sep 2024 17:47:00 +0100 Subject: [PATCH 14/16] Capture the BUGSPLAT_DB and fix Mac executable name --- .github/workflows/build_viewer.yml | 5 +++-- indra/newview/viewer_manifest.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 450eb091df..63368a939e 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -295,9 +295,10 @@ jobs: run: rm *${{ env.fallback_platform }}*bz2 shell: bash - name: Configure - run: autobuild configure -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{env.FS_RELEASE_CHAN}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}} + run: | + autobuild configure -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{env.FS_RELEASE_CHAN}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}} + echo "BUGSPLAT_DB=$BUGSPLAT_DB" >> $GITHUB_ENV shell: bash - - name: build id: build run: autobuild build -c ReleaseFS -A${{matrix.addrsize}} --no-configure diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 190e9dd8c9..5a56f961c1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1460,7 +1460,7 @@ class Darwin_x86_64_Manifest(ViewerManifest): self.path2basename(relpkgdir, "BugsplatMac.framework") with self.prefix(dst="MacOS"): - executable = self.dst_path_of(self.channel()) + executable = self.dst_path_of("Firestorm") if self.args.get('bugsplat'): # According to Apple Technical Note TN2206: # https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG207 From 17d97a679fdf24902eccaf7f79589d09339ff569 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 6 Sep 2024 23:09:28 +0200 Subject: [PATCH 15/16] Include Python files in solution --- indra/newview/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8fc7971ddf..76cb20b43f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2089,6 +2089,12 @@ source_group("Firestorm Resources" FILES ${viewer_FS_RESOURCES}) set_source_files_properties(${viewer_FS_RESOURCES} PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND viewer_SOURCE_FILES ${viewer_FS_RESOURCES}) + +file(GLOB viewer_PY_SCRIPTS *.py) +source_group("Python Scripts" FILES ${viewer_PY_SCRIPTS}) +set_source_files_properties(${viewer_PY_SCRIPTS} + PROPERTIES HEADER_FILE_ONLY TRUE) +list(APPEND viewer_SOURCE_FILES ${viewer_PY_SCRIPTS}) # if (WINDOWS) From df4229adc1711dca0299b774f10cbdcff4414061 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sat, 7 Sep 2024 11:49:49 +0200 Subject: [PATCH 16/16] FIRE-34479 French translation update, by Laurent Bechir --- .../skins/default/xui/fr/notifications.xml | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index c98d5b144d..83625b2803 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -5549,9 +5549,26 @@ Voulez-vous continuer ? Vous modifiez un ciel non HDR qui a été automatiquement converti en HDR. Pour supprimer le HDR et le mappage des tons, réglez l'Ambiance de la sonde de réflexion sur zéro. - - Vous devez sélectionner un objet qui servira de référence à la ressource GLTF que vous prévisualisez. - + + Vous devez sélectionner un objet qui servira de point d'accès à la ressource GLTF que vous prévisualisez. + + + Échec du chargement du fichier GLTF. Voir le journal pour plus de détails. + + + Échec de l'enregistrement du fichier GLTF. Voir le journal pour plus de détails. + + + Vous devez sélectionner un objet auquel est associée une ressource GLTF. + + + Vous devez sélectionner un objet auquel est associé une ressource GLTF locale. + + + Un chargement est en cours. Veuillez réessayer plus tard. + + + Les scènes GLTF ne sont pas encore prises en charge par votre matériel graphique. Vous êtes sur le point d'activer l'AutoFPS. Tous les paramètres graphiques non sauvegardés seront perdus.