diff options
3 files changed, 56 insertions, 17 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 c91c0b2..6d40e12 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 pethod scoped and will be returned. It will be the | 254 | // This is pethod scoped and will be returned. It will be the |
@@ -240,9 +269,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
240 | ? 250 | 269 | ? 250 |
241 | : objectGroup.AbsolutePosition.X) | 270 | : objectGroup.AbsolutePosition.X) |
242 | , | 271 | , |
243 | (objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) | 272 | (objectGroup.AbsolutePosition.Y > (int)Constants.RegionSize) |
244 | ? 250 | 273 | ? 250 |
245 | : objectGroup.AbsolutePosition.X, | 274 | : objectGroup.AbsolutePosition.Y, |
246 | objectGroup.AbsolutePosition.Z); | 275 | objectGroup.AbsolutePosition.Z); |
247 | 276 | ||
248 | Vector3 originalPosition = objectGroup.AbsolutePosition; | 277 | Vector3 originalPosition = objectGroup.AbsolutePosition; |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 3c4ceb9..252ab8b 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 |