aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-18 20:03:53 +0100
committerJustin Clark-Casey (justincc)2011-04-18 20:03:53 +0100
commit419fc9427ef14eea443ec6f57501c6915c2de3b9 (patch)
treee7895aeb7fcdd44de696ce604e2a14d4b396e6fd
parentMantis #5442: Add admin_save_heightmap (diff)
downloadopensim-SC_OLD-419fc9427ef14eea443ec6f57501c6915c2de3b9.zip
opensim-SC_OLD-419fc9427ef14eea443ec6f57501c6915c2de3b9.tar.gz
opensim-SC_OLD-419fc9427ef14eea443ec6f57501c6915c2de3b9.tar.bz2
opensim-SC_OLD-419fc9427ef14eea443ec6f57501c6915c2de3b9.tar.xz
Provide a configuration setting to control whether multiple taken objects are coalesced to inventory
This is the CoalesceMultipleObjectsToInventory setting in [Inventory] in OpenSimDefaults.ini Default is true.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs59
-rw-r--r--bin/OpenSimDefaults.ini7
3 files changed, 54 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 8c99983..52791cb 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -75,6 +75,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
75 if (name == Name) 75 if (name == Name)
76 { 76 {
77 m_Enabled = true; 77 m_Enabled = true;
78
79 InitialiseCommon(source);
80
78 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name); 81 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
79 82
80 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 83 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index a716326..e030ba1 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -64,7 +64,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
64 return m_UserManagement; 64 return m_UserManagement;
65 } 65 }
66 } 66 }
67 67
68 public bool CoalesceMultipleObjectsToInventory { get; set; }
68 69
69 #region INonSharedRegionModule 70 #region INonSharedRegionModule
70 71
@@ -87,10 +88,28 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
87 if (name == Name) 88 if (name == Name)
88 { 89 {
89 m_Enabled = true; 90 m_Enabled = true;
90 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name); 91
92 InitialiseCommon(source);
93
94 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
91 } 95 }
92 } 96 }
93 } 97 }
98
99 /// <summary>
100 /// Common module config for both this and descendant classes.
101 /// </summary>
102 /// <param name="source"></param>
103 protected virtual void InitialiseCommon(IConfigSource source)
104 {
105 IConfig inventoryConfig = source.Configs["Inventory"];
106
107 if (inventoryConfig != null)
108 CoalesceMultipleObjectsToInventory
109 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
110 else
111 CoalesceMultipleObjectsToInventory = true;
112 }
94 113
95 public virtual void PostInitialise() 114 public virtual void PostInitialise()
96 { 115 {
@@ -206,20 +225,30 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
206 public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, 225 public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
207 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient) 226 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
208 { 227 {
209 UUID ret = UUID.Zero; 228 Dictionary<UUID, List<SceneObjectGroup>> deletes = new Dictionary<UUID, List<SceneObjectGroup>>();
210 229
211 // The following code groups the SOG's by owner. No objects 230 if (CoalesceMultipleObjectsToInventory)
212 // belonging to different people can be coalesced, for obvious
213 // reasons.
214 Dictionary<UUID, List<SceneObjectGroup>> deletes =
215 new Dictionary<UUID, List<SceneObjectGroup>>();
216
217 foreach (SceneObjectGroup g in objectGroups)
218 { 231 {
219 if (!deletes.ContainsKey(g.OwnerID)) 232 // The following code groups the SOG's by owner. No objects
220 deletes[g.OwnerID] = new List<SceneObjectGroup>(); 233 // belonging to different people can be coalesced, for obvious
221 234 // reasons.
222 deletes[g.OwnerID].Add(g); 235 foreach (SceneObjectGroup g in objectGroups)
236 {
237 if (!deletes.ContainsKey(g.OwnerID))
238 deletes[g.OwnerID] = new List<SceneObjectGroup>();
239
240 deletes[g.OwnerID].Add(g);
241 }
242 }
243 else
244 {
245 // If we don't want to coalesce then put every object in its own bundle.
246 foreach (SceneObjectGroup g in objectGroups)
247 {
248 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>();
249 bundle.Add(g);
250 deletes[g.UUID] = bundle;
251 }
223 } 252 }
224 253
225 // This is method scoped and will be returned. It will be the 254 // This is method scoped and will be returned. It will be the
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 107e859..2e0a22b 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -453,6 +453,13 @@
453 ; ForwardOfflineGroupMessages = true 453 ; ForwardOfflineGroupMessages = true
454 454
455 455
456[Inventory]
457 ; Control whether multiple objects sent to inventory should be coaleseced into a single item
458 ; There are still some issues with coalescence, including the fact that rotation is not restored
459 ; and some assets may be missing from archive files.
460 CoalesceMultipleObjectsToInventory = true
461
462
456[ODEPhysicsSettings] 463[ODEPhysicsSettings]
457 ;## 464 ;##
458 ;## World Settings 465 ;## World Settings