From 6d2714ac85815699599501538a397ccba109c6c6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Sep 2021 14:22:28 +0100 Subject: SL-15999 - added --noninteractive command line option --- indra/newview/app_settings/cmd_line.xml | 8 ++++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 4e186292f7..7514913d13 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -217,6 +217,14 @@ NoInventoryLibrary + noninteractive + + desc + Run in semi-headless mode where only login and logout need to work. + map-to + NonInteractive + + nonotifications desc diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b1120c18b2..6ff94e1afd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7026,6 +7026,17 @@ Value 0 + NonInteractive + + Comment + Run in a semi-headless mode where only logging in and logging out needs to work. + Persist + 1 + Type + Boolean + Value + 0 + NonvisibleObjectsInMemoryTime Comment -- cgit v1.2.3 From 411c9aa485e1d6e260a261257f64aeac9f244963 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Sep 2021 14:29:39 +0100 Subject: SL-15999 - skip plugins in NonInteractive mode --- indra/newview/llviewermedia.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d35dbda907..82152a6cf5 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1687,6 +1687,11 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) /*static*/ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target, bool clean_browser) { + if (gSavedSettings.getBOOL("NonInteractive")) + { + return NULL; + } + std::string plugin_basename = LLMIMETypes::implType(media_type); LLPluginClassMedia* media_source = NULL; -- cgit v1.2.3 From 4ab77cdb60465d655a05cf7f1e9de73867284ac1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Sep 2021 18:39:02 +0100 Subject: SL-15999 - throttle frame rate even more when noninteractive --- indra/newview/llappviewer.cpp | 9 +++++++++ indra/newview/pipeline.cpp | 11 +++++++++++ 2 files changed, 20 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 891722e1bd..6ff9b2b2eb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1557,6 +1557,15 @@ bool LLAppViewer::doFrame() ms_sleep(yield_time); } + static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); + if (s_non_interactive) + { + S32 non_interactive_ms_sleep_time = 1000; + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); + ms_sleep(non_interactive_ms_sleep_time); + } + // yield cooperatively when not running as foreground window // and when not quiting (causes trouble at mac's cleanup stage) if (!LLApp::isExiting() diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index cd1b9c7c69..6d2eafd7c0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -487,6 +487,10 @@ void LLPipeline::init() { clearAllRenderTypes(); } + else if (gSavedSettings.getBOOL("NonInteractive")) + { + clearAllRenderTypes(); + } else { setAllRenderTypes(); // By default, all rendering types start enabled @@ -1153,6 +1157,13 @@ void LLPipeline::refreshCachedSettings() RenderAutoHideSurfaceAreaLimit = gSavedSettings.getF32("RenderAutoHideSurfaceAreaLimit"); RenderSpotLight = nullptr; updateRenderDeferred(); + + bool non_interactive = gSavedSettings.getBOOL("NonInteractive"); + if (non_interactive) + { + LLVOAvatar::sMaxNonImpostors = 1; + LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); + } } void LLPipeline::releaseGLBuffers() -- cgit v1.2.3 From 0918958507c9140cca0f4026ecef210eac9aef3a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 17 Sep 2021 16:45:56 +0100 Subject: SL-15999 - disable various types of loading in noninteractive mode --- indra/newview/llviewerobject.cpp | 19 +++++++++++++++---- indra/newview/llviewerobjectlist.cpp | 5 +++-- indra/newview/pipeline.cpp | 8 ++++---- 3 files changed, 22 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b88baf6aa7..1852d4980f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -153,13 +153,21 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL; dumpStack("ObjectUpdateStack"); + static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); + LLViewerObject *res = NULL; LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT); switch (pcode) { case LL_PCODE_VOLUME: - res = new LLVOVolume(id, pcode, regionp); break; + { + if (!s_non_interactive) + { + res = new LLVOVolume(id, pcode, regionp); break; + } + break; + } case LL_PCODE_LEGACY_AVATAR: { if (id == gAgentID) @@ -193,9 +201,12 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); - avatar->initInstance(); - res = avatar; + if (!s_non_interactive) + { + LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); + avatar->initInstance(); + res = avatar; + } } break; } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 63e48d1dd0..9fe80b38d6 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -80,6 +80,7 @@ #include "llfloaterperms.h" #include "llvocache.h" #include "llcorehttputil.h" +#include "llstartup.h" #include #include @@ -303,9 +304,10 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { + static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); LLDataPacker *cached_dpp = entry->getDP(); - if (!cached_dpp) + if (!cached_dpp || s_non_interactive) { return NULL; //nothing cached. } @@ -2051,7 +2053,6 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { - LLUUID fullid; if (uuid == LLUUID::null) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6d2eafd7c0..43ae0c2e76 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -487,10 +487,10 @@ void LLPipeline::init() { clearAllRenderTypes(); } - else if (gSavedSettings.getBOOL("NonInteractive")) - { - clearAllRenderTypes(); - } + //else if (gSavedSettings.getBOOL("NonInteractive")) +// { + // clearAllRenderTypes(); + //} else { setAllRenderTypes(); // By default, all rendering types start enabled -- cgit v1.2.3 From c10d601ce8d2a6ca7e354772a217a998cd9865b3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 20 Sep 2021 13:19:20 +0100 Subject: SL-15999 - track --noninteractive state with gNonInteractive flag --- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewerobject.cpp | 7 +++---- indra/newview/llviewerobjectlist.cpp | 3 +-- indra/newview/pipeline.cpp | 3 +-- 5 files changed, 8 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6ff9b2b2eb..970bc0a83d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1557,8 +1557,7 @@ bool LLAppViewer::doFrame() ms_sleep(yield_time); } - static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); - if (s_non_interactive) + if (gNonInteractive) { S32 non_interactive_ms_sleep_time = 1000; LLAppViewer::getTextureCache()->pause(); @@ -2979,6 +2978,7 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient"); + gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 82152a6cf5..8064e998f1 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1687,7 +1687,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) /*static*/ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target, bool clean_browser) { - if (gSavedSettings.getBOOL("NonInteractive")) + if (gNonInteractive) { return NULL; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1852d4980f..528448c477 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -107,6 +107,7 @@ #include "llcleanup.h" #include "llcallstack.h" #include "llmeshrepository.h" +#include "llgl.h" //#define DEBUG_UPDATE_TYPE @@ -153,8 +154,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL; dumpStack("ObjectUpdateStack"); - static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); - LLViewerObject *res = NULL; LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT); @@ -162,7 +161,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco { case LL_PCODE_VOLUME: { - if (!s_non_interactive) + if (!gNonInteractive) { res = new LLVOVolume(id, pcode, regionp); break; } @@ -201,7 +200,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - if (!s_non_interactive) + if (!gNonInteractive) { LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); avatar->initInstance(); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 9fe80b38d6..fbd44c198b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -304,10 +304,9 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { - static LLCachedControl s_non_interactive(gSavedSettings, "NonInteractive", false); LLDataPacker *cached_dpp = entry->getDP(); - if (!cached_dpp || s_non_interactive) + if (!cached_dpp || gNonInteractive) { return NULL; //nothing cached. } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 43ae0c2e76..30703426ce 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1158,8 +1158,7 @@ void LLPipeline::refreshCachedSettings() RenderSpotLight = nullptr; updateRenderDeferred(); - bool non_interactive = gSavedSettings.getBOOL("NonInteractive"); - if (non_interactive) + if (gNonInteractive) { LLVOAvatar::sMaxNonImpostors = 1; LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); -- cgit v1.2.3 From 9bb566ea26c7fd5d93b5b42a9ee3f4aba92ebf7a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 20 Sep 2021 14:03:19 +0100 Subject: SL-15999 - support for temporarily changing other settings while noninteractive, including a fix for unwanted SLURL redirects --- indra/newview/llappviewer.cpp | 68 ++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 970bc0a83d..eab91f5d02 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2439,6 +2439,37 @@ namespace } } // anonymous namespace +// Set a named control temporarily for this session, as when set via the command line --set option. +bool tempSetControl(const std::string& name, const std::string& value) +{ + std::string name_part; + std::string group_part; + LLControlVariable* control = NULL; + + // Name can be further split into ControlGroup.Name, with the default control group being Global + size_t pos = name.find('.'); + if (pos != std::string::npos) + { + group_part = name.substr(0, pos); + name_part = name.substr(pos+1); + LL_INFOS() << "Setting " << group_part << "." << name_part << " to " << value << LL_ENDL; + LLControlGroup* g = LLControlGroup::getInstance(group_part); + if (g) control = g->getControl(name_part); + } + else + { + LL_INFOS() << "Setting Global." << name << " to " << value << LL_ENDL; + control = gSavedSettings.getControl(name); + } + + if (control) + { + control->setValue(value, false); + return true; + } + return false; +} + bool LLAppViewer::initConfiguration() { //Load settings files list @@ -2635,34 +2666,10 @@ bool LLAppViewer::initConfiguration() { const std::string& name = *itr; const std::string& value = *(++itr); - std::string name_part; - std::string group_part; - LLControlVariable* control = NULL; - - // Name can be further split into ControlGroup.Name, with the default control group being Global - size_t pos = name.find('.'); - if (pos != std::string::npos) + if (!tempSetControl(name,value)) { - group_part = name.substr(0, pos); - name_part = name.substr(pos+1); - LL_INFOS() << "Setting " << group_part << "." << name_part << " to " << value << LL_ENDL; - LLControlGroup* g = LLControlGroup::getInstance(group_part); - if (g) control = g->getControl(name_part); - } - else - { - LL_INFOS() << "Setting Global." << name << " to " << value << LL_ENDL; - control = gSavedSettings.getControl(name); - } - - if (control) - { - control->setValue(value, false); - } - else - { LL_WARNS() << "Failed --set " << name << ": setting name unknown." << LL_ENDL; - } + } } } } @@ -2747,6 +2754,14 @@ bool LLAppViewer::initConfiguration() } } + gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); + if (gNonInteractive) + { + tempSetControl("SLURLPassToOtherInstance", "FALSE"); + llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance")); + } + + // Handle slurl use. NOTE: Don't let SL-55321 reappear. // This initial-SLURL logic, up through the call to // sendURLToOtherInstance(), must precede LLSplashScreen::show() -- @@ -2978,7 +2993,6 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient"); - gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); -- cgit v1.2.3 From a0157baf08ab5a4ac3f667520e18a796a11b9ad7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Sep 2021 17:01:57 +0100 Subject: SL-15999 - try to force non-interactive agents to always start out standing --- indra/newview/llappviewer.cpp | 1 + indra/newview/llviewermessage.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index eab91f5d02..b6446e40ac 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2440,6 +2440,7 @@ namespace } // anonymous namespace // Set a named control temporarily for this session, as when set via the command line --set option. +// Name can be specified as ".", with default group being Global. bool tempSetControl(const std::string& name, const std::string& value) { std::string name_part; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 39c891c9c1..c99232eba0 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4049,6 +4049,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); + bool non_interactive_got_run = false; LL_DEBUGS("Messaging", "Motion") << "Processing " << num_blocks << " Animations" << LL_ENDL; @@ -4064,6 +4065,14 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); + if (gNonInteractive && (animation_id == ANIM_AGENT_RUN)) + { + // RUN requests get sent at startup for unclear + // reasons. Same avatar may get requests one run and + // not another. At least in the non-interactive case, + // we want to override these. + non_interactive_got_run = true; + } avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; // *HACK: Disabling flying mode if it has been enabled shortly before the agent @@ -4127,6 +4136,13 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) { avatarp->processAnimationStateChanges(); } + + if (non_interactive_got_run) + { + // Total kluge alert. + LL_INFOS("Messaging","Motion") << "non-interactive mode, resetting animations" << LL_ENDL; + gAgent.stopCurrentAnimations(); + } } -- cgit v1.2.3 From dc48e174c43edb770f3c2de0ac16adee5841d7ec Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Fri, 24 Sep 2021 11:46:19 -0700 Subject: SL-15999 (SL-16055) Turn off voice in non-interactive mode --- indra/newview/llvoicevivox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 4d2eac8c09..86fe7c19bd 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5358,7 +5358,9 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled) bool LLVivoxVoiceClient::voiceEnabled() { - return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); + return gSavedSettings.getBOOL("EnableVoiceChat") && + !gSavedSettings.getBOOL("CmdLineDisableVoice") && + !gNonInteractive; } void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled) -- cgit v1.2.3 From 628b9dfe0639a7dfccd05533671cbbf1d93d5ba0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Sep 2021 13:53:04 +0100 Subject: SL-15999 - removed kludgy run disablement, needs better fix --- indra/newview/llviewermessage.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c99232eba0..39c891c9c1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4049,7 +4049,6 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); - bool non_interactive_got_run = false; LL_DEBUGS("Messaging", "Motion") << "Processing " << num_blocks << " Animations" << LL_ENDL; @@ -4065,14 +4064,6 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); - if (gNonInteractive && (animation_id == ANIM_AGENT_RUN)) - { - // RUN requests get sent at startup for unclear - // reasons. Same avatar may get requests one run and - // not another. At least in the non-interactive case, - // we want to override these. - non_interactive_got_run = true; - } avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; // *HACK: Disabling flying mode if it has been enabled shortly before the agent @@ -4136,13 +4127,6 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) { avatarp->processAnimationStateChanges(); } - - if (non_interactive_got_run) - { - // Total kluge alert. - LL_INFOS("Messaging","Motion") << "non-interactive mode, resetting animations" << LL_ENDL; - gAgent.stopCurrentAnimations(); - } } -- cgit v1.2.3 From 502d37913d3df8abb4e8e103c446e24ded2996a6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Sep 2021 21:23:49 +0100 Subject: SL-15999 - noninteractive: debugging run issues, suppress AFK/Away pose --- indra/newview/llagent.cpp | 2 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llviewermessage.cpp | 5 +++++ indra/newview/llvoavatar.cpp | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 389448654a..b35eef20f7 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1481,7 +1481,7 @@ void LLAgent::resetControlFlags() //----------------------------------------------------------------------------- void LLAgent::setAFK() { - if (!gAgent.getRegion()) + if (gNonInteractive || !gAgent.getRegion()) { // Don't set AFK if we're not talking to a region yet. return; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b6446e40ac..fb69f46bc5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1559,7 +1559,7 @@ bool LLAppViewer::doFrame() if (gNonInteractive) { - S32 non_interactive_ms_sleep_time = 1000; + S32 non_interactive_ms_sleep_time = 100; LLAppViewer::getTextureCache()->pause(); LLAppViewer::getImageDecodeThread()->pause(); ms_sleep(non_interactive_ms_sleep_time); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 39c891c9c1..ab65d747ba 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4077,6 +4077,11 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) gAgent.setFlying(FALSE); } + if (gNonInteractive && animation_id == ANIM_AGENT_RUN) + { + LL_INFOS() << "Noninteractive, got run request for self" << LL_ENDL; + } + if (i < num_source_blocks) { mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e085a945a8..dad580de70 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3807,6 +3807,11 @@ LLViewerInventoryItem* recursiveGetObjectInventoryItem(LLViewerObject *vobj, LLU void LLVOAvatar::updateAnimationDebugText() { + if (isSelf() && gNonInteractive) + { + LLVector3 vel = getVelocity(); + addDebugText(llformat("vel %f %f %f\n",vel[0],vel[1],vel[2])); + } for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin(); iter != mMotionController.getActiveMotions().end(); ++iter) { -- cgit v1.2.3 From a184a0fbeea8a9dea855dc6e4fd29d81803fa738 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 28 Sep 2021 20:10:06 +0100 Subject: SL-15999 - noninteractive mode: create minimal objects,load no textures --- indra/newview/llappviewer.cpp | 2 ++ indra/newview/lltexturefetch.cpp | 4 ++++ indra/newview/llviewerobject.cpp | 29 ++++++++++++++++++----------- 3 files changed, 24 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fb69f46bc5..1f59134679 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2759,6 +2759,8 @@ bool LLAppViewer::initConfiguration() if (gNonInteractive) { tempSetControl("SLURLPassToOtherInstance", "FALSE"); + tempSetControl("RenderWater", "FALSE"); + tempSetControl("FlyingAtExit", "FALSE"); llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance")); } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f64db7beb5..9126360eed 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1139,6 +1139,10 @@ void LLTextureFetchWorker::startWork(S32 param) // Threads: Ttf bool LLTextureFetchWorker::doWork(S32 param) { + if (gNonInteractive) + { + return true; + } static const LLCore::HttpStatus http_not_found(HTTP_NOT_FOUND); // 404 static const LLCore::HttpStatus http_service_unavail(HTTP_SERVICE_UNAVAILABLE); // 503 static const LLCore::HttpStatus http_not_sat(HTTP_REQUESTED_RANGE_NOT_SATISFIABLE); // 416; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 528448c477..0832415e1e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -156,15 +156,25 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco LLViewerObject *res = NULL; LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT); - + + if (gNonInteractive + && pcode != LL_PCODE_LEGACY_AVATAR + && pcode != LL_VO_SURFACE_PATCH + && pcode != LL_VO_WATER + && pcode != LL_VO_VOID_WATER + && pcode != LL_VO_WL_SKY + && pcode != LL_VO_SKY + && pcode != LL_VO_GROUND + && pcode != LL_VO_PART_GROUP + ) + { + return res; + } switch (pcode) { case LL_PCODE_VOLUME: { - if (!gNonInteractive) - { - res = new LLVOVolume(id, pcode, regionp); break; - } + res = new LLVOVolume(id, pcode, regionp); break; break; } case LL_PCODE_LEGACY_AVATAR: @@ -200,12 +210,9 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - if (!gNonInteractive) - { - LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); - avatar->initInstance(); - res = avatar; - } + LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); + avatar->initInstance(); + res = avatar; } break; } -- cgit v1.2.3 From 542f1917e9e963862088936b819fd9f0c1425541 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 28 Sep 2021 20:20:23 +0100 Subject: SL-15999 - draw no objects when noninteractive --- indra/newview/llappviewer.cpp | 1 + indra/newview/pipeline.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1f59134679..a146f72dde 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2761,6 +2761,7 @@ bool LLAppViewer::initConfiguration() tempSetControl("SLURLPassToOtherInstance", "FALSE"); tempSetControl("RenderWater", "FALSE"); tempSetControl("FlyingAtExit", "FALSE"); + gPipeline.clearAllRenderTypes(); llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance")); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 30703426ce..1730753eb1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -487,10 +487,10 @@ void LLPipeline::init() { clearAllRenderTypes(); } - //else if (gSavedSettings.getBOOL("NonInteractive")) -// { - // clearAllRenderTypes(); - //} + else if (gNonInteractive) + { + clearAllRenderTypes(); + } else { setAllRenderTypes(); // By default, all rendering types start enabled -- cgit v1.2.3 From 187d5862398820e28a8935ce9058f444f4963153 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 28 Sep 2021 21:24:38 +0100 Subject: SL-15999 - noninteractive sessions disable logging --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a146f72dde..5413045e7a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2761,7 +2761,7 @@ bool LLAppViewer::initConfiguration() tempSetControl("SLURLPassToOtherInstance", "FALSE"); tempSetControl("RenderWater", "FALSE"); tempSetControl("FlyingAtExit", "FALSE"); - gPipeline.clearAllRenderTypes(); + LLError::setEnabledLogTypesMask(0); llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance")); } -- cgit v1.2.3 From 851fef680164e3472b0516e7237bbcc4a35bc5a3 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Tue, 28 Sep 2021 15:24:42 -0700 Subject: SL-16102 Set window title to agent name (child of SL-15999 Support for low overhead, non interactive viewer sessions) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llteleporthistory.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6ff94e1afd..5987bc3ddf 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16666,6 +16666,17 @@ Value 1 + UpdateAppWindowTitleBar + + Comment + Updates the application window title bar with brief information about user/location + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 3c3c1c96ef..b872053d3f 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -39,6 +39,11 @@ #include "llviewerregion.h" #include "llworldmap.h" #include "llagentui.h" +#include "llwindow.h" +#include "llviewerwindow.h" +#include "llavatarname.h" +#include "llavatarnamecache.h" + ////////////////////////////////////////////////////////////////////////////// // LLTeleportHistoryItem @@ -174,6 +179,28 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) if (!mGotInitialUpdate) mGotInitialUpdate = true; + // update Viewer window title with username and region name + // if we are in "non-interactive mode" (SL-15999) or the debug + // setting to allow it is enabled (may be useful in other situations) + if (gNonInteractive || gSavedSettings.getBOOL("UpdateAppWindowTitleBar")) + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(gAgent.getID(), &av_name)) + { + if (gAgent.getRegion() && gViewerWindow && gViewerWindow->getWindow()) + { + std::string region = gAgent.getRegion()->getName(); + std::string username = av_name.getUserName(); + + // this first pass simply displays username and region name + // but could easily be extended to include other details like + // X/Y/Z location within a region etc. + std::string new_title = STRINGIZE(username << " @ " << region); + gViewerWindow->getWindow()->setTitle(new_title); + } + } + } + // Signal the interesting party that we've changed. onHistoryChanged(); } -- cgit v1.2.3 From 391500b5f7f2fb251acdd192d80e1da7eea02c4c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 29 Sep 2021 12:37:57 +0300 Subject: SL-16034 Disable all displays and UI in noninteractive mode --- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llviewerdisplay.cpp | 6 ++++-- indra/newview/llviewerwindow.cpp | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5413045e7a..9a8b773a66 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2632,9 +2632,10 @@ bool LLAppViewer::initConfiguration() disableCrashlogger(); } + gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); // Handle initialization from settings. // Start up the debugging console before handling other options. - if (gSavedSettings.getBOOL("ShowConsoleWindow")) + if (gSavedSettings.getBOOL("ShowConsoleWindow") && !gNonInteractive) { initConsole(); } @@ -2755,7 +2756,6 @@ bool LLAppViewer::initConfiguration() } } - gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); if (gNonInteractive) { tempSetControl("SLURLPassToOtherInstance", "FALSE"); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 109dc93261..a2f3554123 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -124,7 +124,8 @@ void display_startup() if ( !gViewerWindow || !gViewerWindow->getActive() || !gViewerWindow->getWindow()->getVisible() - || gViewerWindow->getWindow()->getMinimized() ) + || gViewerWindow->getWindow()->getMinimized() + || gNonInteractive) { return; } @@ -309,7 +310,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Attempting to draw into a minimized window causes a GL error. JC if ( !gViewerWindow->getActive() || !gViewerWindow->getWindow()->getVisible() - || gViewerWindow->getWindow()->getMinimized() ) + || gViewerWindow->getWindow()->getMinimized() + || gNonInteractive) { // Clean up memory the pools may have allocated if (rebuild) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1d13a306ef..86ef4e66fb 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2188,6 +2188,13 @@ void LLViewerWindow::initBase() void LLViewerWindow::initWorldUI() { + if (gNonInteractive) + { + gIMMgr = LLIMMgr::getInstance(); + gFloaterView->pushVisibleAll(FALSE); + return; + } + S32 height = mRootView->getRect().getHeight(); S32 width = mRootView->getRect().getWidth(); LLRect full_window(0, height, width, 0); -- cgit v1.2.3 From e16105cab07047cadf0f5a4eae9335c066b5053c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Sep 2021 12:14:51 +0100 Subject: SL-15999 - don't create floaters in noninteractive mode --- indra/newview/llviewerfloaterreg.cpp | 4 ++++ indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewerwindow.cpp | 46 ++++++++++++++++++++---------------- indra/newview/pipeline.cpp | 5 +++- 4 files changed, 35 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 5a05f89758..98b76328de 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -192,6 +192,10 @@ LLFloaterOpenHandler gFloaterOpenHandler; void LLViewerFloaterReg::registerFloaters() { + if (gNonInteractive) + { + return; + } // *NOTE: Please keep these alphabetized for easier merges LLFloaterAboutUtil::registerFloater(); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 8064e998f1..c347e0eb76 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1216,7 +1216,7 @@ LLCore::HttpHeaders::ptr_t LLViewerMedia::getHttpHeaders() ///////////////////////////////////////////////////////////////////////////////////////// void LLViewerMedia::setOpenIDCookie(const std::string& url) { - if(!mOpenIDCookie.empty()) + if(!gNonInteractive && !mOpenIDCookie.empty()) { std::string profileUrl = getProfileURL(""); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1d13a306ef..20bb65760c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2198,12 +2198,15 @@ void LLViewerWindow::initWorldUI() //getRootView()->sendChildToFront(gFloaterView); //getRootView()->sendChildToFront(gSnapshotFloaterView); - LLPanel* chiclet_container = getRootView()->getChild("chiclet_container"); - LLChicletBar* chiclet_bar = LLChicletBar::getInstance(); - chiclet_bar->setShape(chiclet_container->getLocalRect()); - chiclet_bar->setFollowsAll(); - chiclet_container->addChild(chiclet_bar); - chiclet_container->setVisible(TRUE); + if (!gNonInteractive) + { + LLPanel* chiclet_container = getRootView()->getChild("chiclet_container"); + LLChicletBar* chiclet_bar = LLChicletBar::getInstance(); + chiclet_bar->setShape(chiclet_container->getLocalRect()); + chiclet_bar->setFollowsAll(); + chiclet_container->addChild(chiclet_bar); + chiclet_container->setVisible(TRUE); + } LLRect morph_view_rect = full_window; morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); @@ -2292,21 +2295,24 @@ void LLViewerWindow::initWorldUI() gToolBarView->setVisible(TRUE); } - LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild("destination_guide_contents"); - if (destinations) - { - destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("DestinationGuideURL"); - url = LLWeb::expandURLSubstitutions(url, LLSD()); - destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } - LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild("avatar_picker_contents"); - if (avatar_picker) + if (!gNonInteractive) { - avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("AvatarPickerURL"); - url = LLWeb::expandURLSubstitutions(url, LLSD()); - avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild("destination_guide_contents"); + if (destinations) + { + destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + std::string url = gSavedSettings.getString("DestinationGuideURL"); + url = LLWeb::expandURLSubstitutions(url, LLSD()); + destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } + LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild("avatar_picker_contents"); + if (avatar_picker) + { + avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + std::string url = gSavedSettings.getString("AvatarPickerURL"); + url = LLWeb::expandURLSubstitutions(url, LLSD()); + avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1730753eb1..ad401b6db4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4004,7 +4004,10 @@ void LLPipeline::postSort(LLCamera& camera) { mSelectedFaces.clear(); - LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit()); + if (!gNonInteractive) + { + LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit()); + } // Draw face highlights for selected faces. if (LLSelectMgr::getInstance()->getTEMode()) -- cgit v1.2.3 From 3c4198e4b50de0221020f3b5bbf7d3f7ff7cf984 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Sep 2021 16:50:32 +0100 Subject: SL-15999 - noninteractive sessions should quit cleanly when they get a close message. Removed some possible crashes --- indra/newview/llappviewer.cpp | 2 ++ indra/newview/lldynamictexture.cpp | 7 +++++-- indra/newview/llviewermessage.cpp | 4 ++++ indra/newview/llviewerwindow.cpp | 13 ++++++++++--- indra/newview/llworldmapmessage.cpp | 4 ++++ 5 files changed, 25 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5413045e7a..bd1b30b4a1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2761,6 +2761,8 @@ bool LLAppViewer::initConfiguration() tempSetControl("SLURLPassToOtherInstance", "FALSE"); tempSetControl("RenderWater", "FALSE"); tempSetControl("FlyingAtExit", "FALSE"); + tempSetControl("WindowWidth", "1024"); + tempSetControl("WindowHeight", "200"); LLError::setEnabledLogTypesMask(0); llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance")); } diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 8b8273d183..31ca2531ba 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -119,8 +119,11 @@ BOOL LLViewerDynamicTexture::render() void LLViewerDynamicTexture::preRender(BOOL clear_depth) { gPipeline.allocatePhysicsBuffer(); - llassert(mFullWidth <= static_cast(gPipeline.mPhysicsDisplay.getWidth())); - llassert(mFullHeight <= static_cast(gPipeline.mPhysicsDisplay.getHeight())); + if (!gNonInteractive) + { + llassert(mFullWidth <= static_cast(gPipeline.mPhysicsDisplay.getWidth())); + llassert(mFullHeight <= static_cast(gPipeline.mPhysicsDisplay.getHeight())); + } if (gGLManager.mHasFramebufferObject && gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsATI) { //using offscreen render target, just use the bottom left corner diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ab65d747ba..517e35d482 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2423,6 +2423,10 @@ void translateFailure(LLChat chat, LLSD toastArgs, int status, const std::string void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { + if (gNonInteractive) + { + return; + } LLChat chat; std::string mesg; std::string from_name; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 20bb65760c..22279d0bf0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1516,8 +1516,15 @@ BOOL LLViewerWindow::handleCloseRequest(LLWindow *window) void LLViewerWindow::handleQuit(LLWindow *window) { - LL_INFOS() << "Window forced quit" << LL_ENDL; - LLAppViewer::instance()->forceQuit(); + if (gNonInteractive) + { + LLAppViewer::instance()->requestQuit(); + } + else + { + LL_INFOS() << "Window forced quit" << LL_ENDL; + LLAppViewer::instance()->forceQuit(); + } } void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height) @@ -2556,7 +2563,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) mWindow->setMinSize(min_window_width, min_window_height); LLCoordScreen window_rect; - if (mWindow->getSize(&window_rect)) + if (!gNonInteractive && mWindow->getSize(&window_rect)) { // Only save size if not maximized gSavedSettings.setU32("WindowWidth", window_rect.mX); diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 8be340de4c..e4a9f9afdb 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -150,6 +150,10 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 // public static void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) { + if (gNonInteractive) + { + return; + } U32 agent_flags; msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); -- cgit v1.2.3 From a0881ccb272e90d5472e00d8883fcf3b69c7ee10 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 29 Sep 2021 21:04:46 +0300 Subject: SL-16034 init LLNavigationBar to allow setting title with location info later --- indra/newview/llviewerwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index bd22127a45..24cb138401 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2198,6 +2198,7 @@ void LLViewerWindow::initWorldUI() if (gNonInteractive) { gIMMgr = LLIMMgr::getInstance(); + LLNavigationBar::getInstance(); gFloaterView->pushVisibleAll(FALSE); return; } -- cgit v1.2.3 From 9561e986ce879833def4243700971fc53bd878d4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Sep 2021 19:47:23 +0100 Subject: SL-15999 - force multiple viewers support for noninteractive mode --- indra/newview/llappviewer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e1fbbf6ce5..41a83a1484 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2758,6 +2758,7 @@ bool LLAppViewer::initConfiguration() if (gNonInteractive) { + tempSetControl("AllowMultipleViewers", "TRUE"); tempSetControl("SLURLPassToOtherInstance", "FALSE"); tempSetControl("RenderWater", "FALSE"); tempSetControl("FlyingAtExit", "FALSE"); -- cgit v1.2.3 From f3743b8e3092daabf5c5324626c4f04f36ff5bd7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 1 Oct 2021 16:39:56 +0300 Subject: SL-15999 use callback for updating window title --- indra/newview/llteleporthistory.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index b872053d3f..3ece12931c 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -118,6 +118,20 @@ void LLTeleportHistory::handleLoginComplete() updateCurrentLocation(gAgent.getPositionGlobal()); } +static void on_avatar_name_update_title(const LLAvatarName& av_name) +{ + if (gAgent.getRegion() && gViewerWindow && gViewerWindow->getWindow()) + { + std::string region = gAgent.getRegion()->getName(); + std::string username = av_name.getUserName(); + + // this first pass simply displays username and region name + // but could easily be extended to include other details like + // X/Y/Z location within a region etc. + std::string new_title = STRINGIZE(username << " @ " << region); + gViewerWindow->getWindow()->setTitle(new_title); + } +} void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) { @@ -184,21 +198,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) // setting to allow it is enabled (may be useful in other situations) if (gNonInteractive || gSavedSettings.getBOOL("UpdateAppWindowTitleBar")) { - LLAvatarName av_name; - if (LLAvatarNameCache::get(gAgent.getID(), &av_name)) - { - if (gAgent.getRegion() && gViewerWindow && gViewerWindow->getWindow()) - { - std::string region = gAgent.getRegion()->getName(); - std::string username = av_name.getUserName(); - - // this first pass simply displays username and region name - // but could easily be extended to include other details like - // X/Y/Z location within a region etc. - std::string new_title = STRINGIZE(username << " @ " << region); - gViewerWindow->getWindow()->setTitle(new_title); - } - } + LLAvatarNameCache::get(gAgent.getID(), boost::bind(&on_avatar_name_update_title, _2)); } // Signal the interesting party that we've changed. -- cgit v1.2.3