From 2c6272d11a916953bee28ed4b36d839e8c8dd4a2 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 19 Jan 2012 02:53:21 -0800 Subject: [PATCH] Add a version of GetGroupByPrim to Scene which accepts UUID instead of localID --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 027ec969ca..3d8c7144d8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4294,6 +4294,16 @@ namespace OpenSim.Region.Framework.Scenes public SceneObjectGroup GetGroupByPrim(uint localID) { return m_sceneGraph.GetGroupByPrim(localID); + } + + /// + /// Get a scene object group that contains the prim with the given uuid + /// + /// + /// null if no scene object group containing that prim is found + public SceneObjectGroup GetGroupByPrim(UUID fullID) + { + return m_sceneGraph.GetGroupByPrim(fullID); } public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1e2901b835..f481e72737 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -311,6 +311,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// This method does not send updates to the client - callers need to handle this themselves. + /// Caller should also trigger EventManager.TriggerObjectAddedToScene /// /// /// Position of the object. If null then the position stored in the object is used. @@ -925,7 +926,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// null if no scene object group containing that prim is found - private SceneObjectGroup GetGroupByPrim(UUID fullID) + public SceneObjectGroup GetGroupByPrim(UUID fullID) { SceneObjectGroup sog; lock (SceneObjectGroupsByFullPartID)