protected LSL_Key SaveAppearanceToNotecard(ScenePresence sp, string notecard)
{
IAvatarFactoryModule appearanceModule = World.RequestModuleInterface<IAvatarFactoryModule>();
if (appearanceModule != null)
{
appearanceModule.SaveBakedTextures(sp.UUID);
EntityTransferContext ctx = new EntityTransferContext();
OSDMap appearancePacked = sp.Appearance.Pack(ctx);
TaskInventoryItem item
= SaveNotecard(notecard, "Avatar Appearance", Util.GetFormattedXml(appearancePacked as OSD), true);
return new LSL_Key(item.AssetID.ToString());
}
else
{
return new LSL_Key(UUID.Zero.ToString());
}
}