implement Scene.GetSceneObjectGroup(string name) to match the equivalent GetSOP method
parent
91a9f30b16
commit
4b0fc4faef
|
@ -4282,14 +4282,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Get a group via its UUID
|
/// Get a group via its UUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fullID"></param>
|
/// <param name="fullID"></param>
|
||||||
/// <returns></returns>
|
/// <returns>null if no group with that name exists</returns>
|
||||||
public SceneObjectGroup GetSceneObjectGroup(UUID fullID)
|
public SceneObjectGroup GetSceneObjectGroup(UUID fullID)
|
||||||
{
|
{
|
||||||
return m_sceneGraph.GetSceneObjectGroup(fullID);
|
return m_sceneGraph.GetSceneObjectGroup(fullID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a named prim contained in this scene (will return the first
|
/// Get a group by name from the scene (will return the first
|
||||||
|
/// found, if there are more than one prim with the same name)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns>null if no group with that name exists</returns>
|
||||||
|
public SceneObjectGroup GetSceneObjectGroup(string name)
|
||||||
|
{
|
||||||
|
return m_sceneGraph.GetSceneObjectGroup(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a prim by name from the scene (will return the first
|
||||||
/// found, if there are more than one prim with the same name)
|
/// found, if there are more than one prim with the same name)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
|
|
|
@ -991,6 +991,35 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return null;
|
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)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns>null if the part was not found</returns>
|
||||||
|
protected internal SceneObjectGroup GetSceneObjectGroup(string name)
|
||||||
|
{
|
||||||
|
SceneObjectGroup so = null;
|
||||||
|
|
||||||
|
Entities.Find(
|
||||||
|
delegate(EntityBase entity)
|
||||||
|
{
|
||||||
|
if (entity is SceneObjectGroup)
|
||||||
|
{
|
||||||
|
if (entity.Name == name)
|
||||||
|
{
|
||||||
|
so = (SceneObjectGroup)entity;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return so;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a part contained in this scene.
|
/// Get a part contained in this scene.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1005,7 +1034,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a named prim contained in this scene (will return the first
|
/// Get a prim by name from the scene (will return the first
|
||||||
/// found, if there are more than one prim with the same name)
|
/// found, if there are more than one prim with the same name)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
|
|
Loading…
Reference in New Issue