diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 8c99983a95..52791cb046 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
if (name == Name)
{
m_Enabled = true;
+
+ InitialiseCommon(source);
+
m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index a716326924..e030ba11f7 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
return m_UserManagement;
}
}
-
+
+ public bool CoalesceMultipleObjectsToInventory { get; set; }
#region INonSharedRegionModule
@@ -87,10 +88,28 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (name == Name)
{
m_Enabled = true;
- m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
+
+ InitialiseCommon(source);
+
+ m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
}
}
}
+
+ ///
+ /// Common module config for both this and descendant classes.
+ ///
+ ///
+ protected virtual void InitialiseCommon(IConfigSource source)
+ {
+ IConfig inventoryConfig = source.Configs["Inventory"];
+
+ if (inventoryConfig != null)
+ CoalesceMultipleObjectsToInventory
+ = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
+ else
+ CoalesceMultipleObjectsToInventory = true;
+ }
public virtual void PostInitialise()
{
@@ -206,20 +225,30 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
List objectGroups, IClientAPI remoteClient)
{
- UUID ret = UUID.Zero;
-
- // The following code groups the SOG's by owner. No objects
- // belonging to different people can be coalesced, for obvious
- // reasons.
- Dictionary> deletes =
- new Dictionary>();
-
- foreach (SceneObjectGroup g in objectGroups)
+ Dictionary> deletes = new Dictionary>();
+
+ if (CoalesceMultipleObjectsToInventory)
{
- if (!deletes.ContainsKey(g.OwnerID))
- deletes[g.OwnerID] = new List();
-
- deletes[g.OwnerID].Add(g);
+ // The following code groups the SOG's by owner. No objects
+ // belonging to different people can be coalesced, for obvious
+ // reasons.
+ foreach (SceneObjectGroup g in objectGroups)
+ {
+ if (!deletes.ContainsKey(g.OwnerID))
+ deletes[g.OwnerID] = new List();
+
+ deletes[g.OwnerID].Add(g);
+ }
+ }
+ else
+ {
+ // If we don't want to coalesce then put every object in its own bundle.
+ foreach (SceneObjectGroup g in objectGroups)
+ {
+ List bundle = new List();
+ bundle.Add(g);
+ deletes[g.UUID] = bundle;
+ }
}
// This is method scoped and will be returned. It will be the
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 107e859827..2e0a22bc8a 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -453,6 +453,13 @@
; ForwardOfflineGroupMessages = true
+[Inventory]
+ ; Control whether multiple objects sent to inventory should be coaleseced into a single item
+ ; There are still some issues with coalescence, including the fact that rotation is not restored
+ ; and some assets may be missing from archive files.
+ CoalesceMultipleObjectsToInventory = true
+
+
[ODEPhysicsSettings]
;##
;## World Settings