From a6a2f98070cd55fcaadafc237bd0ffba9d466655 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 22 Jul 2026 17:41:55 -0700 Subject: Publish object inventories to external editor. (#5834) * Adding tight integration flag for vscode and open code through a URL. * [WIP] Publish objects and their contents from the viewer into VS code. * [WIP] Still very much a work in progress, supports most of the core operations publish, get, write, delete, and create. Still quite a few bugs to work out. * [WIP] Object publishing checkpoint. * [checkpoint] Script tight integration with vscode, object publishing. * Number of fixed issue. * A few redundancy and performance fixes. * Some cosmetics. * I like "Explore" better than "Publish" * Object renaming, luau inventory icon, runstate, restart. * Some clean up around permissions and possible nullptr deref. * Code review feedback. --- indra/newview/llfloaterscripting.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterscripting.cpp') diff --git a/indra/newview/llfloaterscripting.cpp b/indra/newview/llfloaterscripting.cpp index 0719ced58d..959d4eaeb4 100644 --- a/indra/newview/llfloaterscripting.cpp +++ b/indra/newview/llfloaterscripting.cpp @@ -42,6 +42,7 @@ #include "lleventcoro.h" #include "llviewermenufile.h" #include "llappviewer.h" +#include "llscripteditorws.h" namespace { @@ -82,10 +83,35 @@ LLFloaterScripting::LLFloaterScripting(const LLSD& seed) bool LLFloaterScripting::postBuild() { - refresh(); + // Subscribe to tight integration changes + mTightIntegrationConnection = gSavedSettings.getControl("ExternalEditorTightIntegration")->getSignal()->connect( + boost::bind(&LLFloaterScripting::onTightIntegrationChanged, this)); + + // Apply initial state + onTightIntegrationChanged(); + return true; } +LLFloaterScripting::~LLFloaterScripting() +{ + mTightIntegrationConnection.disconnect(); +} + +void LLFloaterScripting::onTightIntegrationChanged() +{ + bool tight = gSavedSettings.getBOOL("ExternalEditorTightIntegration"); + + // Force websocket on when tight integration is enabled + if (LLScriptEditorWSServer::isTightIntegration()) + { + gSavedSettings.setBOOL("ExternalWebsocketSyncEnable", true); + } + + // Disable websocket checkbox when tight integration is on + getChild("websocket_sync_enable")->setEnabled(!tight); +} + void LLFloaterScripting::onClickClose() { closeFloater(); -- cgit v1.3