diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
8 files changed, 117 insertions, 61 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs index 878242a..d2278bc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
54 | 54 | ||
55 | private Scene m_scene; | 55 | private Scene m_scene; |
56 | private IAssetService m_assetService; | 56 | private IAssetService m_assetService; |
57 | private bool m_enabled = true; | ||
57 | 58 | ||
58 | #region IRegionModuleBase Members | 59 | #region IRegionModuleBase Members |
59 | 60 | ||
@@ -65,7 +66,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
65 | 66 | ||
66 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
67 | { | 68 | { |
68 | 69 | IConfig startupConfig = source.Configs["Startup"]; | |
70 | if (startupConfig == null) | ||
71 | return; | ||
72 | |||
73 | if (!startupConfig.GetBoolean("ColladaMesh",true)) | ||
74 | m_enabled = false; | ||
69 | } | 75 | } |
70 | 76 | ||
71 | public void AddRegion(Scene pScene) | 77 | public void AddRegion(Scene pScene) |
@@ -101,16 +107,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
101 | 107 | ||
102 | public void RegisterCaps(UUID agentID, Caps caps) | 108 | public void RegisterCaps(UUID agentID, Caps caps) |
103 | { | 109 | { |
110 | if(!m_enabled) | ||
111 | return; | ||
112 | |||
104 | UUID capID = UUID.Random(); | 113 | UUID capID = UUID.Random(); |
105 | 114 | ||
106 | // m_log.Info("[GETMESH]: /CAPS/" + capID); | 115 | // m_log.Info("[GETMESH]: /CAPS/" + capID); |
116 | |||
107 | caps.RegisterHandler("GetMesh", | 117 | caps.RegisterHandler("GetMesh", |
108 | new RestHTTPHandler("GET", "/CAPS/" + capID, | 118 | new RestHTTPHandler("GET", "/CAPS/" + capID, |
109 | delegate(Hashtable m_dhttpMethod) | 119 | delegate(Hashtable m_dhttpMethod) |
110 | { | 120 | { |
111 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); | 121 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); |
112 | })); | 122 | })); |
113 | |||
114 | } | 123 | } |
115 | 124 | ||
116 | #endregion | 125 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs index 4a42c93..fb07cc9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
56 | private Scene m_scene; | 56 | private Scene m_scene; |
57 | // private IAssetService m_assetService; | 57 | // private IAssetService m_assetService; |
58 | private bool m_dumpAssetsToFile = false; | 58 | private bool m_dumpAssetsToFile = false; |
59 | private bool m_enabled = true; | ||
59 | 60 | ||
60 | #region IRegionModuleBase Members | 61 | #region IRegionModuleBase Members |
61 | 62 | ||
@@ -67,7 +68,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
67 | 68 | ||
68 | public void Initialise(IConfigSource source) | 69 | public void Initialise(IConfigSource source) |
69 | { | 70 | { |
70 | 71 | IConfig startupConfig = source.Configs["Startup"]; | |
72 | if (startupConfig == null) | ||
73 | return; | ||
74 | |||
75 | if (!startupConfig.GetBoolean("ColladaMesh",true)) | ||
76 | m_enabled = false; | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public void AddRegion(Scene pScene) | 79 | public void AddRegion(Scene pScene) |
@@ -103,6 +109,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
103 | 109 | ||
104 | public void RegisterCaps(UUID agentID, Caps caps) | 110 | public void RegisterCaps(UUID agentID, Caps caps) |
105 | { | 111 | { |
112 | if(!m_enabled) | ||
113 | return; | ||
114 | |||
106 | UUID capID = UUID.Random(); | 115 | UUID capID = UUID.Random(); |
107 | 116 | ||
108 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); | 117 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 3148871..0cd05e3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -34,13 +34,13 @@ using Nini.Config; | |||
34 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Servers.HttpServer; | ||
37 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
38 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 41 | using OpenSim.Services.Interfaces; |
41 | using OpenSim.Services.Connectors.Friends; | 42 | using OpenSim.Services.Connectors.Friends; |
42 | using OpenSim.Server.Base; | 43 | using OpenSim.Server.Base; |
43 | using OpenSim.Framework.Servers.HttpServer; | ||
44 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | 44 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
45 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; | 45 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; |
46 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 46 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 164ae50..1a0b914 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -33,7 +33,6 @@ using OpenMetaverse; | |||
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications; | 34 | using OpenSim.Framework.Communications; |
35 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
36 | using OpenSim.Framework.Servers.HttpServer; | ||
37 | using OpenSim.Framework.Client; | 36 | using OpenSim.Framework.Client; |
38 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 9b98de3..2fff533 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -466,16 +466,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
466 | if (m_creatorIdForAssetId.ContainsKey(assetId)) | 466 | if (m_creatorIdForAssetId.ContainsKey(assetId)) |
467 | { | 467 | { |
468 | string xmlData = Utils.BytesToString(data); | 468 | string xmlData = Utils.BytesToString(data); |
469 | SceneObjectGroup sog = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 469 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
470 | foreach (SceneObjectPart sop in sog.Parts) | 470 | |
471 | CoalescedSceneObjects coa = null; | ||
472 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) | ||
473 | { | ||
474 | // m_log.DebugFormat( | ||
475 | // "[INVENTORY ARCHIVER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count); | ||
476 | |||
477 | sceneObjects.AddRange(coa.Objects); | ||
478 | } | ||
479 | else | ||
471 | { | 480 | { |
472 | if (sop.CreatorData == null || sop.CreatorData == "") | 481 | sceneObjects.Add(SceneObjectSerializer.FromOriginalXmlFormat(xmlData)); |
473 | { | ||
474 | sop.CreatorID = m_creatorIdForAssetId[assetId]; | ||
475 | } | ||
476 | } | 482 | } |
477 | 483 | ||
478 | data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)); | 484 | foreach (SceneObjectGroup sog in sceneObjects) |
485 | foreach (SceneObjectPart sop in sog.Parts) | ||
486 | if (sop.CreatorData == null || sop.CreatorData == "") | ||
487 | sop.CreatorID = m_creatorIdForAssetId[assetId]; | ||
488 | |||
489 | if (coa != null) | ||
490 | data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa)); | ||
491 | else | ||
492 | data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sceneObjects[0])); | ||
479 | } | 493 | } |
480 | } | 494 | } |
481 | 495 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index e5127a0..5ba08ee 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -68,17 +68,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
68 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), | 68 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), |
69 | FirstName = "Mr", | 69 | FirstName = "Mr", |
70 | LastName = "Tiddles" }; | 70 | LastName = "Tiddles" }; |
71 | |||
71 | protected UserAccount m_uaLL1 | 72 | protected UserAccount m_uaLL1 |
72 | = new UserAccount { | 73 | = new UserAccount { |
73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 74 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
74 | FirstName = "Lord", | 75 | FirstName = "Lord", |
75 | LastName = "Lucan" }; | 76 | LastName = "Lucan" }; |
77 | |||
76 | protected UserAccount m_uaLL2 | 78 | protected UserAccount m_uaLL2 |
77 | = new UserAccount { | 79 | = new UserAccount { |
78 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), | 80 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), |
79 | FirstName = "Lord", | 81 | FirstName = "Lord", |
80 | LastName = "Lucan" }; | 82 | LastName = "Lucan" }; |
83 | |||
81 | protected string m_item1Name = "Ray Gun Item"; | 84 | protected string m_item1Name = "Ray Gun Item"; |
85 | protected string m_coaItemName = "Coalesced Item"; | ||
82 | 86 | ||
83 | [SetUp] | 87 | [SetUp] |
84 | public virtual void SetUp() | 88 | public virtual void SetUp() |
@@ -97,38 +101,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
97 | // log4net.Config.XmlConfigurator.Configure(); | 101 | // log4net.Config.XmlConfigurator.Configure(); |
98 | 102 | ||
99 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 103 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
100 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 104 | Scene scene = SceneSetupHelpers.SetupScene(); |
101 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 105 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
102 | 106 | ||
103 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); | 107 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); |
104 | 108 | ||
105 | MemoryStream archiveWriteStream = new MemoryStream(); | 109 | MemoryStream archiveWriteStream = new MemoryStream(); |
106 | 110 | ||
107 | // Create asset | 111 | // Create scene object asset |
108 | SceneObjectGroup object1; | 112 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
109 | SceneObjectPart part1; | 113 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); |
110 | { | ||
111 | string partName = "Ray Gun Object"; | ||
112 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
113 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
114 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
115 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
116 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
117 | |||
118 | part1 | ||
119 | = new SceneObjectPart( | ||
120 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
121 | part1.Name = partName; | ||
122 | |||
123 | object1 = new SceneObjectGroup(part1); | ||
124 | scene.AddNewSceneObject(object1, false); | ||
125 | } | ||
126 | 114 | ||
127 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 115 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
128 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 116 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
129 | scene.AssetService.Store(asset1); | 117 | scene.AssetService.Store(asset1); |
130 | 118 | ||
131 | // Create item | 119 | // Create scene object item |
132 | InventoryItemBase item1 = new InventoryItemBase(); | 120 | InventoryItemBase item1 = new InventoryItemBase(); |
133 | item1.Name = m_item1Name; | 121 | item1.Name = m_item1Name; |
134 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 122 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
@@ -139,8 +127,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
139 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 127 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
140 | scene.AddInventoryItem(item1); | 128 | scene.AddInventoryItem(item1); |
141 | 129 | ||
130 | // Create coalesced objects asset | ||
131 | SceneObjectGroup cobj1 = SceneSetupHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); | ||
132 | cobj1.AbsolutePosition = new Vector3(15, 30, 45); | ||
133 | |||
134 | SceneObjectGroup cobj2 = SceneSetupHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); | ||
135 | cobj2.AbsolutePosition = new Vector3(25, 50, 75); | ||
136 | |||
137 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); | ||
138 | |||
139 | AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); | ||
140 | scene.AssetService.Store(coaAsset); | ||
141 | |||
142 | // Create coalesced objects inventory item | ||
143 | InventoryItemBase coaItem = new InventoryItemBase(); | ||
144 | coaItem.Name = m_coaItemName; | ||
145 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); | ||
146 | coaItem.AssetID = coaAsset.FullID; | ||
147 | coaItem.GroupID = UUID.Random(); | ||
148 | coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID; | ||
149 | coaItem.Owner = m_uaLL1.PrincipalID; | ||
150 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | ||
151 | scene.AddInventoryItem(coaItem); | ||
152 | |||
142 | archiverModule.ArchiveInventory( | 153 | archiverModule.ArchiveInventory( |
143 | Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, m_item1Name, "hampshire", archiveWriteStream); | 154 | Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); |
144 | 155 | ||
145 | m_iarStreamBytes = archiveWriteStream.ToArray(); | 156 | m_iarStreamBytes = archiveWriteStream.ToArray(); |
146 | } | 157 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 7f156f8..d03f6da 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -62,9 +62,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
62 | SerialiserModule serialiserModule = new SerialiserModule(); | 62 | SerialiserModule serialiserModule = new SerialiserModule(); |
63 | m_archiverModule = new InventoryArchiverModule(); | 63 | m_archiverModule = new InventoryArchiverModule(); |
64 | 64 | ||
65 | m_scene = SceneSetupHelpers.SetupScene("Inventory"); | 65 | m_scene = SceneSetupHelpers.SetupScene(); |
66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); | 66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); |
67 | } | 67 | } |
68 | |||
69 | [Test] | ||
70 | public void TestLoadCoalesecedItem() | ||
71 | { | ||
72 | TestHelper.InMethod(); | ||
73 | // log4net.Config.XmlConfigurator.Configure(); | ||
74 | |||
75 | UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "password"); | ||
76 | m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); | ||
77 | |||
78 | InventoryItemBase coaItem | ||
79 | = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); | ||
80 | |||
81 | Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); | ||
82 | |||
83 | string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID); | ||
84 | |||
85 | CoalescedSceneObjects coa; | ||
86 | bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa); | ||
87 | |||
88 | Assert.That(readResult, Is.True); | ||
89 | Assert.That(coa.Count, Is.EqualTo(2)); | ||
90 | |||
91 | List<SceneObjectGroup> coaObjects = coa.Objects; | ||
92 | Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120"))); | ||
93 | Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45))); | ||
94 | |||
95 | Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140"))); | ||
96 | Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75))); | ||
97 | } | ||
68 | 98 | ||
69 | /// <summary> | 99 | /// <summary> |
70 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive | 100 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive |
@@ -84,24 +114,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
84 | UserProfileTestUtils.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); | 114 | UserProfileTestUtils.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); |
85 | 115 | ||
86 | // Create asset | 116 | // Create asset |
87 | SceneObjectGroup object1; | 117 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
88 | SceneObjectPart part1; | 118 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50); |
89 | { | ||
90 | string partName = "My Little Dog Object"; | ||
91 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
92 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
93 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
94 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
95 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
96 | |||
97 | part1 | ||
98 | = new SceneObjectPart( | ||
99 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
100 | part1.Name = partName; | ||
101 | |||
102 | object1 = new SceneObjectGroup(part1); | ||
103 | m_scene.AddNewSceneObject(object1, false); | ||
104 | } | ||
105 | 119 | ||
106 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 120 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
107 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 121 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs index 0e8f647..c7dae52 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
63 | 63 | ||
64 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 64 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
65 | 65 | ||
66 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 66 | Scene scene = SceneSetupHelpers.SetupScene(); |
67 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 67 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
68 | 68 | ||
69 | // Create user | 69 | // Create user |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
180 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 180 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
181 | 181 | ||
182 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene | 182 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene |
183 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 183 | Scene scene = SceneSetupHelpers.SetupScene(); |
184 | 184 | ||
185 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 185 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
186 | 186 | ||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
223 | 223 | ||
224 | SerialiserModule serialiserModule = new SerialiserModule(); | 224 | SerialiserModule serialiserModule = new SerialiserModule(); |
225 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 225 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
226 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 226 | Scene scene = SceneSetupHelpers.SetupScene(); |
227 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 227 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
228 | 228 | ||
229 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password"); | 229 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password"); |
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
248 | 248 | ||
249 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 249 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
250 | 250 | ||
251 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 251 | Scene scene = SceneSetupHelpers.SetupScene(); |
252 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 252 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
253 | 253 | ||
254 | // Create user | 254 | // Create user |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
327 | TestHelper.InMethod(); | 327 | TestHelper.InMethod(); |
328 | // log4net.Config.XmlConfigurator.Configure(); | 328 | // log4net.Config.XmlConfigurator.Configure(); |
329 | 329 | ||
330 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 330 | Scene scene = SceneSetupHelpers.SetupScene(); |
331 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 331 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
332 | 332 | ||
333 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); | 333 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); |
@@ -394,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
394 | TestHelper.InMethod(); | 394 | TestHelper.InMethod(); |
395 | //log4net.Config.XmlConfigurator.Configure(); | 395 | //log4net.Config.XmlConfigurator.Configure(); |
396 | 396 | ||
397 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 397 | Scene scene = SceneSetupHelpers.SetupScene(); |
398 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 398 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
399 | 399 | ||
400 | string folder1ExistingName = "a"; | 400 | string folder1ExistingName = "a"; |
@@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
445 | TestHelper.InMethod(); | 445 | TestHelper.InMethod(); |
446 | // log4net.Config.XmlConfigurator.Configure(); | 446 | // log4net.Config.XmlConfigurator.Configure(); |
447 | 447 | ||
448 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 448 | Scene scene = SceneSetupHelpers.SetupScene(); |
449 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 449 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
450 | 450 | ||
451 | string folder1ExistingName = "a"; | 451 | string folder1ExistingName = "a"; |