From 77cc7ce399d1b1a710f3b3f4337932febdef66c8 Mon Sep 17 00:00:00 2001
From: teravus
Date: Fri, 21 Dec 2012 19:12:30 -0500
Subject: * Partial Commit for Avatar Appearance to include the functionality
of Cached Bakes.
---
.../Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs')
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index 8849a59..4fa604f 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Capabilities.Handlers
///
private void BakedTextureUploaded(UUID assetID, byte[] data)
{
-// m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
+ m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
--
cgit v1.1
From 6797ac14741851efa5ba60a00891e18cf7755c80 Mon Sep 17 00:00:00 2001
From: teravus
Date: Sat, 29 Dec 2012 08:53:58 -0500
Subject: * This finishes the implementation of AgentCachedTexture. Requires
the XBakes Module and service for full functionality. Previous no-cache
functionality works without the service and module. In some ways, I would
have been happier not putting an AssetBase in WearableCacheItem.. but
turns out it was probably unavoidable. No additional locks, yay.
---
.../UploadBakedTexture/UploadBakedTextureHandler.cs | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs')
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index 4fa604f..5536564 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -27,6 +27,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
@@ -50,6 +51,7 @@ namespace OpenSim.Capabilities.Handlers
{
public class UploadBakedTextureHandler
{
+
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Caps m_HostCapsObj;
@@ -79,9 +81,9 @@ namespace OpenSim.Capabilities.Handlers
{
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
-
+
BakedTextureUploader uploader =
- new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
+ new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_HostCapsObj.AgentID);
uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler(
@@ -125,6 +127,7 @@ namespace OpenSim.Capabilities.Handlers
asset.Temporary = true;
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
m_assetService.Store(asset);
+
}
}
@@ -137,15 +140,19 @@ namespace OpenSim.Capabilities.Handlers
private string uploaderPath = String.Empty;
private UUID newAssetID;
private IHttpServer httpListener;
+ private UUID AgentId = UUID.Zero;
- public BakedTextureUploader(string path, IHttpServer httpServer)
+ public BakedTextureUploader(string path, IHttpServer httpServer, UUID uUID)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
+ AgentId = uUID;
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
+
+
///
/// Handle raw uploaded baked texture data.
///
--
cgit v1.1