1
0
Fork 0

„Patch/[PATCH] added --persist-uuids to load oar using UUID.patch“ löschen

master
Chris 2021-01-14 21:58:32 +00:00
parent ef860833cb
commit 943c20d429
1 changed files with 0 additions and 91 deletions

View File

@ -1,91 +0,0 @@
From 29f37fb0d62b057a81f038c76cbd6ef38e9ddd1e Mon Sep 17 00:00:00 2001
From: ft <ft@noemail>
Date: Thu, 25 Sep 2014 18:32:18 +0200
Subject: [PATCH] added --persist-uuids to load oar using UUID within
osMessageObject and other cases require restoring the original uuids
---
.../World/Archiver/ArchiveReadRequest.cs | 20 ++++++++++++++++++-
.../World/Archiver/ArchiverModule.cs | 3 +++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 613e77881..f1a9fedbf 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -98,6 +98,11 @@ public DearchiveContext(Scene scene)
/// </value>
protected bool m_merge;
+ /// <value>
+ /// Should the archive being loaded be persisting uuids?
+ /// </value>
+ protected bool m_persistuuids = false;
+
/// <value>
/// If true, force the loading of terrain from the oar file
/// </value>
@@ -191,6 +196,11 @@ public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictiona
m_merge = options.ContainsKey("merge");
m_forceTerrain = options.ContainsKey("force-terrain");
m_forceParcels = options.ContainsKey("force-parcels");
+ m_persistuuids = options.ContainsKey("persist-uuids");
+ if (m_persistuuids)
+ {
+ m_merge = false;
+ }
m_noObjects = options.ContainsKey("no-objects");
m_skipAssets = options.ContainsKey("skipAssets");
m_requestId = requestId;
@@ -214,6 +224,11 @@ public ArchiveReadRequest(Scene scene, Stream loadStream, Guid requestId, Dictio
m_loadStream = loadStream;
m_skipAssets = options.ContainsKey("skipAssets");
m_merge = options.ContainsKey("merge");
+ m_persistuuids = options.ContainsKey("persist-uuids");
+ if(m_persistuuids)
+ {
+ m_merge = false;
+ }
m_requestId = requestId;
m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner;
@@ -526,7 +541,10 @@ protected void LoadObjects(Scene scene, List<string> serialisedSceneObjects, Lis
// For now, give all incoming scene objects new uuids. This will allow scenes to be cloned
// on the same region server and multiple examples a single object archive to be imported
// to the same scene (when this is possible).
- sceneObject.ResetIDs();
+ if (!m_persistuuids)
+ {
+ sceneObject.ResetIDs();
+ }
if (isTelehub)
{
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index a81d11ae2..d834f1405 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -104,6 +104,7 @@ public void HandleLoadOarConsoleCommand(string module, string[] cmdparams)
bool forceTerrain = false;
bool forceParcels = false;
bool noObjects = false;
+ bool persistUuids = false;
Vector3 displacement = new Vector3(0f, 0f, 0f);
String defaultUser = "";
float rotation = 0f;
@@ -111,6 +112,7 @@ public void HandleLoadOarConsoleCommand(string module, string[] cmdparams)
OptionSet options = new OptionSet();
options.Add("m|merge", delegate (string v) { mergeOar = (v != null); });
+ options.Add("persist-uuids", delegate(string v) { persistUuids = (v != null); });
options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); });
options.Add("force-terrain", delegate (string v) { forceTerrain = (v != null); });
options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); // downward compatibility
@@ -181,6 +183,7 @@ public void HandleLoadOarConsoleCommand(string module, string[] cmdparams)
if (forceTerrain) archiveOptions.Add("force-terrain", null);
if (forceParcels) archiveOptions.Add("force-parcels", null);
if (noObjects) archiveOptions.Add("no-objects", null);
+ if (persistUuids) archiveOptions.Add("persist-uuids", null);
if (defaultUser != "")
{
UUID defaultUserUUID = UUID.Zero;