Make changes to AnimationSet to allow indexing by names rather than indices. Add some debugging output and prepare for parsing an ascii-based format.

This commit is contained in:
Melanie Thielker
2014-09-27 02:30:01 +02:00
parent 8c68772624
commit 3ea76e3131
2 changed files with 40 additions and 35 deletions

View File

@@ -277,6 +277,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
remoteClient.SendAlertMessage("Script saved");
}
else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet)
{
AnimationSet animSet = new AnimationSet(data);
if (!animSet.Validate(x => {
int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x);
int required = (int)(PermissionMask.Transfer | PermissionMask.Copy);
if ((perms & required) != required)
return false;
return true;
}))
{
data = animSet.ToBytes();
}
}
AssetBase asset =
CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId.ToString());