aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-15 00:42:06 +0100
committerJustin Clark-Casey (justincc)2011-04-15 00:42:06 +0100
commita0d80140f2d0ad6dd63970a3a3d5c0da8320ae75 (patch)
tree4c1f6780b2f8c766f7af29e827d77269790a94e9 /OpenSim/Tests/Common/Mock
parentimplement stub TestLoadCoalesecedItem(). Doesn't do what it's meant to do yet. (diff)
downloadopensim-SC_OLD-a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75.zip
opensim-SC_OLD-a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75.tar.gz
opensim-SC_OLD-a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75.tar.bz2
opensim-SC_OLD-a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75.tar.xz
Make all the objects in a coalescence reappears after being loaded from an IAR. This still doesn't work proprerly since some required textures/contained item assets might be missing.
From pure code inspection, it looks like the uuid gatherer may get most asset uuids because the scene object serializer naively pulls non-root parts from all contained scene objects into one mega-object. However, root part uuids may well still be missing, and there may be other odd artifacts from this bug. It appears that storing the size of the coalescence and the offsets is redundant, since one can work out this information from the position data already in the scene object groups.
Diffstat (limited to 'OpenSim/Tests/Common/Mock')
-rw-r--r--OpenSim/Tests/Common/Mock/MockAssetService.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
index 4118308..9d7c5e2 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetService.cs
@@ -54,13 +54,19 @@ namespace OpenSim.Tests.Common.Mock
54 54
55 public AssetBase Get(string id) 55 public AssetBase Get(string id)
56 { 56 {
57 m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id); 57// m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
58 58
59 AssetBase asset; 59 AssetBase asset;
60 if (Assets.ContainsKey(id)) 60 if (Assets.ContainsKey(id))
61 {
61 asset = Assets[id]; 62 asset = Assets[id];
63// m_log.DebugFormat(
64// "[MOCK ASSET SERVICE]: Got asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
65 }
62 else 66 else
63 asset = null; 67 {
68 asset = null;
69 }
64 70
65 return asset; 71 return asset;
66 } 72 }
@@ -77,7 +83,14 @@ namespace OpenSim.Tests.Common.Mock
77 83
78 public byte[] GetData(string id) 84 public byte[] GetData(string id)
79 { 85 {
80 throw new System.NotImplementedException(); 86// m_log.DebugFormat("[MOCK ASSET SERVICE]: Requesting data for asset {0}", id);
87
88 AssetBase asset = Get(id);
89
90 if (asset == null)
91 return null;
92 else
93 return asset.Data;
81 } 94 }
82 95
83 public bool Get(string id, object sender, AssetRetrieved handler) 96 public bool Get(string id, object sender, AssetRetrieved handler)
@@ -89,7 +102,8 @@ namespace OpenSim.Tests.Common.Mock
89 102
90 public string Store(AssetBase asset) 103 public string Store(AssetBase asset)
91 { 104 {
92 m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID); 105// m_log.DebugFormat(
106// "[MOCK ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
93 107
94 Assets[asset.ID] = asset; 108 Assets[asset.ID] = asset;
95 109