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/Framework/AvatarAppearance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/AvatarAppearance.cs') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 73b068d..02af5d9 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -539,7 +539,7 @@ namespace OpenSim.Framework /// public void Unpack(OSDMap data) { - if ((data != null) && (data["serial"] != null)) + if ((data != null) && (data["serial"] != null)) m_serial = data["serial"].AsInteger(); if ((data != null) && (data["height"] != null)) m_avatarHeight = (float)data["height"].AsReal(); -- cgit v1.1 From 57e54d84d641787d40a2b45549f6f2d373c5f2f2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 16 Aug 2011 23:05:08 +0100 Subject: Add new FireAndForgetMethod.None. This executes the callback on the same thread that made the request. Designed for use only by regression tests that rely on a predicable event ordering. --- OpenSim/Framework/AvatarAppearance.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/AvatarAppearance.cs') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 02af5d9..ab4ed66 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -412,12 +412,20 @@ namespace OpenSim.Framework } /// - /// Add an attachment, if the attachpoint has the + /// Add an attachment + /// + /// + /// If the attachpoint has the /// 0x80 bit set then we assume this is an append /// operation otherwise we replace whatever is /// currently attached at the attachpoint + /// + /// + /// If UUID.Zero, then an any attachment at the attachpoint is removed. + /// + /// /// return true if something actually changed - /// + /// public bool SetAttachment(int attachpoint, UUID item, UUID asset) { if (attachpoint == 0) -- cgit v1.1