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/SceneGraph.cs | |
parent | implement Scene.GetSceneObjectGroup(UUID fullID) using existing index (diff) | |
download | opensim-SC_OLD-4b0fc4faef657cc819dfa360fb6a266532724455.zip opensim-SC_OLD-4b0fc4faef657cc819dfa360fb6a266532724455.tar.gz opensim-SC_OLD-4b0fc4faef657cc819dfa360fb6a266532724455.tar.bz2 opensim-SC_OLD-4b0fc4faef657cc819dfa360fb6a266532724455.tar.xz |
implement Scene.GetSceneObjectGroup(string name) to match the equivalent GetSOP method
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 31 |
1 files changed, 30 insertions, 1 deletions
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> |