diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index 7a35182f4b..5d0163a680 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -456,6 +456,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
sb.AppendFormat("Parent: {0}",
sop.IsRoot ? "Is Root\n" : string.Format("{0} {1}\n", sop.ParentGroup.Name, sop.ParentGroup.UUID));
sb.AppendFormat("Link number: {0}\n", sop.LinkNum);
+ sb.AppendFormat("Items: {0}\n", sop.Inventory.Count);
sb.AppendFormat("Flags: {0}\n", sop.Flags);
return sb;
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index 8d6284739b..c457b2f2f5 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -267,18 +267,26 @@ namespace OpenSim.Region.Framework.Interfaces
void ApplyGodPermissions(uint perms);
+ ///
+ /// Number of items in this inventory.
+ ///
+ int Count { get; }
+
///
/// Returns true if this inventory contains any scripts
///
bool ContainsScripts();
///
- /// Returns the count of scripts contained
- ///
+ /// Number of scripts in this inventory.
+ ///
+ ///
+ /// Includes both running and non running scripts.
+ ///
int ScriptCount();
///
- /// Returns the count of running scripts contained
+ /// Number of running scripts in this inventory.
///
int RunningScriptCount();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 821fd81d1f..bdb044692b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -92,6 +92,15 @@ namespace OpenSim.Region.Framework.Scenes
QueryScriptStates();
}
}
+
+ public int Count
+ {
+ get
+ {
+ lock (m_items)
+ return m_items.Count;
+ }
+ }
///
/// Constructor