diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index 830c46d..7a80c72 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
105 | resources.instance_list == null || | 105 | resources.instance_list == null || |
106 | resources.instance_list.Array.Count == 0) | 106 | resources.instance_list.Array.Count == 0) |
107 | { | 107 | { |
108 | error = "Unable to upload mesh model. missing information."; | 108 | error = "missing model information."; |
109 | return false; | 109 | return false; |
110 | } | 110 | } |
111 | 111 | ||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
113 | 113 | ||
114 | if( numberInstances > ObjectLinkedPartsMax ) | 114 | if( numberInstances > ObjectLinkedPartsMax ) |
115 | { | 115 | { |
116 | error = "upload failed: Model whould have two many linked prims"; | 116 | error = "Model whould have more than " + ObjectLinkedPartsMax.ToString() + " linked prims"; |
117 | return false; | 117 | return false; |
118 | } | 118 | } |
119 | 119 | ||
@@ -186,15 +186,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
186 | 186 | ||
187 | if (scale.X < PrimScaleMin || scale.Y < PrimScaleMin || scale.Z < PrimScaleMin) | 187 | if (scale.X < PrimScaleMin || scale.Y < PrimScaleMin || scale.Z < PrimScaleMin) |
188 | { | 188 | { |
189 | // error = " upload fail: Model contains parts with a dimension lower than 0.001. Please adjust scaling"; | ||
190 | // return false; | ||
191 | skipedSmall++; | 189 | skipedSmall++; |
192 | continue; | 190 | continue; |
193 | } | 191 | } |
194 | 192 | ||
195 | if (scale.X > NonPhysicalPrimScaleMax || scale.Y > NonPhysicalPrimScaleMax || scale.Z > NonPhysicalPrimScaleMax) | 193 | if (scale.X > NonPhysicalPrimScaleMax || scale.Y > NonPhysicalPrimScaleMax || scale.Z > NonPhysicalPrimScaleMax) |
196 | { | 194 | { |
197 | error = "upload fail: Model contains parts larger than maximum allowed. Please adjust scaling"; | 195 | error = "Model contains parts with sides larger than " + NonPhysicalPrimScaleMax.ToString() + "m. Please ajust scale"; |
198 | return false; | 196 | return false; |
199 | } | 197 | } |
200 | 198 | ||
@@ -204,7 +202,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
204 | 202 | ||
205 | if (mesh >= numberMeshs) | 203 | if (mesh >= numberMeshs) |
206 | { | 204 | { |
207 | error = "Unable to upload mesh model. incoerent information."; | 205 | error = "Incoerent model information."; |
208 | return false; | 206 | return false; |
209 | } | 207 | } |
210 | 208 | ||
@@ -233,7 +231,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
233 | 231 | ||
234 | if (skipedSmall >0 && skipedSmall > numberInstances / 2) | 232 | if (skipedSmall >0 && skipedSmall > numberInstances / 2) |
235 | { | 233 | { |
236 | error = "Upload failed: Model contains too much prims smaller than minimum size to ignore"; | 234 | error = "Model contains too many prims smaller than " + PrimScaleMin.ToString() + "m"; |
237 | return false; | 235 | return false; |
238 | } | 236 | } |
239 | 237 | ||
@@ -279,14 +277,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
279 | 277 | ||
280 | if (data == null || data.Length == 0) | 278 | if (data == null || data.Length == 0) |
281 | { | 279 | { |
282 | error = "Unable to upload mesh model. missing information."; | 280 | error = "Missing model information."; |
283 | return false; | 281 | return false; |
284 | } | 282 | } |
285 | 283 | ||
286 | OSD meshOsd = null; | 284 | OSD meshOsd = null; |
287 | int start = 0; | 285 | int start = 0; |
288 | 286 | ||
289 | error = "Unable to upload mesh model. Invalid data"; | 287 | error = "Invalid model data"; |
290 | 288 | ||
291 | using (MemoryStream ms = new MemoryStream(data)) | 289 | using (MemoryStream ms = new MemoryStream(data)) |
292 | { | 290 | { |
@@ -334,13 +332,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
334 | 332 | ||
335 | if (submesh_offset < 0 || hulls_size == 0) | 333 | if (submesh_offset < 0 || hulls_size == 0) |
336 | { | 334 | { |
337 | error = "Unable to upload mesh model. missing physics_convex block"; | 335 | error = "Missing physics_convex block"; |
338 | return false; | 336 | return false; |
339 | } | 337 | } |
340 | 338 | ||
341 | if (!hulls(data, submesh_offset, hulls_size, out phys_hullsvertices, out phys_nhulls)) | 339 | if (!hulls(data, submesh_offset, hulls_size, out phys_hullsvertices, out phys_nhulls)) |
342 | { | 340 | { |
343 | error = "Unable to upload mesh model. bad physics_convex block"; | 341 | error = "Bad physics_convex block"; |
344 | return false; | 342 | return false; |
345 | } | 343 | } |
346 | 344 | ||
@@ -360,7 +358,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
360 | 358 | ||
361 | if (submesh_offset < 0 || highlod_size <= 0) | 359 | if (submesh_offset < 0 || highlod_size <= 0) |
362 | { | 360 | { |
363 | error = "Unable to upload mesh model. missing high_lod"; | 361 | error = "Missing high_lod block"; |
364 | return false; | 362 | return false; |
365 | } | 363 | } |
366 | 364 | ||
@@ -418,7 +416,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
418 | 416 | ||
419 | if (!submesh(data, submesh_offset, physmesh_size, out phys_ntriangles)) | 417 | if (!submesh(data, submesh_offset, physmesh_size, out phys_ntriangles)) |
420 | { | 418 | { |
421 | error = "Unable to upload mesh model. parsing error"; | 419 | error = "Model data parsing error"; |
422 | return false; | 420 | return false; |
423 | } | 421 | } |
424 | } | 422 | } |