Half of the compatibility is working. Login into a new region with
old data works. Teleport out of a new region with old data works. Teleport into a new region with old data does not trigger the necessary rebake.viewer-2-initial-appearance
parent
657cceb884
commit
6e58c3d563
|
@ -368,15 +368,12 @@ namespace OpenSim.Framework
|
|||
}
|
||||
}
|
||||
|
||||
if (args["packed_appearance"] != null)
|
||||
{
|
||||
if (args["packed_appearance"].Type == OSDType.Map)
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
// DEBUG ON
|
||||
m_log.WarnFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
}
|
||||
else
|
||||
m_log.WarnFormat("[AGENTCIRCUITDATA] packed_appearance is not a map:\n{0}",args["packed_appearance"].ToString());
|
||||
// DEBUG OFF
|
||||
}
|
||||
// DEBUG ON
|
||||
else
|
||||
|
|
|
@ -389,7 +389,7 @@ namespace OpenSim.Framework
|
|||
changed = true;
|
||||
// DEBUG ON
|
||||
if (newface != null)
|
||||
m_log.WarnFormat("[SCENEPRESENCE] index {0}, new texture id {1}",i,newface.TextureID);
|
||||
m_log.WarnFormat("[AVATAR APPEARANCE] index {0}, new texture id {1}",i,newface.TextureID);
|
||||
// DEBUG OFF
|
||||
}
|
||||
|
||||
|
|
|
@ -390,8 +390,11 @@ namespace OpenSim.Framework
|
|||
// The code to pack textures, visuals, wearables and attachments
|
||||
// should be removed; packed appearance contains the full appearance
|
||||
// This is retained for backward compatibility only
|
||||
if ((Appearance.Texture != null) && (Appearance.Texture.Length > 0))
|
||||
args["texture_entry"] = OSD.FromBinary(Appearance.Texture);
|
||||
if (Appearance.Texture != null)
|
||||
{
|
||||
byte[] rawtextures = Appearance.Texture.GetBytes();
|
||||
args["texture_entry"] = OSD.FromBinary(rawtextures);
|
||||
}
|
||||
|
||||
if ((Appearance.VisualParams != null) && (Appearance.VisualParams.Length > 0))
|
||||
args["visual_params"] = OSD.FromBinary(Appearance.VisualParams);
|
||||
|
@ -408,10 +411,10 @@ namespace OpenSim.Framework
|
|||
args["wearables"] = wears;
|
||||
}
|
||||
|
||||
List<AvatarAttachments> attachments = Appearance.GetAttachments();
|
||||
if ((attachments != null) && (attachments.Length > 0))
|
||||
List<AvatarAttachment> attachments = Appearance.GetAttachments();
|
||||
if ((attachments != null) && (attachments.Count > 0))
|
||||
{
|
||||
OSDArray attachs = new OSDArray(attachments.Length);
|
||||
OSDArray attachs = new OSDArray(attachments.Count);
|
||||
foreach (AvatarAttachment att in attachments)
|
||||
attachs.Add(att.Pack());
|
||||
args["attachments"] = attachs;
|
||||
|
@ -560,7 +563,11 @@ namespace OpenSim.Framework
|
|||
// should be removed; packed appearance contains the full appearance
|
||||
// This is retained for backward compatibility only
|
||||
if (args["texture_entry"] != null)
|
||||
Appearance.SetTextureEntries(args["texture_entry"].AsBinary());
|
||||
{
|
||||
byte[] rawtextures = args["texture_entry"].AsBinary();
|
||||
Primitive.TextureEntry textures = new Primitive.TextureEntry(rawtextures,0,rawtextures.Length);
|
||||
Appearance.SetTextureEntries(textures);
|
||||
}
|
||||
|
||||
if (args["visual_params"] != null)
|
||||
Appearance.SetVisualParams(args["visual_params"].AsBinary());
|
||||
|
@ -578,21 +585,25 @@ namespace OpenSim.Framework
|
|||
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
|
||||
{
|
||||
OSDArray attachs = (OSDArray)(args["attachments"]);
|
||||
AvatarAttachment[] attachments = new AvatarAttachment[attachs.Count];
|
||||
int i = 0;
|
||||
foreach (OSD o in attachs)
|
||||
{
|
||||
if (o.Type == OSDType.Map)
|
||||
{
|
||||
attachments[i++] = new AvatarAttachment((OSDMap)o);
|
||||
// We know all of these must end up as attachments so we
|
||||
// append rather than replace to ensure multiple attachments
|
||||
// per point continues to work
|
||||
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
|
||||
}
|
||||
}
|
||||
Appearance.SetAttachments(attachments);
|
||||
}
|
||||
// end of code to remove
|
||||
|
||||
if (args["packed_appearance"] != null)
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
|
||||
Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]);
|
||||
// DEBUG ON
|
||||
else
|
||||
System.Console.WriteLine("No packed appearance in AgentUpdate");
|
||||
// DEBUG OFF
|
||||
|
||||
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
|
||||
{
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
{
|
||||
if (m_scene.AssetService.Get(face.TextureID.ToString()) == null)
|
||||
{
|
||||
m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,this.Name);
|
||||
m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,client.Name);
|
||||
client.SendRebakeAvatarTextures(face.TextureID);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue