From 7ff4eec79cf16886439604a23126abd195ae8b2e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 7 Jul 2012 00:02:45 +0100
Subject: Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
---
OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Helpers')
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index 3a2e420..d5354cb 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -601,19 +601,36 @@ namespace OpenSim.Tests.Common
ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = name, UUID = id, Scale = new Vector3(1, 1, 1) };
}
-
+
///
/// Create a scene object but do not add it to the scene.
///
///
- /// UUID always starts at 00000000-0000-0000-0000-000000000001
+ /// UUID always starts at 00000000-0000-0000-0000-000000000001. For some purposes, (e.g. serializing direct
+ /// to another object's inventory) we do not need a scene unique ID. So it would be better to add the
+ /// UUID when we actually add an object to a scene rather than on creation.
///
/// The number of parts that should be in the scene object
///
///
public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
{
- return CreateSceneObject(parts, ownerId, "", 0x1);
+ return CreateSceneObject(parts, ownerId, 0x1);
+ }
+
+ ///
+ /// Create a scene object but do not add it to the scene.
+ ///
+ /// The number of parts that should be in the scene object
+ ///
+ ///
+ /// The hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}"
+ /// will be given to the root part, and incremented for each part thereafter.
+ ///
+ ///
+ public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail)
+ {
+ return CreateSceneObject(parts, ownerId, "", uuidTail);
}
///
--
cgit v1.1