Added functions to find prims by name
parent
6754681e5b
commit
513ce9caee
|
@ -821,6 +821,32 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a named prim contained in this 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 SceneObjectPart GetSceneObjectPart(string name)
|
||||||
|
{
|
||||||
|
List<EntityBase> EntityList = GetEntities();
|
||||||
|
|
||||||
|
foreach (EntityBase ent in EntityList)
|
||||||
|
{
|
||||||
|
if (ent is SceneObjectGroup)
|
||||||
|
{
|
||||||
|
foreach(SceneObjectPart p in ((SceneObjectGroup) ent).GetParts())
|
||||||
|
{
|
||||||
|
if (p.Name==name)
|
||||||
|
{
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a part contained in this scene.
|
/// Get a part contained in this scene.
|
||||||
|
|
|
@ -3882,6 +3882,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a named prim contained in this scene (will return the first
|
||||||
|
/// found, if there are more than one prim with the same name)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public SceneObjectPart GetSceneObjectPart(string name)
|
||||||
|
{
|
||||||
|
return m_innerScene.GetSceneObjectPart(name);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue