diff options
author | UbitUmarov | 2012-09-23 15:04:10 +0100 |
---|---|---|
committer | UbitUmarov | 2012-09-23 15:04:10 +0100 |
commit | 64db9e41143c36ee1638f2c453b4645ff4ed008f (patch) | |
tree | 1f7c2277292f8abee8bb0e16e605881e88286e0f /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |
parent | report asset upload errors the right away (diff) | |
download | opensim-SC-64db9e41143c36ee1638f2c453b4645ff4ed008f.zip opensim-SC-64db9e41143c36ee1638f2c453b4645ff4ed008f.tar.gz opensim-SC-64db9e41143c36ee1638f2c453b4645ff4ed008f.tar.bz2 opensim-SC-64db9e41143c36ee1638f2c453b4645ff4ed008f.tar.xz |
try to allow free uploads for testing, if users prefix names with "TEST-". Let
textures get into inventory again. Both features under config control.
Have direct warnings to client, including a final one on upload complete
since i see nothing. problems: textures don't showup in inventory til
relog, also issues with permitions. A few more changes
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index 7a80c72..f03d8d8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -96,7 +96,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
96 | // basicCost input region assets upload cost | 96 | // basicCost input region assets upload cost |
97 | // totalcost returns model total upload fee | 97 | // totalcost returns model total upload fee |
98 | // meshcostdata returns detailed costs for viewer | 98 | // meshcostdata returns detailed costs for viewer |
99 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, LLSDAssetUploadResponseData meshcostdata, out string error) | 99 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, |
100 | LLSDAssetUploadResponseData meshcostdata, out string error, ref string warning) | ||
100 | { | 101 | { |
101 | totalcost = 0; | 102 | totalcost = 0; |
102 | error = string.Empty; | 103 | error = string.Empty; |
@@ -229,10 +230,18 @@ namespace OpenSim.Region.ClientStack.Linden | |||
229 | meshsfee += primCreationCost; | 230 | meshsfee += primCreationCost; |
230 | } | 231 | } |
231 | 232 | ||
232 | if (skipedSmall >0 && skipedSmall > numberInstances / 2) | 233 | if (skipedSmall > 0) |
233 | { | 234 | { |
234 | error = "Model contains too many prims smaller than " + PrimScaleMin.ToString() + "m"; | 235 | if (skipedSmall > numberInstances / 2) |
235 | return false; | 236 | { |
237 | error = "Model contains too many prims smaller than " + PrimScaleMin.ToString() + | ||
238 | "m minimum allowed size. Please check scalling"; | ||
239 | return false; | ||
240 | } | ||
241 | else | ||
242 | warning += skipedSmall.ToString() + " of the requested " +numberInstances.ToString() + | ||
243 | " model prims will not upload because they are smaller than " + PrimScaleMin.ToString() + | ||
244 | "m minimum allowed size. Please check scalling "; | ||
236 | } | 245 | } |
237 | 246 | ||
238 | if (meshcostdata.physics_cost <= meshcostdata.model_streaming_cost) | 247 | if (meshcostdata.physics_cost <= meshcostdata.model_streaming_cost) |
@@ -403,9 +412,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
403 | 412 | ||
404 | submesh_offset = -1; | 413 | submesh_offset = -1; |
405 | 414 | ||
406 | if (map.ContainsKey("physics_mesh")) | 415 | tmpmap = null; |
407 | { | 416 | if(map.ContainsKey("physics_mesh")) |
408 | tmpmap = (OSDMap)map["physics_mesh"]; | 417 | tmpmap = (OSDMap)map["physics_mesh"]; |
418 | else if (map.ContainsKey("physics_shape")) // old naming | ||
419 | tmpmap = (OSDMap)map["physics_shape"]; | ||
420 | |||
421 | if(tmpmap != null) | ||
422 | { | ||
409 | if (tmpmap.ContainsKey("offset")) | 423 | if (tmpmap.ContainsKey("offset")) |
410 | submesh_offset = tmpmap["offset"].AsInteger() + start; | 424 | submesh_offset = tmpmap["offset"].AsInteger() + start; |
411 | if (tmpmap.ContainsKey("size")) | 425 | if (tmpmap.ContainsKey("size")) |