From 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 15 May 2009 05:00:25 +0000 Subject: Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only. This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 6b5883e..9a455ae 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1414,8 +1414,7 @@ if (m_shape != null) { { if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero) { - m_parentGroup.Scene.CommsManager.AssetCache.GetAsset( - dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); + m_parentGroup.Scene.AssetService.Get(dupe.m_shape.SculptTexture.ToString(), dupe, AssetReceived); } bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0); @@ -1425,6 +1424,16 @@ if (m_shape != null) { return dupe; } + protected void AssetReceived(string id, Object sender, AssetBase asset) + { + if (asset != null) + { + SceneObjectPart sop = (SceneObjectPart)sender; + if (sop != null) + sop.SculptTextureCallback(asset.FullID, asset); + } + } + public static SceneObjectPart Create() { SceneObjectPart part = new SceneObjectPart(); @@ -3147,8 +3156,7 @@ if (m_shape != null) { { if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) { - m_parentGroup.Scene.CommsManager.AssetCache.GetAsset( - m_shape.SculptTexture, SculptTextureCallback, true); + m_parentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); } } -- cgit v1.1