diff options
author | Justin Clark-Casey (justincc) | 2011-05-20 23:41:14 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-20 23:41:14 +0100 |
commit | 4b0fc4faef657cc819dfa360fb6a266532724455 (patch) | |
tree | 81cef0d3e3bd60e25043068c362fffd91bc9d577 /OpenSim/Region/Framework/Scenes | |
parent | implement Scene.GetSceneObjectGroup(UUID fullID) using existing index (diff) | |
download | opensim-SC-4b0fc4faef657cc819dfa360fb6a266532724455.zip opensim-SC-4b0fc4faef657cc819dfa360fb6a266532724455.tar.gz opensim-SC-4b0fc4faef657cc819dfa360fb6a266532724455.tar.bz2 opensim-SC-4b0fc4faef657cc819dfa360fb6a266532724455.tar.xz |
implement Scene.GetSceneObjectGroup(string name) to match the equivalent GetSOP method
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 31 |
2 files changed, 43 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f718331..cfb3a5d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4282,14 +4282,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
4282 | /// Get a group via its UUID | 4282 | /// Get a group via its UUID |
4283 | /// </summary> | 4283 | /// </summary> |
4284 | /// <param name="fullID"></param> | 4284 | /// <param name="fullID"></param> |
4285 | /// <returns></returns> | 4285 | /// <returns>null if no group with that name exists</returns> |
4286 | public SceneObjectGroup GetSceneObjectGroup(UUID fullID) | 4286 | public SceneObjectGroup GetSceneObjectGroup(UUID fullID) |
4287 | { | 4287 | { |
4288 | return m_sceneGraph.GetSceneObjectGroup(fullID); | 4288 | return m_sceneGraph.GetSceneObjectGroup(fullID); |
4289 | } | 4289 | } |
4290 | 4290 | ||
4291 | /// <summary> | 4291 | /// <summary> |
4292 | /// Get a named prim contained in this scene (will return the first | 4292 | /// Get a group by name from the scene (will return the first |
4293 | /// found, if there are more than one prim with the same name) | ||
4294 | /// </summary> | ||
4295 | /// <param name="name"></param> | ||
4296 | /// <returns>null if no group with that name exists</returns> | ||
4297 | public SceneObjectGroup GetSceneObjectGroup(string name) | ||
4298 | { | ||
4299 | return m_sceneGraph.GetSceneObjectGroup(name); | ||
4300 | } | ||
4301 | |||
4302 | /// <summary> | ||
4303 | /// Get a prim by name from the scene (will return the first | ||
4293 | /// found, if there are more than one prim with the same name) | 4304 | /// found, if there are more than one prim with the same name) |
4294 | /// </summary> | 4305 | /// </summary> |
4295 | /// <param name="name"></param> | 4306 | /// <param name="name"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 2d547f7..0cff011 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -992,6 +992,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
992 | } | 992 | } |
993 | 993 | ||
994 | /// <summary> | 994 | /// <summary> |
995 | /// Get a group by name from the scene (will return the first | ||
996 | /// found, if there are more than one prim with the same name) | ||
997 | /// </summary> | ||
998 | /// <param name="name"></param> | ||
999 | /// <returns>null if the part was not found</returns> | ||
1000 | protected internal SceneObjectGroup GetSceneObjectGroup(string name) | ||
1001 | { | ||
1002 | SceneObjectGroup so = null; | ||
1003 | |||
1004 | Entities.Find( | ||
1005 | delegate(EntityBase entity) | ||
1006 | { | ||
1007 | if (entity is SceneObjectGroup) | ||
1008 | { | ||
1009 | if (entity.Name == name) | ||
1010 | { | ||
1011 | so = (SceneObjectGroup)entity; | ||
1012 | return true; | ||
1013 | } | ||
1014 | } | ||
1015 | |||
1016 | return false; | ||
1017 | } | ||
1018 | ); | ||
1019 | |||
1020 | return so; | ||
1021 | } | ||
1022 | |||
1023 | /// <summary> | ||
995 | /// Get a part contained in this scene. | 1024 | /// Get a part contained in this scene. |
996 | /// </summary> | 1025 | /// </summary> |
997 | /// <param name="localID"></param> | 1026 | /// <param name="localID"></param> |
@@ -1005,7 +1034,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1005 | } | 1034 | } |
1006 | 1035 | ||
1007 | /// <summary> | 1036 | /// <summary> |
1008 | /// Get a named prim contained in this scene (will return the first | 1037 | /// Get a prim by name from the scene (will return the first |
1009 | /// found, if there are more than one prim with the same name) | 1038 | /// found, if there are more than one prim with the same name) |
1010 | /// </summary> | 1039 | /// </summary> |
1011 | /// <param name="name"></param> | 1040 | /// <param name="name"></param> |