diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-07-24 10:17:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-24 10:17:00 -0700 |
| commit | 34b74530d216a1edc5dfffe327baa615e3654460 (patch) | |
| tree | cebbbe1d9cb6a476cd3b7dcf41120824f1b15925 /indra | |
| parent | e32d763ccbe1b02c7d74a5b63712ec946a24b42e (diff) | |
| parent | ae6997dc22c2597c8a84be53011587c8a031b77b (diff) | |
Merge pull request #6043 from secondlife/rider/option_fix
Two issues.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llinventory/llinventory.cpp | 30 | ||||
| -rw-r--r-- | indra/newview/llscripteditorws.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llscripteditorws.h | 6 |
3 files changed, 47 insertions, 10 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 1fcf70dc25..a7edc3a383 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -63,6 +63,7 @@ static const std::string INV_CREATION_DATE_LABEL("created_at"); static const std::string INV_TOGGLED_LABEL("toggled"); static const std::string INV_SCRIPT_LABEL("script"); static const std::string INV_RUNTIME_LABEL("runtime"); +static const std::string INV_METADATA_LABEL("metadata"); // key used by agent-inventory-service static const std::string INV_ASSET_TYPE_LABEL_WS("type_default"); @@ -1114,6 +1115,35 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) continue; } + if (i->first == INV_METADATA_LABEL) + { + // Server (non-AIS) exports thumbnail/favorite/script nested under + // a "metadata" wrapper; mirror the legacy-stream parser behavior. + const LLSD& metadata = i->second; + if (metadata.has(INV_THUMBNAIL_LABEL)) + { + const LLSD& thumbnail = metadata[INV_THUMBNAIL_LABEL]; + if (thumbnail.has(INV_ASSET_ID_LABEL)) + { + mThumbnailUUID = thumbnail[INV_ASSET_ID_LABEL].asUUID(); + } + } + if (metadata.has(INV_FAVORITE_LABEL)) + { + const LLSD& favorite = metadata[INV_FAVORITE_LABEL]; + if (favorite.has(INV_TOGGLED_LABEL)) + { + mFavorite = favorite[INV_TOGGLED_LABEL].asBoolean(); + } + } + if (metadata.has(INV_SCRIPT_LABEL) + && metadata[INV_SCRIPT_LABEL].has(INV_RUNTIME_LABEL)) + { + mRuntime = metadata[INV_SCRIPT_LABEL][INV_RUNTIME_LABEL].asString(); + } + continue; + } + if (i->first == INV_PERMISSIONS_LABEL) { mPermissions.importLLSD(i->second); diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index e0bf9b0b61..17ebd03ed2 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -156,11 +156,8 @@ namespace } return std::string(s); } -} - -LLCachedControl<bool> LLScriptEditorWSServer::sEnableScriptEditorWS(gSavedSettings, "ExternalWebsocketSyncEnable", false); -LLCachedControl<bool> LLScriptEditorWSServer::sTightIntegration(gSavedSettings, "ExternalEditorTightIntegration", false); +} class LLPublishedPrimListener : public LLVOInventoryListener { @@ -203,8 +200,8 @@ private: }; //======================================================================== -LLScriptEditorWSServer::LLScriptEditorWSServer(const std::string& name, U16 port, bool local_only) - : LLJSONRPCServer(name, port, local_only) +LLScriptEditorWSServer::LLScriptEditorWSServer(const std::string& name, U16 port, bool local_only): + LLJSONRPCServer(name, port, local_only) { LL_INFOS("ScriptEditorWS") << "Created JSON-RPC script editor server: " << name << " on port " << port << LL_ENDL; @@ -221,6 +218,18 @@ LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::getServer() wsmgr.findServerByName(LLScriptEditorWSServer::DEFAULT_SERVER_NAME)); } +bool LLScriptEditorWSServer::isEnabled() +{ + static LLCachedControl<bool> OPT_ENABLESCRIPTEDITORWS(gSavedSettings, "ExternalWebsocketSyncEnable", false); + return OPT_ENABLESCRIPTEDITORWS; +} + +bool LLScriptEditorWSServer::isTightIntegration() +{ + static LLCachedControl<bool> OPT_TIGHTINTEGRATION(gSavedSettings, "ExternalWebsocketSyncTightIntegration", false); + return OPT_TIGHTINTEGRATION; +} + LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::ensureServerRunning() { if (!LLScriptEditorWSServer::isEnabled()) diff --git a/indra/newview/llscripteditorws.h b/indra/newview/llscripteditorws.h index 33b19f8a97..69c7e1a8e1 100644 --- a/indra/newview/llscripteditorws.h +++ b/indra/newview/llscripteditorws.h @@ -211,8 +211,8 @@ public: void onLinksetChildAdded(const LLUUID& root_id, LLViewerObject* child); void onLinksetChildRemoved(const LLUUID& root_id, const LLUUID& child_id); - static bool isEnabled() { return sEnableScriptEditorWS; } - static bool isTightIntegration() { return sTightIntegration; } + static bool isEnabled(); + static bool isTightIntegration(); protected: LLWebsocketMgr::WSConnection::ptr_t connectionFactory(LLWebsocketMgr::WSServer::ptr_t server, @@ -354,6 +354,4 @@ private: static constexpr F32 CLEANUP_INTERVAL = 60.0f; // seconds static constexpr F32 CONNECTION_TIMEOUT = 300.0f; // 5 minutes - static LLCachedControl<bool> sEnableScriptEditorWS; - static LLCachedControl<bool> sTightIntegration; }; |
