aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2014-09-29 20:36:03 +0100
committerUbitUmarov2014-09-29 20:36:03 +0100
commitcfb1a2730045420319f0678ccc70e61d6a46df82 (patch)
treeae0e0c7684a4d9da05b0ac04f4892bffcfb7209d /OpenSim/Region
parent change avatar physics and motion control. Still not that good :( (diff)
parentAlso fetch and store old asset for animation sets (diff)
downloadopensim-SC-cfb1a2730045420319f0678ccc70e61d6a46df82.zip
opensim-SC-cfb1a2730045420319f0678ccc70e61d6a46df82.tar.gz
opensim-SC-cfb1a2730045420319f0678ccc70e61d6a46df82.tar.bz2
opensim-SC-cfb1a2730045420319f0678ccc70e61d6a46df82.tar.xz
Merge branch 'master' into ubitworkmaster
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs22
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs14
2 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 1e14f45..1a19585 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -172,6 +172,17 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
172 { 172 {
173 AssetXferUploader uploader = RequestXferUploader(transactionID); 173 AssetXferUploader uploader = RequestXferUploader(transactionID);
174 174
175 // Here we need to get the old asset to extract the
176 // texture UUIDs if it's a wearable.
177 if (item.Type == (int)AssetType.Bodypart ||
178 item.Type == (int)AssetType.Clothing ||
179 item.Type == (int)CustomAssetType.AnimationSet)
180 {
181 AssetBase oldAsset = m_Scene.AssetService.Get(item.AssetID.ToString());
182 if (oldAsset != null)
183 uploader.SetOldData(oldAsset.Data);
184 }
185
175 uploader.RequestUpdateTaskInventoryItem(remoteClient, item); 186 uploader.RequestUpdateTaskInventoryItem(remoteClient, item);
176 } 187 }
177 188
@@ -180,6 +191,17 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
180 { 191 {
181 AssetXferUploader uploader = RequestXferUploader(transactionID); 192 AssetXferUploader uploader = RequestXferUploader(transactionID);
182 193
194 // Here we need to get the old asset to extract the
195 // texture UUIDs if it's a wearable.
196 if (item.AssetType == (int)AssetType.Bodypart ||
197 item.AssetType == (int)AssetType.Clothing ||
198 item.AssetType == (int)CustomAssetType.AnimationSet)
199 {
200 AssetBase oldAsset = m_Scene.AssetService.Get(item.AssetID.ToString());
201 if (oldAsset != null)
202 uploader.SetOldData(oldAsset.Data);
203 }
204
183 uploader.RequestUpdateInventoryItem(remoteClient, item); 205 uploader.RequestUpdateInventoryItem(remoteClient, item);
184 } 206 }
185 } 207 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index b3dc0c0..64a9610 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -278,6 +278,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
278 278
279 remoteClient.SendAlertMessage("Script saved"); 279 remoteClient.SendAlertMessage("Script saved");
280 } 280 }
281 else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet)
282 {
283 AnimationSet animSet = new AnimationSet(data);
284 if (!animSet.Validate(x => {
285 int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x);
286 int required = (int)(PermissionMask.Transfer | PermissionMask.Copy);
287 if ((perms & required) != required)
288 return false;
289 return true;
290 }))
291 {
292 data = animSet.ToBytes();
293 }
294 }
281 295
282 AssetBase asset = 296 AssetBase asset =
283 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId.ToString()); 297 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId.ToString());