Allow "show object", "show part", "dump object" and "delete object" to accept a local ID as well as a UUID.

This means that the sub-commands are now id rather than uuid, e.g. show object id
This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-24 04:10:22 +01:00
parent f76dceb90b
commit 81aeecc907
4 changed files with 153 additions and 45 deletions

View File

@@ -4688,12 +4688,23 @@ namespace OpenSim.Region.Framework.Scenes
/// Get a group via its UUID
/// </summary>
/// <param name="fullID"></param>
/// <returns>null if no group with that name exists</returns>
/// <returns>null if no group with that id exists</returns>
public SceneObjectGroup GetSceneObjectGroup(UUID fullID)
{
return m_sceneGraph.GetSceneObjectGroup(fullID);
}
/// <summary>
/// Get a group via its local ID
/// </summary>
/// <remarks>This will only return a group if the local ID matches a root part</remarks>
/// <param name="localID"></param>
/// <returns>null if no group with that id exists</returns>
public SceneObjectGroup GetSceneObjectGroup(uint localID)
{
return m_sceneGraph.GetSceneObjectGroup(localID);
}
/// <summary>
/// Get a group by name from the scene (will return the first
/// found, if there are more than one prim with the same name)

View File

@@ -982,6 +982,30 @@ namespace OpenSim.Region.Framework.Scenes
return null;
}
/// <summary>
/// Get a group in the scene
/// </summary>
/// <remarks>
/// This will only return a group if the local ID matches the root part, not other parts.
/// </remarks>
/// <param name="localID">Local id of the root part of the group</param>
/// <returns>null if no such group was found</returns>
protected internal SceneObjectGroup GetSceneObjectGroup(uint localID)
{
lock (SceneObjectGroupsByLocalPartID)
{
if (SceneObjectGroupsByLocalPartID.ContainsKey(localID))
{
SceneObjectGroup so = SceneObjectGroupsByLocalPartID[localID];
if (so.LocalId == localID)
return so;
}
}
return null;
}
/// <summary>
/// Get a group by name from the scene (will return the first
/// found, if there are more than one prim with the same name)