From e869eeb0bfc48c769f680970f99e4c67dd5a1a70 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 9 Aug 2011 03:51:34 +0100
Subject: Implement first draft functions for saving and loading NPC appearance
from storage.
This works by serializing and deserializing NPC AvatarAppearance to a notecard in the prim inventory and making the required baked textures permanent.
By using notecards, we avoid lots of awkward, technical and user-unfriendly issues concerning retaining asset references and creating a new asset type.
Notecards also allow different appearances to be swapped and manipulated easily.
This also allows stored NPC appearances to work transparently with OARs/IARs since the UUID scan will pick up and store the necessary references from the notecard text.
This works in my basic test but is not at all ready for user use or bug reporting yet.
---
OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
index d0e5609..6817725 100644
--- a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
@@ -32,6 +32,14 @@ namespace OpenSim.Region.Framework.Interfaces
{
public interface IAvatarFactory
{
+ ///
+ /// Send the appearance of an avatar to others in the scene.
+ ///
+ ///
+ ///
+ bool SendAppearance(UUID agentId);
+
+ bool SaveBakedTextures(UUID agentId);
bool ValidateBakedTextureCache(IClientAPI client);
void QueueAppearanceSend(UUID agentid);
void QueueAppearanceSave(UUID agentid);
--
cgit v1.1
From be357f8feeb438e3292292d163918a307d69c69a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Aug 2011 01:58:32 +0100
Subject: Fix bug in persisting saved appearances for npcs
Assets have to be marked non-local as well as non-temporary to persist. This is now done.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5660
---
OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
(limited to 'OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
index 6817725..4dbddf4 100644
--- a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
@@ -39,7 +40,23 @@ namespace OpenSim.Region.Framework.Interfaces
///
bool SendAppearance(UUID agentId);
+ ///
+ /// Return the baked texture ids of the given agent.
+ ///
+ ///
+ /// An empty list if this agent has no baked textures (e.g. because it's a child agent)
+ Dictionary GetBakedTextureFaces(UUID agentId);
+
+ ///
+ /// Save the baked textures for the given agent permanently in the asset database.
+ ///
+ ///
+ /// This is used to preserve apperance textures for NPCs
+ ///
+ ///
+ /// true if a valid agent was found, false otherwise
bool SaveBakedTextures(UUID agentId);
+
bool ValidateBakedTextureCache(IClientAPI client);
void QueueAppearanceSend(UUID agentid);
void QueueAppearanceSave(UUID agentid);
--
cgit v1.1