From 99a9258d5217565d9c4e4753a5697857b6b339b7 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 25 Sep 2024 18:03:57 -0700 Subject: Issue #2687: Honor flag sent by server indicating server side autopilot is engaged. When flag is set allow sever to update local avatar rotation. --- indra/llprimitive/object_flags.h | 12 ++++++------ indra/newview/llviewerobject.cpp | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llprimitive/object_flags.h b/indra/llprimitive/object_flags.h index e2cdba072a..06e216ba49 100644 --- a/indra/llprimitive/object_flags.h +++ b/indra/llprimitive/object_flags.h @@ -57,16 +57,16 @@ const U32 FLAGS_CAMERA_SOURCE = (1U << 22); //const U32 FLAGS_UNUSED_001 = (1U << 23); // was FLAGS_CAST_SHADOWS -//const U32 FLAGS_UNUSED_002 = (1U << 24); -//const U32 FLAGS_UNUSED_003 = (1U << 25); -//const U32 FLAGS_UNUSED_004 = (1U << 26); -//const U32 FLAGS_UNUSED_005 = (1U << 27); +const U32 FLAGS_SERVER_AUTOPILOT = (1U << 24); // Update was for an agent AND that agent is being autopiloted from the server +//const U32 FLAGS_UNUSED_002 = (1U << 25); +//const U32 FLAGS_UNUSED_003 = (1U << 26); +//const U32 FLAGS_UNUSED_004 = (1U << 27); const U32 FLAGS_OBJECT_OWNER_MODIFY = (1U << 28); const U32 FLAGS_TEMPORARY_ON_REZ = (1U << 29); -//const U32 FLAGS_UNUSED_006 = (1U << 30); // was FLAGS_TEMPORARY -//const U32 FLAGS_UNUSED_007 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED +//const U32 FLAGS_UNUSED_005 = (1U << 30); // was FLAGS_TEMPORARY +//const U32 FLAGS_UNUSED_006 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED const U32 FLAGS_LOCAL = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE; const U32 FLAGS_WORLD = FLAGS_USE_PHYSICS | FLAGS_PHANTOM | FLAGS_TEMPORARY_ON_REZ; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 86440fca48..b87b17e3cf 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2325,6 +2325,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega) setRotation(new_rot * mAngularVelocityRot); + if ((mFlags & FLAGS_SERVER_AUTOPILOT) && asAvatar() && asAvatar()->isSelf()) + { + gAgent.resetAxes(); + gAgent.rotate(new_rot); + gAgentCamera.resetView(); + } setChanged(ROTATED | SILHOUETTE); } -- cgit v1.2.3 From 81df0476b5194ca50b7b473e9fb1a33c0831c28a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 14 Oct 2024 12:49:43 -0700 Subject: Private Issue #297: Accept new flags in ScriptTeleportRequest message. Flags indicate if the world map should be opened and focused. --- indra/llcommon/indra_constants.h | 2 ++ indra/llui/llfloater.h | 6 ++++-- indra/newview/llfloaterworldmap.cpp | 7 +++++-- indra/newview/llviewermessage.cpp | 18 ++++++++++++++++-- 4 files changed, 27 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index d2de88ff0a..c6bdab007f 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -355,5 +355,7 @@ const U8 CLICK_ACTION_DISABLED = 8; const U8 CLICK_ACTION_IGNORE = 9; // DO NOT CHANGE THE SEQUENCE OF THIS LIST!! +constexpr U32 BEACON_SHOW_MAP = 0x0001; +constexpr U32 BEACON_FOCUS_MAP = 0x0002; #endif diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 9be2240f6f..eae2435117 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -377,6 +377,10 @@ public: void enableResizeCtrls(bool enable, bool width = true, bool height = true); bool isPositioning(LLFloaterEnums::EOpenPositioning p) const { return (p == mPositioning); } + + void setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened + bool getAutoFocus() const { return mAutoFocus; } + protected: void applyControlsAndPosition(LLFloater* other); @@ -401,8 +405,6 @@ protected: void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized const LLRect& getExpandedRect() const { return mExpandedRect; } - void setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened - bool getAutoFocus() const { return mAutoFocus; } LLDragHandle* getDragHandle() const { return mDragHandle; } void destroy(); // Don't call this directly. You probably want to call closeFloater() diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 30ed723db6..a798ba31ee 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -486,8 +486,11 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id); - mLocationEditor->setFocus( true); - gFocusMgr.triggerFocusFlash(); + if (hasFocus()) + { + mLocationEditor->setFocus( true); + gFocusMgr.triggerFocusFlash(); + } buildAvatarIDList(); buildLandmarkIDLists(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1d4828fd33..fe6de38dd7 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6610,7 +6610,6 @@ void process_initiate_download(LLMessageSystem* msg, void**) (void**)new std::string(viewer_filename)); } - void process_script_teleport_request(LLMessageSystem* msg, void**) { if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return; @@ -6624,6 +6623,11 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) msg->getString("Data", "SimName", sim_name); msg->getVector3("Data", "SimPosition", pos); msg->getVector3("Data", "LookAt", look_at); + U32 flags = (BEACON_SHOW_MAP | BEACON_FOCUS_MAP); + if (msg->has("Options")) + { + msg->getU32("Options", "Flags", flags); + } LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) @@ -6634,7 +6638,17 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) << LL_ENDL; instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); - LLFloaterReg::showInstance("world_map", "center"); + if (flags & BEACON_SHOW_MAP) + { + bool old_auto_focus = instance->getAutoFocus(); + instance->setAutoFocus(false); + instance->openFloater("center"); + if (flags & BEACON_FOCUS_MAP) + { + instance->setFocus(true); + } + instance->setAutoFocus(old_auto_focus); + } } // remove above two lines and replace with below line -- cgit v1.2.3 From 3dc945c1df2a8961363528df0e383519c9d63d1f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 14 Oct 2024 15:45:04 -0700 Subject: Private Issue #297: Code review feedback. --- indra/newview/llviewermessage.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fe6de38dd7..e52a40ef85 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6641,12 +6641,8 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) if (flags & BEACON_SHOW_MAP) { bool old_auto_focus = instance->getAutoFocus(); - instance->setAutoFocus(false); + instance->setAutoFocus(flags & BEACON_FOCUS_MAP); instance->openFloater("center"); - if (flags & BEACON_FOCUS_MAP) - { - instance->setFocus(true); - } instance->setAutoFocus(old_auto_focus); } } -- cgit v1.2.3 From 7cd50ceaceaf3fa83c37ab6d7cf85e3e22609d9c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 21 Oct 2024 16:35:23 -0700 Subject: Issue #2907: Process metadata sent along with chats of type IM_NOTHING_SPECIAL, The metadata can contain information about the bot status of the sender. It may also contain a system-injected notification that is displayed to the agent as part of the 1:1 chat window. --- indra/llmessage/message_prehash.cpp | 1 + indra/llmessage/message_prehash.h | 1 + indra/newview/llimprocessing.cpp | 47 ++++++++++++++++++++++++-- indra/newview/llimprocessing.h | 1 + indra/newview/llimview.cpp | 2 +- indra/newview/llviewermessage.cpp | 18 +++++++++- indra/newview/skins/default/xui/da/strings.xml | 4 +++ indra/newview/skins/default/xui/de/strings.xml | 4 +++ indra/newview/skins/default/xui/en/strings.xml | 4 +++ indra/newview/skins/default/xui/es/strings.xml | 4 +++ indra/newview/skins/default/xui/fr/strings.xml | 4 +++ indra/newview/skins/default/xui/it/strings.xml | 4 +++ indra/newview/skins/default/xui/ja/strings.xml | 4 +++ indra/newview/skins/default/xui/pl/strings.xml | 4 +++ indra/newview/skins/default/xui/pt/strings.xml | 4 +++ indra/newview/skins/default/xui/ru/strings.xml | 4 +++ indra/newview/skins/default/xui/tr/strings.xml | 4 +++ indra/newview/skins/default/xui/zh/strings.xml | 4 +++ 18 files changed, 113 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index c264a9f086..21dbf35783 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1402,3 +1402,4 @@ char const* const _PREHASH_HoverHeight = LLMessageStringTable::getInstance()->ge char const* const _PREHASH_Experience = LLMessageStringTable::getInstance()->getString("Experience"); char const* const _PREHASH_ExperienceID = LLMessageStringTable::getInstance()->getString("ExperienceID"); char const* const _PREHASH_LargeGenericMessage = LLMessageStringTable::getInstance()->getString("LargeGenericMessage"); +char const* const _PREHASH_MetaData = LLMessageStringTable::getInstance()->getString("MetaData"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index 1d30b69b67..8a2ad1587c 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -1403,5 +1403,6 @@ extern char const* const _PREHASH_HoverHeight; extern char const* const _PREHASH_Experience; extern char const* const _PREHASH_ExperienceID; extern char const* const _PREHASH_LargeGenericMessage; +extern char const* const _PREHASH_MetaData; #endif diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 590cd09a31..5d1317f00f 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -422,6 +422,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, U8 *binary_bucket, S32 binary_bucket_size, LLHost &sender, + LLSD metadata, LLUUID aux_id) { LLChat chat; @@ -451,6 +452,30 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && LLMuteList::isLinden(name); + /*** + * The simulator has flagged this sender as a bot, if the viewer would like to display + * the chat text in a different color or font, the below code is how the viewer can + * tell if the sender is a bot. + *----------------------------------------------------- + bool is_bot = false; + if (metadata.has("sender")) + { // The server has identified this sender as a bot. + is_bot = metadata["sender"]["bot"].asBoolean(); + } + *----------------------------------------------------- + */ + + bool is_system_notice = false; + std::string notice_id; + LLSD notice_args; + if (metadata.has("notice")) + { // The server has injected a notice into the IM conversation. + // These will be things like bot notifications, etc. + is_system_notice = true; + notice_id = metadata["notice"]["id"].asString(); + notice_args = metadata["notice"]["data"]; + } + chat.mMuted = is_muted; chat.mFromID = from_id; chat.mFromName = name; @@ -544,7 +569,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } else { - // standard message, not from system + // standard message, server may have injected a notice into the conversation. std::string saved; if (offline == IM_OFFLINE) { @@ -579,8 +604,16 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, region_message = true; } } - gIMMgr->addMessage( - session_id, + + if (is_system_notice) + { // The simulator has injected some sort of notice into the conversation. + // findString will only replace the contents of buffer if the notice_id is found. + LLTrans::findString(buffer, notice_id, notice_args); + name = SYSTEM_FROM; + from_id = LLUUID::null; + } + + gIMMgr->addMessage(session_id, from_id, name, buffer, @@ -592,6 +625,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, position, region_message, timestamp); + } else { @@ -1627,6 +1661,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) from_group = message_data["from_group"].asString() == "Y"; } + LLSD metadata; + if (message_data.has("metadata")) + { + metadata = message_data["metadata"]; + } + EInstantMessage dialog = static_cast(message_data["dialog"].asInteger()); LLUUID session_id = message_data["transaction-id"].asUUID(); if (session_id.isNull() && dialog == IM_FROM_TASK) @@ -1654,6 +1694,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) local_bin_bucket.data(), S32(local_bin_bucket.size()), local_sender, + metadata, message_data["asset_id"].asUUID()); }); diff --git a/indra/newview/llimprocessing.h b/indra/newview/llimprocessing.h index 030d28b198..66ffc59ae0 100644 --- a/indra/newview/llimprocessing.h +++ b/indra/newview/llimprocessing.h @@ -48,6 +48,7 @@ public: U8 *binary_bucket, S32 binary_bucket_size, LLHost &sender, + LLSD metadata, LLUUID aux_id = LLUUID::null); // Either receives list of offline messages from 'ReadOfflineMsgs' capability diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 34a4b5b230..7a2f1486ae 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3142,7 +3142,7 @@ void LLIMMgr::addMessage( const LLUUID& region_id, const LLVector3& position, bool is_region_msg, - U32 timestamp) // May be zero + U32 timestamp) // May be zero { LLUUID other_participant_id = target_id; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1d4828fd33..f2335319a8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2137,6 +2137,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) EInstantMessage dialog = (EInstantMessage)d; LLHost sender = msg->getSender(); + LLSD metadata; + if (msg->getNumberOfBlocksFast(_PREHASH_MetaData) > 0) + { + S32 metadata_size = msg->getSizeFast(_PREHASH_MetaData, 0, _PREHASH_Data); + std::string metadata_buffer; + metadata_buffer.resize(metadata_size, 0); + + msg->getBinaryDataFast(_PREHASH_MetaData, _PREHASH_Data, &metadata_buffer[0], metadata_size, 0, metadata_size ); + std::stringstream metadata_stream(metadata_buffer); + if (LLSDSerialize::fromBinary(metadata, metadata_stream, metadata_size) == LLSDParser::PARSE_FAILURE) + { + metadata.clear(); + } + } + LLIMProcessing::processNewMessage(from_id, from_group, to_id, @@ -2151,7 +2166,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) position, binary_bucket, binary_bucket_size, - sender); + sender, + metadata); } void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id) diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index e4f99d14e9..c4275d43f7 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -3723,6 +3723,10 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. Konference med [AGENT_NAME] + +Du chatter med en bot, [NAME]. Del ikke personlige oplysninger. +Læs mere på https://second.life/scripted-agents. + (IM session eksisterer ikke) diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index a9e7626dc5..44355940c4 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1614,6 +1614,10 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ Konferenz mit [AGENT_NAME] Inventarobjekt „[ITEM_NAME]“ angeboten Inventarordner „[ITEM_NAME]“ angeboten + + Sie chatten mit einem Bot, [NAME]. Geben Sie keine persönlichen Informationen weiter. +Erfahren Sie mehr unter https://second.life/scripted-agents. + Objekte aus dem Inventar hier her ziehen Sie haben auf Facebook gepostet. Sie haben auf Flickr gepostet. diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f0a26f9c56..9102a30e1d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3717,6 +3717,10 @@ Please reinstall viewer from https://secondlife.com/support/downloads/ and cont Inventory folder '[ITEM_NAME]' offered + + You are chatting with a bot, [NAME]. Do not share any personal information. +Learn more at https://second.life/scripted-agents. + Drag items from inventory here diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index cd8e7687ae..f23f6e1c07 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -1585,6 +1585,10 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. Conferencia con [AGENT_NAME] Ítem del inventario '[ITEM_NAME]' ofrecido Carpeta del inventario '[ITEM_NAME]' ofrecida + +Estás conversando con un bot, [NAME]. No compartas información personal. +Más información en https://second.life/scripted-agents. + Arrastra los ítems desde el invenbtario hasta aquí Has publicado en Facebook. Has publicado en Flickr. diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0a3fbeb603..cfa6cb5001 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -1615,6 +1615,10 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Conférence avec [AGENT_NAME] Objet de l’inventaire [ITEM_NAME] offert Dossier de l’inventaire [ITEM_NAME] offert + +Vous discutez avec un bot, [NAME]. Ne partagez pas d’informations personnelles. +En savoir plus sur https://second.life/scripted-agents. + Faire glisser les objets de l'inventaire ici Vous avez publié sur Facebook. Vous avez publié sur Flickr. diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 178bb90ca6..2a430ad840 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -1587,6 +1587,10 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. Chiamata in conferenza con [AGENT_NAME] Offerto oggetto di inventario "[ITEM_NAME]" Offerta cartella di inventario "[ITEM_NAME]" + +Stai parlando con un bot, [NAME]. Non condividere informazioni personali. +Scopri di più su https://second.life/scripted-agents. + Hai pubblicato su Facebook. Hai pubblicato su Flickr. Hai pubblicato su Twitter. diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index fa6c329fe7..ff3b1a53a2 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -6150,6 +6150,10 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ フォルダ「[ITEM_NAME]」がインベントリに送られてきました。 + +[NAME]とチャットしています。個人情報を共有しないでください。 +詳細は https://second.life/scripted-agents をご覧ください。 + インベントリからここにアイテムをドラッグします。 diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 26ec6cc9dc..d26272ca54 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -4413,6 +4413,10 @@ Jeżeli nadal otrzymujesz ten komunikat, skontaktuj się z [SUPPORT_SITE]. Zaoferowano folder: '[ITEM_NAME]' + +Rozmawiasz z botem [NAME]. Nie udostępniaj żadnych danych osobowych. +Dowiedz się więcej na https://second.life/scripted-agents. + Przeciągaj tutaj rzeczy z Szafy diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 6db5da2e89..4ce5694c01 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -1550,6 +1550,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Conversa com [AGENT_NAME] Item do inventário '[ITEM_NAME]' oferecido Pasta do inventário '[ITEM_NAME]' oferecida + +Você está conversando com um bot, [NAME]. Não compartilhe informações pessoais. +Saiba mais em https://second.life/scripted-agents. + Você publicou no Facebook. Você publicou no Flickr. Você publicou no Twitter. diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 61d836a2d1..9a26accdde 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -4577,6 +4577,10 @@ support@secondlife.com. Предложена папка инвентаря «[ITEM_NAME]» + +Вы общаетесь с ботом [NAME]. Не передавайте личные данные. +Подробнее на https://second.life/scripted-agents. + Перетаскивайте вещи из инвентаря сюда diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index e709a4c5d6..157b48c32a 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -4580,6 +4580,10 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. "[ITEM_NAME]" envanter klasörü sunuldu + +Bir bot ile sohbet ediyorsunuz, [NAME]. Kişisel bilgilerinizi paylaşmayın. +Daha fazla bilgi için: https://second.life/scripted-agents. + Envanterinizden buraya öğeler sürükleyin diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index bdb16c9bf1..a3a9915dc4 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -4573,6 +4573,10 @@ http://secondlife.com/support 求助解決問題。 收納區資料夾'[ITEM_NAME]'已向人提供 + +您正在与人工智能机器人 [NAME] 聊天。请勿分享任何个人信息。 +了解更多:https://second.life/scripted-agents。 + 將收納區物品拖曳到這裡 -- cgit v1.2.3 From a097f887282f6ddb20ed8a7d50f506554216a0a2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 23 Oct 2024 11:31:29 -0700 Subject: Issue #2907: Code review comments. --- indra/newview/llimprocessing.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 5d1317f00f..f5b149335b 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -453,7 +453,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, LLMuteList::isLinden(name); /*** - * The simulator has flagged this sender as a bot, if the viewer would like to display + * The simulator may have flagged this sender as a bot, if the viewer would like to display * the chat text in a different color or font, the below code is how the viewer can * tell if the sender is a bot. *----------------------------------------------------- @@ -465,14 +465,12 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, *----------------------------------------------------- */ - bool is_system_notice = false; - std::string notice_id; + std::string notice_name; LLSD notice_args; if (metadata.has("notice")) { // The server has injected a notice into the IM conversation. // These will be things like bot notifications, etc. - is_system_notice = true; - notice_id = metadata["notice"]["id"].asString(); + notice_name = metadata["notice"]["id"].asString(); notice_args = metadata["notice"]["data"]; } @@ -605,10 +603,10 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } } - if (is_system_notice) + if (!notice_name.empty()) { // The simulator has injected some sort of notice into the conversation. // findString will only replace the contents of buffer if the notice_id is found. - LLTrans::findString(buffer, notice_id, notice_args); + LLTrans::findString(buffer, notice_name, notice_args); name = SYSTEM_FROM; from_id = LLUUID::null; } -- cgit v1.2.3 From 48ccb0f75b078670ced1f8fe8d4942abe0a6f293 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 25 Oct 2024 15:52:10 -0700 Subject: Issue #2907: When passing the injected notification message into addMessage on behalf of the system, optionally specify the agent id and name that should be used. (cherry picked from commit 7ff297ec3fc5f878cc9a916678987c0033b7eb8a) --- indra/newview/llimprocessing.cpp | 10 ++++++---- indra/newview/llimview.cpp | 13 ++++++++++--- indra/newview/llimview.h | 4 +++- 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index f5b149335b..e050fb77e0 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -603,12 +603,13 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } } + std::string real_name; + if (!notice_name.empty()) { // The simulator has injected some sort of notice into the conversation. // findString will only replace the contents of buffer if the notice_id is found. LLTrans::findString(buffer, notice_name, notice_args); - name = SYSTEM_FROM; - from_id = LLUUID::null; + real_name = SYSTEM_FROM; } gIMMgr->addMessage(session_id, @@ -622,8 +623,9 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, region_id, position, region_message, - timestamp); - + timestamp, + LLUUID::null, + real_name); } else { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7a2f1486ae..21c255f226 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3142,9 +3142,16 @@ void LLIMMgr::addMessage( const LLUUID& region_id, const LLVector3& position, bool is_region_msg, - U32 timestamp) // May be zero + U32 timestamp, // May be zero + LLUUID display_id, + std::string_view display_name) { LLUUID other_participant_id = target_id; + std::string message_display_name = (display_name.empty()) ? from : std::string(display_name); + if (display_id.isNull() && (display_name.empty())) + { + display_id = other_participant_id; + } LLUUID new_session_id = session_id; if (new_session_id.isNull()) @@ -3240,7 +3247,7 @@ void LLIMMgr::addMessage( } //Play sound for new conversations - if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation"))) + if (!skip_message && !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation"))) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -3254,7 +3261,7 @@ void LLIMMgr::addMessage( if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { - LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg, true, is_region_msg, timestamp); + LLIMModel::instance().addMessage(new_session_id, message_display_name, display_id, msg, true, is_region_msg, timestamp); } // Open conversation floater if offline messages are present diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 61776860e3..23f90ca795 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -368,7 +368,9 @@ public: const LLUUID& region_id = LLUUID::null, const LLVector3& position = LLVector3::zero, bool is_region_msg = false, - U32 timestamp = 0); + U32 timestamp = 0, + LLUUID display_id = LLUUID::null, + std::string_view display_name = ""); void addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args); -- cgit v1.2.3 From 09af45daa3e63bc6a5df064e1cc40e3ec4e18e70 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 8 Nov 2024 16:49:34 -0800 Subject: Server Issue #1493: New notification message for llTransferOwnership. --- indra/newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b5f742e5fb..36d6ef8dbf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10326,6 +10326,14 @@ You are now the owner of object [OBJECT_NAME] + fail +You are now the owner of object [OBJECT_NAME] and it has been placed in your inventory. + + + fail -- cgit v1.2.3 From 942527ddf39925e3e77d5c4e30a0fdc245156ada Mon Sep 17 00:00:00 2001 From: William Weaver Date: Tue, 11 Mar 2025 21:34:45 +0300 Subject: **fix: Correctly update shadows on RenderShadowResolutionScale change** MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shadows were not updating correctly after a shader change occurred in-session and then the RenderShadowResolutionScale setting was adjusted. This issue is present in Second Life Release 7.1.12.1355088671 (64-bit) and Second Life Test 7.1.12.250701803 (64-bit). **Specifically, after any shader-related setting is changed in-session (such as toggling Advanced Graphics options like SSAO, HDR, Depth of Field, SSR, Antialiasing, or changing the Graphics Quality preset), subsequent adjustments to `RenderShadowResolutionScale` via Debug Settings result in broken shadow rendering.** The shadows become corrupted or disappear entirely and do not reflect the new resolution scale. Correct shadow rendering is only restored by toggling a shader or restarting the viewer. This behavior is inconsistent with other render settings that update immediately after modification and degrades the user experience when dynamically adjusting shadow quality. This commit changes the signal listener for "RenderShadowResolutionScale" in **llviewercontrol.cpp** from `handleShadowsResized` to `handleSetShaderChanged`. `handleSetShaderChanged` ensures a full shader update, which is necessary for this setting to take effect immediately—similar to other render settings like RenderDeferredSSAO. This change ensures that shadows update correctly and immediately when the resolution scale is changed in Debug Settings, even after prior shader changes in the session, without requiring additional shader toggling or viewer restarts. This provides a smoother and more responsive experience for advanced users adjusting shadow quality in various rendering scenarios. --- **Steps to Reproduce (Bug)** _Verified in Second Life Release 7.1.12.1355088671 (64-bit) and Second Life Test 7.1.12.250701803 (64-bit):_ 1. **Fresh Install Preparation:** Ensure a clean Second Life installation state. Ideally, uninstall and reinstall the viewer or clear/rename all folders in `AppData\Local\Second Life` and `AppData\Roaming\Second Life` before launching. 2. Launch the Second Life Viewer and log in. 3. Enable the Debug Menu: Open Preferences (Ctrl+P), go to the "Advanced" tab, and check "Show Advanced Settings". 4. Open Debug Settings: Click the "Advanced" menu in the menu bar and select "Debug Settings." 5. Locate the `RenderShadowResolutionScale` setting (which should be set to 1.0 on a clean install). 6. Initially, changing `RenderShadowResolutionScale` at this point may not exhibit the bug. Proceed to the next steps to reliably trigger it. 7. **Trigger the Bug:** Open Preferences (Ctrl+P) again and go to the "Graphics" tab. 8. Click the "Advanced Settings" button. 9. **Toggle *any* of the following Advanced Graphics options:** - Screen Space Ambient Occlusion - HDR and Emissive Rendering - Depth of Field - Screen Space Reflections - Antialiasing - *Alternatively*, change the "Graphics Quality" preset slider (e.g., Low to Ultra or any other change). 10. Return to the Debug Settings floater. 11. Change the value of `RenderShadowResolutionScale` to a different value (e.g., from 1.0 to 0.5 or 2.0). 12. **Observe the Bug:** Notice that shadow rendering does not update correctly—shadows become corrupted or disappear. 13. **Workaround (in buggy version):** To restore correct shadow rendering without the fix, either: - Toggle a different shader (e.g., change graphics presets in Preferences, or toggle SSAO, SSR, etc.), or - Restart the viewer. **Steps to Verify (Fix):** 1. Build the viewer with this commit applied. 2. Launch the viewer and log in. 3. Repeat steps 1–9 from "Steps to Reproduce (Bug)" to ensure an Advanced Graphics setting is toggled before proceeding. 4. Open Debug Settings and locate `RenderShadowResolutionScale`. 5. Change the value of `RenderShadowResolutionScale` (e.g., from 1.0 to 0.5 or 2.0). 6. **Verify the Fix:** Confirm that shadow rendering updates immediately and correctly—even after toggling Advanced Graphics settings—with the shadows visibly changing resolution in real time. No shader toggling or viewer restart is required. --- - No specific regression testing is required for this targeted fix. However, standard viewer functionality should be verified after building to ensure no unintended side effects have been introduced. Pay particular attention to shadow rendering in various environments and lighting conditions to confirm the fix has not negatively impacted other shadow-related features. --- - No documentation changes are needed as this is a bug fix for an existing debug setting. --- indra/newview/llviewercontrol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 598ad89907..1f5ac61040 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -809,7 +809,9 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderAnisotropic", handleAnisotropicChanged); - setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleShadowsResized); + // Ensure shader update on shadow resolution scale change for correct shadow rendering. + // setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleShadowsResized); // Original line commented out + setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlowResolutionPow", handleReleaseGLBufferChanged); -- cgit v1.2.3 From 76db64e0c8c7dd40ce2a85ef19183c3c245f1dc8 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Wed, 12 Mar 2025 19:52:56 +0300 Subject: Fixes: Add guard to prevent shadow texture resize with invalid mRT dimensions after shader changes; **Replaces forced shader refresh with lightweight guard** MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a guard in `LLPipeline::resizeShadowTexture()` to prevent shadow texture resizing when the shadow render target (mRT) has invalid (zero) dimensions. **This replaces a previous, less efficient approach of forcing a full shader recompile whenever `RenderShadowResolutionScale` was changed in-session.** **Background and Problem:** Previously, the code forced a full shader recompile whenever `RenderShadowResolutionScale` changed in-session (after toggling advanced graphics settings like SSAO or HDR). While this “sledgehammer” approach did fix broken shadow rendering, it unnecessarily thrashed the shader cache and reset many pipeline states. **Solution:** This commit removes the forced shader recompile in favor of a guard check in `LLPipeline::resizeShadowTexture()`. The guard ensures mRT (the shadow render target) has non-zero dimensions before resizing. If mRT is zero for that frame, the resize operation is skipped, and a warning is logged. Once mRT becomes valid (usually in the next frame), the shadow texture is resized successfully without requiring a full shader refresh. **Detailed changes:** - Reverted the binding of `RenderShadowResolutionScale` to `handleSetShaderChanged`. - Restored the original `handleShadowsResized` listener for `RenderShadowResolutionScale` in `llviewercontrol.cpp`. - Added guard checks in `LLPipeline::resizeShadowTexture()` to skip resizing when `mRT->width` or `mRT->height` is zero. - Added logging statements to track how many frames are skipped. **Benefits:** - Prevents shader thrashing while still avoiding shadow corruption. - Shadows now update correctly as soon as mRT dimensions are valid. - Maintains a detailed record of frames skipped. - **Lightweight and targeted interim solution, much less disruptive than a full shader recompile.** Testing: 1. Reproduce the bug as described in the bug report (toggle SSAO, then change RenderShadowResolutionScale). 2. Verify that shadows are no longer broken after these steps. 3. Check the logs for the warning message indicating skipped frames when the bug is triggered. 4. Confirm that under normal operation (without shader changes causing mRT issues), shadow resizing works as expected without excessive warnings. Documentation: No user-facing documentation changes are needed for this interim fix. However, internal developer documentation should note this guard and the ongoing investigation into the root cause. Further Development: This guard is a temporary fix. The root cause of why mRT becomes invalid after shader changes needs to be investigated and resolved. See the bug report for detailed next steps for investigation. --- indra/newview/llviewercontrol.cpp | 4 +--- indra/newview/pipeline.cpp | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 1f5ac61040..598ad89907 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -809,9 +809,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderAnisotropic", handleAnisotropicChanged); - // Ensure shader update on shadow resolution scale change for correct shadow rendering. - // setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleShadowsResized); // Original line commented out - setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleSetShaderChanged); + setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleShadowsResized); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlowResolutionPow", handleReleaseGLBufferChanged); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 18dd694246..691d155a3c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -121,7 +121,7 @@ #include "SMAAAreaTex.h" #include "SMAASearchTex.h" - +#include "llerror.h" #ifndef LL_WINDOWS #define A_GCC 1 #pragma GCC diagnostic ignored "-Wunused-function" @@ -727,6 +727,29 @@ void LLPipeline::requestResizeShadowTexture() void LLPipeline::resizeShadowTexture() { + // A static counter to keep track of skipped frames + static int sSkippedFrameCount = 0; + + if (!mRT || mRT->width == 0 || mRT->height == 0) + { + sSkippedFrameCount++; + LL_WARNS("Render") << "Shadow texture resizing aborted: render target dimensions invalid. Skipped " + << sSkippedFrameCount << " frame(s) so far." << LL_ENDL; + return; + } + + // If there were skipped frames before mRT became valid, log that information. + if (sSkippedFrameCount > 0) + { + LL_INFOS("Render") << "Render target now valid after " + << sSkippedFrameCount << " skipped frame(s)." << LL_ENDL; + sSkippedFrameCount = 0; + } + + LL_WARNS() << "LLPipeline::resizeShadowTexture() called." << LL_ENDL; + LL_INFOS() << "Resizing shadow texture. mRT->width = " + << mRT->width << " mRT->height = " << mRT->height << LL_ENDL; + releaseSunShadowTargets(); releaseSpotShadowTargets(); allocateShadowBuffer(mRT->width, mRT->height); -- cgit v1.2.3 From 423df2ba4b731417796478c449e3e8f3d166ef21 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 21 Mar 2025 07:18:13 -0700 Subject: prevent erroneous edit of wrong parcel (#3759) * prevent erroneous edit of wrong parcel Fixes jira-archive-internal/issues/70771 [SL-20409] Erroneous Local Parcel Twins - Parcel Updates Across Region Borders - unrequested updateDatabaseParcel changes * remove unused argument in sendParcelPropertiesUpdate() --- indra/llinventory/llparcel.h | 3 +++ indra/newview/llviewerparcelmgr.cpp | 12 +++++++++--- indra/newview/llviewerparcelmgr.h | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 67d713db1f..759638b956 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -262,6 +262,8 @@ public: void setMediaURLResetTimer(F32 time); virtual void setLocalID(S32 local_id); + void setRegionID(const LLUUID& id) { mRegionID = id; } + const LLUUID& getRegionID() const { return mRegionID; } // blow away all the extra stuff lurking in parcels, including urls, access lists, etc void clearParcel(); @@ -651,6 +653,7 @@ public: S32 mLocalID; LLUUID mBanListTransactionID; LLUUID mAccessListTransactionID; + LLUUID mRegionID; std::map mAccessList; std::map mBanList; std::map mTempBanList; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 8e6657b4b9..1a5c40064a 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1327,12 +1327,12 @@ const S32 LLViewerParcelMgr::getAgentParcelId() const return INVALID_PARCEL_ID; } -void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region) +void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel) { if(!parcel) return; - LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromID(parcel->getRegionID()); if (!region) return; @@ -1676,10 +1676,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use // Actually extract the data. if (parcel) { + // store region_id in the parcel so we can find it again later + LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender()); + if (parcel_region) + { + parcel->setRegionID(parcel_region->getRegionID()); + } + if (local_id == parcel_mgr.mAgentParcel->getLocalID()) { // Parcels in different regions can have same ids. - LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender()); LLViewerRegion* agent_region = gAgent.getRegion(); if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID()) { diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 974ea39359..086bca4878 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -219,7 +219,7 @@ public: // containing the southwest corner of the selection. // If want_reply_to_update, simulator will send back a ParcelProperties // message. - void sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region = false); + void sendParcelPropertiesUpdate(LLParcel* parcel); // Takes an Access List flag, like AL_ACCESS or AL_BAN void sendParcelAccessListUpdate(U32 which); -- cgit v1.2.3 From e1ebb33ab2966a20b63741dd84a0826e82b6a807 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Fri, 28 Mar 2025 04:28:36 +0300 Subject: fix(pipeline): Remove incorrect zeroing of mRT dimensions in createGLBuffers Resolves the root cause of shadow rendering failures when changing RenderShadowResolutionScale immediately after modifying other graphics settings (e.g., SSAO, HDR). Investigation revealed that LLPipeline::createGLBuffers, which is called during certain graphics setting changes that require full buffer recreation, contained lines that incorrectly set mRT->width and mRT->height to zero *after* the call to allocateScreenBuffer had already established the correct dimensions. This created a state inconsistency. If RenderShadowResolutionScale was changed immediately following the graphics setting change, the subsequent call to LLPipeline::resizeShadowTexture (triggered via handleShadowsResized) would read these incorrect zero dimensions from mRT. This led to failed shadow buffer allocation (allocateShadowBuffer(0, 0)) and resulted in corrupted or missing shadows. This commit removes the erroneous mRT->width = 0 and mRT->height = 0 lines from the end of createGLBuffers. This ensures that the render target dimensions remain valid after buffer recreation. With this fix, resizeShadowTexture now correctly reads the valid screen dimensions immediately following a graphics setting change and successfully resizes the shadow buffers without delay or error. This eliminates the need for previous workarounds like guard conditions or forced shader recompiles. Ref: #3719 --- indra/newview/pipeline.cpp | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 691d155a3c..6adf203ea1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -727,29 +727,6 @@ void LLPipeline::requestResizeShadowTexture() void LLPipeline::resizeShadowTexture() { - // A static counter to keep track of skipped frames - static int sSkippedFrameCount = 0; - - if (!mRT || mRT->width == 0 || mRT->height == 0) - { - sSkippedFrameCount++; - LL_WARNS("Render") << "Shadow texture resizing aborted: render target dimensions invalid. Skipped " - << sSkippedFrameCount << " frame(s) so far." << LL_ENDL; - return; - } - - // If there were skipped frames before mRT became valid, log that information. - if (sSkippedFrameCount > 0) - { - LL_INFOS("Render") << "Render target now valid after " - << sSkippedFrameCount << " skipped frame(s)." << LL_ENDL; - sSkippedFrameCount = 0; - } - - LL_WARNS() << "LLPipeline::resizeShadowTexture() called." << LL_ENDL; - LL_INFOS() << "Resizing shadow texture. mRT->width = " - << mRT->width << " mRT->height = " << mRT->height << LL_ENDL; - releaseSunShadowTargets(); releaseSpotShadowTargets(); allocateShadowBuffer(mRT->width, mRT->height); @@ -1309,8 +1286,11 @@ void LLPipeline::createGLBuffers() } allocateScreenBuffer(resX, resY); - mRT->width = 0; - mRT->height = 0; + // Do not zero out mRT dimensions here. allocateScreenBuffer() above + // already sets the correct dimensions. Zeroing them caused resizeShadowTexture() + // to fail if called immediately after createGLBuffers (e.g., post graphics change). + // mRT->width = 0; + // mRT->height = 0; if (!mNoiseMap) -- cgit v1.2.3 From 04af0424359d55ddb8056dc1693c078eadaee239 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Wed, 2 Apr 2025 02:13:01 +0300 Subject: Fix(EnvAdjust): Ensure cloud texture selection updates the sky Problem: When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust) using the cloud map texture picker, the sky rendering did not update to reflect the selected texture. The callback only updated the internal mLiveSky object and its subsequent call to mLiveSky->update() was insufficient to trigger a live render update. Cause: The onCloudMapChanged callback modified the mLiveSky settings object directly and called its update() method. However, in the context of live environment adjustments, changes require propagation through the central LLEnvironment singleton to correctly update the active environment layer (ENV_LOCAL) and signal the renderer. Relying solely on the settings object's update() method bypassed this necessary mechanism. Solution: This commit refactors onCloudMapChanged to correctly handle the update: 1. Uses the LLEnvironment singleton to manage the state change: - Explicitly targets the local environment layer (ENV_LOCAL) via setSelectedEnvironment(). - Clones the mLiveSky settings object. - Uses LLEnvironment::setEnvironment() to apply the modified clone to the ENV_LOCAL layer. - Uses LLEnvironment::updateEnvironment() to trigger the render update. 2. Synchronizes the UI preview: - Calls picker_ctrl->setValue() on the LLTextureCtrl widget after the environment update to ensure the UI preview matches the applied texture. Result: Selecting a cloud texture in the Environment Settings floater now correctly updates both the sky rendering and the UI preview widget simultaneously. Testing: - Open World -> Environment Editor -> Environment Settings. - Go to the Clouds tab. - Click the cloud texture preview to open the texture picker. - Select a new cloud texture and click OK. - Verify the sky updates immediately to use the selected texture. - Verify the texture preview in the floater also updates immediately. - Repeat with several different textures to confirm consistent behavior. --- indra/newview/llfloaterenvironmentadjust.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index 35f8340997..b137d71c22 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -456,8 +456,26 @@ void LLFloaterEnvironmentAdjust::onCloudMapChanged() { if (!mLiveSky) return; - mLiveSky->setCloudNoiseTextureId(getChild(FIELD_SKY_CLOUD_MAP)->getValue().asUUID()); + + // Get the texture picker control + LLTextureCtrl* picker_ctrl = getChild(FIELD_SKY_CLOUD_MAP); + if (!picker_ctrl) + { + // Optional: Log an error if the control isn't found, though unlikely + return; + } + + // Get the new texture ID selected by the user + LLUUID new_texture_id = picker_ctrl->getValue().asUUID(); + + // Update the internal sky settings object + mLiveSky->setCloudNoiseTextureId(new_texture_id); + + // Trigger the update for the sky rendering mLiveSky->update(); + + // Explicitly refresh the UI picker control to match the applied change + picker_ctrl->setValue(new_texture_id); } void LLFloaterEnvironmentAdjust::onWaterMapChanged() -- cgit v1.2.3 From 61ba4b0d7705ca12b606d238d48a0b1bc370bf31 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Wed, 2 Apr 2025 03:45:54 +0300 Subject: Fix(XUI): Remove unrecognized user_resize attribute from sun_moon_trackball Problem: A warning "Failed to parse parameter 'user_resize.'" appeared in the logs during UI loading, originating from sun_moon_trackball.xml. Cause: The 'user_resize' attribute is not a recognized or utilized parameter for the 'sun_moon_trackball' widget type, as defined in the corresponding C++ (LLVirtualTrackball). Solution: Removed the extraneous 'user_resize="false"' line from the sun_moon_trackball.xml widget definition. Result: Eliminates the parsing warning from the logs upon viewer startup or UI reload. Testing: - Launch viewer. - Check logs for the absence of the "Failed to parse parameter 'user_resize.'" warning. --- indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml b/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml index cdeff6ab05..f246ff764a 100644 --- a/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml +++ b/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml @@ -3,7 +3,6 @@ name="virtualtrackball" width="150" height="150" - user_resize="false" increment_angle_mouse="1.5f" increment_angle_btn="1.0f" image_sphere="VirtualTrackball_Sphere" -- cgit v1.2.3 From be595b440321dcad842be5d982d20fd601bb8b4c Mon Sep 17 00:00:00 2001 From: William Weaver Date: Wed, 2 Apr 2025 04:09:00 +0300 Subject: Fix(XUI): Resolve parsing warnings for Fixed Environment editor widgets Problem: Opening the Fixed Environment floater generated three distinct XUI parsing warnings in the logs: - Failed to parse parameter "decimal_digits." in xy_vector.xml - Failed to parse parameter "user_resize." in xy_vector.xml - Failed to parse parameter "logarithmic." in panel_settings_sky_clouds.xml Cause: These attributes were either not recognized/utilized by the underlying C++ widget implementations ('decimal_digits', 'user_resize' in LLXYVector) or were using an incorrect value ('logarithmic="1"' instead of a boolean 'true'/'false' in LLSliderCtrl). Solution: This commit addresses these three warnings: - Removed the extraneous 'decimal_digits' and 'user_resize' attributes from the definition of the 'xyvector' widget in xy_vector.xml. - Corrected the 'logarithmic' attribute value from "1" to "true" for the 'cloud_scroll_xy' slider in panel_settings_sky_clouds.xml. Result: Eliminates these specific parsing warnings from the logs when the Fixed Environment floater is opened. Testing: - Launch viewer. - Open World -> Environment Editor -> My Environments. - Select a sky setting and click Edit (or create a New one). - Observe the logs upon the Fixed Environment floater opening. - Verify the absence of the 'decimal_digits', 'user_resize' (from xy_vector.xml), and 'logarithmic' (from panel_settings_sky_clouds.xml) parsing warnings. --- indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml | 2 +- indra/newview/skins/default/xui/en/widgets/xy_vector.xml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml index 7687f7cd96..23bbf45e88 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml @@ -139,7 +139,7 @@ max_val_x="30" min_val_y="-30" max_val_y="30" - logarithmic="1"/> + logarithmic="true"/> + edit_bar_height="18"> -- cgit v1.2.3 From 2bb4de97e43a32589434a35b617a36c2dfda22ee Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Wed, 2 Apr 2025 18:18:17 +1000 Subject: Fix normal and specular repeats per meter scaling --- indra/newview/llpanelface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index c080d72580..5a2a8ce128 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -3592,7 +3592,7 @@ void LLPanelFace::onCommitRepeatsPerMeter() bool identical_scale_t = false; LLSelectedTE::getObjectScaleS(obj_scale_s, identical_scale_s); - LLSelectedTE::getObjectScaleS(obj_scale_t, identical_scale_t); + LLSelectedTE::getObjectScaleT(obj_scale_t, identical_scale_t); if (gSavedSettings.getBOOL("SyncMaterialSettings")) { @@ -5086,6 +5086,7 @@ void LLPanelFace::LLSelectedTEMaterial::getMaxSpecularRepeats(F32& repeats, bool LLMaterial* mat = object->getTE(face)->getMaterialParams().get(); U32 s_axis = VX; U32 t_axis = VY; + LLPrimitive::getTESTAxes(face, &s_axis, &t_axis); F32 repeats_s = 1.0f; F32 repeats_t = 1.0f; if (mat) @@ -5110,6 +5111,7 @@ void LLPanelFace::LLSelectedTEMaterial::getMaxNormalRepeats(F32& repeats, bool& LLMaterial* mat = object->getTE(face)->getMaterialParams().get(); U32 s_axis = VX; U32 t_axis = VY; + LLPrimitive::getTESTAxes(face, &s_axis, &t_axis); F32 repeats_s = 1.0f; F32 repeats_t = 1.0f; if (mat) -- cgit v1.2.3 From 1fcabcdd324305ccfafb59b9c9ef5e04ef859a4d Mon Sep 17 00:00:00 2001 From: William Weaver Date: Fri, 4 Apr 2025 16:02:08 +0300 Subject: Fix(EnvAdjust): Properly update sky after cloud texture selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust), the sky did not visually update. The code previously only updated LiveSky->setCloudNoiseTextureId() and called mLiveSky->update(), which failed to notify the global LLEnvironment mechanism or the renderer about the new texture. Cause: Relying solely on mLiveSky for environment changes is insufficient. To update the live environment layer (ENV_LOCAL) and trigger a render refresh, calls to LLEnvironment::setEnvironment() and LLEnvironment::updateEnvironment() are required. Solution: 1. Remove an unnecessary null-check for getChild, as getChild() never returns null. 2. Clone the current sky settings (mLiveSky->buildClone()) to avoid modifying a shared environment object directly. 3. Apply the new cloud texture ID to the clone. 4. Use LLEnvironment::setEnvironment(ENV_LOCAL, sky_to_set) to apply the updated settings to the user's local environment override. 5. Call LLEnvironment::updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true) to ensure the renderer recognizes and displays the updated texture immediately. 6. Reset the picker control’s value to match the newly applied texture for UI consistency. Additional Note: A partial implementation was inadvertently committed earlier (commit`04af042`) due to a local staging error. This commit supersedes that incomplete change by correctly implementing the intended fix. Result: Selecting a new cloud texture from LLFloaterEnvironmentAdjust now immediately updates both the in-world sky rendering and the texture preview UI, ensuring consistency and clarity for users. Testing: - Open the Personal Lighting floater and select various cloud textures. - Verify that the sky updates immediately for each new selection. - Confirm that the texture picker also updates to reflect the selected texture. --- indra/newview/llfloaterenvironmentadjust.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index b137d71c22..58616995d3 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -455,26 +455,28 @@ void LLFloaterEnvironmentAdjust::onMoonAzimElevChanged() void LLFloaterEnvironmentAdjust::onCloudMapChanged() { if (!mLiveSky) + { return; + } - // Get the texture picker control LLTextureCtrl* picker_ctrl = getChild(FIELD_SKY_CLOUD_MAP); - if (!picker_ctrl) + + LLUUID new_texture_id = picker_ctrl->getValue().asUUID(); + + LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + + LLSettingsSky::ptr_t sky_to_set = mLiveSky->buildClone(); + if (!sky_to_set) { - // Optional: Log an error if the control isn't found, though unlikely - return; + return; } - // Get the new texture ID selected by the user - LLUUID new_texture_id = picker_ctrl->getValue().asUUID(); + sky_to_set->setCloudNoiseTextureId(new_texture_id); - // Update the internal sky settings object - mLiveSky->setCloudNoiseTextureId(new_texture_id); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, sky_to_set); - // Trigger the update for the sky rendering - mLiveSky->update(); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true); - // Explicitly refresh the UI picker control to match the applied change picker_ctrl->setValue(new_texture_id); } -- cgit v1.2.3 From cfbcdd713baf1a1027281832f5f41ce5b99fafd7 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Mon, 7 Apr 2025 16:57:12 +0300 Subject: Fix: Remove potentially redundant RenderAutoHideSurfaceAreaLimit setting registration This commit removes a seemingly duplicated `connectRefreshCachedSettingsSafe` call in `LLPipeline::init()` for the `RenderAutoHideSurfaceAreaLimit` setting. A duplicated registration for this setting was identified during a review of `LLPipeline::init()`. Double registration can lead to unexpected behavior, including potential CPU overhead. The duplication *may* have been introduced with commit 440c7b2 (Added CollectFontVertexBuffers feature), though this requires further confirmation. Testing Performed: After removing the duplicate registration, the `RenderAutoHideSurfaceAreaLimit` functionality was validated by ensuring the following behavior (consistent with the existing code): * A value of 0 (zero) causes all objects to appear regardless of size. * Values slightly above zero result in only small objects appearing, with all others hidden. * Increasing the value causes objects of increasing size to appear, while smaller objects remain visible. This change merits careful review to ensure it has no unintended side effects, and to confirm the accuracy of these observations from other developers. --- indra/newview/pipeline.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6adf203ea1..aa82b28bf7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -599,7 +599,6 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderMirrors"); connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate"); connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier"); - connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit"); LLPointer cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers"); if (cntrl_ptr.notNull()) -- cgit v1.2.3 From c07817c3d26095de569e9193ade2b9040b7be8c0 Mon Sep 17 00:00:00 2001 From: William Weaver Date: Fri, 11 Apr 2025 02:23:52 +0300 Subject: Fix(Tonemap): Correct blend logic to preserve HDR detail The blending operation for the `tonemap_mix` uniform in `postDeferredTonemap.glsl` incorrectly used a prematurely clamped color value as the source for the linear mix target. Specifically, the exposed HDR input color was clamped to the [0, 1] LDR range before being used in the `mix()` function when `tonemap_mix < 1.0`. This premature clamping resulted in the loss of High Dynamic Range (HDR) detail in highlights during the blend operation. As `tonemap_mix` was reduced, instead of smoothly blending towards the linear scene representation, clipped highlights were incorrectly reintroduced. This commit modifies the `toneMap` and `toneMapNoExposure` functions to correct this logic: 1. The original linear input color is preserved before exposure/processing. 2. The appropriate exposure factor is calculated and applied separately. 3. The chosen tone mapping operator is applied to the exposed color, storing the result. 4. The `mix()` function now correctly blends between the appropriately scaled, *unclamped* linear input color and the fully tone-mapped result. 5. The final clamp to the [0, 1] LDR range is applied *after* the blend operation. This change ensures that HDR information is preserved throughout the blending process, resulting in a smoother, more perceptually correct visual transition as `tonemap_mix` is adjusted. While the effect is nuanced, it is noticeable in bright highlights; with the legacy code, these highlights appeared visibly clipped and less intense during the blend, whereas the corrected code allows them to retain their peak brightness and detail more accurately. This makes the `tonemap_mix` control more intuitive, behaving as a true intensity blend for the tone mapping effect without introducing clipping artifacts. The computational cost is negligible. --- .../shaders/class1/deferred/tonemapUtilF.glsl | 37 ++++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class1/deferred/tonemapUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/tonemapUtilF.glsl index a63b8d7c2b..774ccb6baf 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/tonemapUtilF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/tonemapUtilF.glsl @@ -117,27 +117,34 @@ uniform float exposure; uniform float tonemap_mix; uniform int tonemap_type; + vec3 toneMap(vec3 color) { #ifndef NO_POST - float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r; - - color *= exposure * exp_scale; + vec3 linear_input_color = color; - vec3 clamped_color = clamp(color.rgb, vec3(0.0), vec3(1.0)); + float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r; + float final_exposure = exposure * exp_scale; + vec3 exposed_color = color * final_exposure; + vec3 tonemapped_color = exposed_color; switch(tonemap_type) { case 0: - color = PBRNeutralToneMapping(color); + tonemapped_color = PBRNeutralToneMapping(exposed_color); break; case 1: - color = toneMapACES_Hill(color); + tonemapped_color = toneMapACES_Hill(exposed_color); break; } - // mix tonemapped and linear here to provide adjustment - color = mix(clamped_color, color, tonemap_mix); + vec3 exposed_linear_input = linear_input_color * final_exposure; + color = mix(exposed_linear_input, tonemapped_color, tonemap_mix); + + color = clamp(color, 0.0, 1.0); +#else + color *= exposure * texture(exposureMap, vec2(0.5,0.5)).r; + color = clamp(color, 0.0, 1.0); #endif return color; @@ -147,20 +154,24 @@ vec3 toneMap(vec3 color) vec3 toneMapNoExposure(vec3 color) { #ifndef NO_POST - vec3 clamped_color = clamp(color.rgb, vec3(0.0), vec3(1.0)); + vec3 linear_input_color = color; + vec3 tonemapped_color = color; switch(tonemap_type) { case 0: - color = PBRNeutralToneMapping(color); + tonemapped_color = PBRNeutralToneMapping(color); break; case 1: - color = toneMapACES_Hill(color); + tonemapped_color = toneMapACES_Hill(color); break; } - // mix tonemapped and linear here to provide adjustment - color = mix(clamped_color, color, tonemap_mix); + color = mix(linear_input_color, tonemapped_color, tonemap_mix); + + color = clamp(color, 0.0, 1.0); +#else + color = clamp(color, 0.0, 1.0); #endif return color; -- cgit v1.2.3