diff options
author | UbitUmarov | 2019-03-24 01:51:29 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-24 01:51:29 +0000 |
commit | 481d7156d16adc59da0ab82f0ae5d7b3c584e104 (patch) | |
tree | 16129246c4b80f8111c70cb2e15a5363d86e2d3a /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |
parent | compact the trivial te case, a more complete one may be needed even beening h... (diff) | |
download | opensim-SC-481d7156d16adc59da0ab82f0ae5d7b3c584e104.zip opensim-SC-481d7156d16adc59da0ab82f0ae5d7b3c584e104.tar.gz opensim-SC-481d7156d16adc59da0ab82f0ae5d7b3c584e104.tar.bz2 opensim-SC-481d7156d16adc59da0ab82f0ae5d7b3c584e104.tar.xz |
mantis 8505 ( and not 8506 by mistake on previus commit) remove the meshes numbre of sides warning. build prims with the number of sides of the high LOD submesh
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index e293463..8844a0f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -145,11 +145,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
145 | // avatarSkeleton if mesh includes a avatar skeleton | 145 | // avatarSkeleton if mesh includes a avatar skeleton |
146 | // useAvatarCollider if we should use physics mesh for avatar | 146 | // useAvatarCollider if we should use physics mesh for avatar |
147 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, | 147 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, |
148 | LLSDAssetUploadResponseData meshcostdata, out string error, ref string warning) | 148 | LLSDAssetUploadResponseData meshcostdata, out string error, ref string warning, out int[] meshesSides) |
149 | { | 149 | { |
150 | totalcost = 0; | 150 | totalcost = 0; |
151 | error = string.Empty; | 151 | error = string.Empty; |
152 | 152 | meshesSides = null; | |
153 | bool avatarSkeleton = false; | 153 | bool avatarSkeleton = false; |
154 | 154 | ||
155 | if (resources == null || | 155 | if (resources == null || |
@@ -204,6 +204,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
204 | if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) | 204 | if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) |
205 | { | 205 | { |
206 | numberMeshs = resources.mesh_list.Array.Count; | 206 | numberMeshs = resources.mesh_list.Array.Count; |
207 | meshesSides = new int[numberMeshs]; | ||
207 | 208 | ||
208 | for (int i = 0; i < numberMeshs; i++) | 209 | for (int i = 0; i < numberMeshs; i++) |
209 | { | 210 | { |
@@ -226,6 +227,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
226 | } | 227 | } |
227 | meshsCosts.Add(curCost); | 228 | meshsCosts.Add(curCost); |
228 | meshsfee += curCost.costFee; | 229 | meshsfee += curCost.costFee; |
230 | meshesSides[i] = curCost.highLODsides; | ||
229 | } | 231 | } |
230 | haveMeshs = true; | 232 | haveMeshs = true; |
231 | } | 233 | } |
@@ -260,11 +262,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
260 | error = "Model contains parts with sides larger than " + NonPhysicalPrimScaleMax.ToString() + "m. Please ajust scale"; | 262 | error = "Model contains parts with sides larger than " + NonPhysicalPrimScaleMax.ToString() + "m. Please ajust scale"; |
261 | return false; | 263 | return false; |
262 | } | 264 | } |
263 | int nfaces = 0; | ||
264 | if(inst.Contains("face_list")) | ||
265 | { | ||
266 | nfaces = ((ArrayList)inst["face_list"]).Count; | ||
267 | } | ||
268 | 265 | ||
269 | if (haveMeshs && inst.ContainsKey("mesh")) | 266 | if (haveMeshs && inst.ContainsKey("mesh")) |
270 | { | 267 | { |
@@ -281,8 +278,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
281 | float sqdiam = scale.LengthSquared(); | 278 | float sqdiam = scale.LengthSquared(); |
282 | 279 | ||
283 | ameshCostParam curCost = meshsCosts[mesh]; | 280 | ameshCostParam curCost = meshsCosts[mesh]; |
284 | if(nfaces != curCost.highLODsides) | ||
285 | warning +="Warning: Uploaded number of faces ( "+ nfaces.ToString() +" ) does not match highlod number of faces ( "+ curCost.highLODsides.ToString() +" )\n"; | ||
286 | 281 | ||
287 | float mesh_streaming = streamingCost(curCost, sqdiam); | 282 | float mesh_streaming = streamingCost(curCost, sqdiam); |
288 | 283 | ||