From a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 00:42:06 +0100
Subject: 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.
---
OpenSim/Services/AssetService/AssetService.cs | 10 +++++++++-
OpenSim/Services/Interfaces/IAssetService.cs | 5 +++++
2 files changed, 14 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index a81af43..e1f90b6 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -89,6 +89,8 @@ namespace OpenSim.Services.AssetService
public virtual AssetBase Get(string id)
{
+// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id);
+
UUID assetID;
if (!UUID.TryParse(id, out assetID))
@@ -107,6 +109,8 @@ namespace OpenSim.Services.AssetService
public virtual AssetMetadata GetMetadata(string id)
{
+// m_log.DebugFormat("[ASSET SERVICE]: Get asset metadata for {0}", id);
+
UUID assetID;
if (!UUID.TryParse(id, out assetID))
@@ -121,6 +125,8 @@ namespace OpenSim.Services.AssetService
public virtual byte[] GetData(string id)
{
+// m_log.DebugFormat("[ASSET SERVICE]: Get asset data for {0}", id);
+
UUID assetID;
if (!UUID.TryParse(id, out assetID))
@@ -150,7 +156,9 @@ namespace OpenSim.Services.AssetService
public virtual string Store(AssetBase asset)
{
- //m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID);
+// m_log.DebugFormat(
+// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
+
m_Database.StoreAsset(asset);
return asset.ID;
diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index 3be6815..1ac1cec 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -48,6 +48,11 @@ namespace OpenSim.Services.Interfaces
///
AssetMetadata GetMetadata(string id);
+ ///
+ /// Get an asset's data, ignoring the metadata.
+ ///
+ ///
+ /// null if there is no such asset
byte[] GetData(string id);
///
--
cgit v1.1