diff --git a/Patch/[PATCH] added --persist-uuids to load oar using UUID.patch b/Patch/[PATCH] added --persist-uuids to load oar using UUID.patch new file mode 100644 index 0000000..280c4a0 --- /dev/null +++ b/Patch/[PATCH] added --persist-uuids to load oar using UUID.patch @@ -0,0 +1,91 @@ +From 29f37fb0d62b057a81f038c76cbd6ef38e9ddd1e Mon Sep 17 00:00:00 2001 +From: ft +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) + /// + protected bool m_merge; + ++ /// ++ /// Should the archive being loaded be persisting uuids? ++ /// ++ protected bool m_persistuuids = false; ++ + /// + /// If true, force the loading of terrain from the oar file + /// +@@ -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 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;