aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs35
1 files changed, 25 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 867d2ab..202a4ce 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -167,7 +167,7 @@ public abstract class BSShape
167 // Prevent trying to keep fetching the mesh by declaring failure. 167 // Prevent trying to keep fetching the mesh by declaring failure.
168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched) 168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
169 { 169 {
170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}", 171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}",
172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}", 173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}",
@@ -177,7 +177,8 @@ public abstract class BSShape
177 { 177 {
178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset 178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset
179 if (prim.BaseShape.SculptEntry 179 if (prim.BaseShape.SculptEntry
180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Failed 180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedAssetFetch
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedMeshing
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting 182 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting
182 && prim.BaseShape.SculptTexture != OMV.UUID.Zero 183 && prim.BaseShape.SculptTexture != OMV.UUID.Zero
183 ) 184 )
@@ -219,7 +220,7 @@ public abstract class BSShape
219 } 220 }
220 if (!assetFound) 221 if (!assetFound)
221 { 222 {
222 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 223 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
223 } 224 }
224 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}", 225 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}",
225 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs ); 226 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs );
@@ -227,7 +228,7 @@ public abstract class BSShape
227 } 228 }
228 else 229 else
229 { 230 {
230 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 231 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
231 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}", 232 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}",
232 LogHeader, physicsScene.Name); 233 LogHeader, physicsScene.Name);
233 } 234 }
@@ -235,13 +236,20 @@ public abstract class BSShape
235 } 236 }
236 else 237 else
237 { 238 {
238 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 239 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
239 { 240 {
240 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}", 241 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}",
241 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 242 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
242 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}", 243 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}",
243 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 244 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
244 } 245 }
246 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
247 {
248 physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}",
249 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
250 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}",
251 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
252 }
245 } 253 }
246 } 254 }
247 255
@@ -374,7 +382,9 @@ public class BSShapeMesh : BSShape
374 382
375 // Check to see if mesh was created (might require an asset). 383 // Check to see if mesh was created (might require an asset).
376 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 384 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
377 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 385 if (!newShape.isNativeShape
386 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
387 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
378 { 388 {
379 // If a mesh was what was created, remember the built shape for later sharing. 389 // If a mesh was what was created, remember the built shape for later sharing.
380 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 390 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh.
@@ -517,7 +527,7 @@ public class BSShapeMesh : BSShape
517 else 527 else
518 { 528 {
519 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 529 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
520 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 530 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
521 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 531 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
522 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); 532 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
523 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 533 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
@@ -559,7 +569,9 @@ public class BSShapeHull : BSShape
559 569
560 // Check to see if hull was created (might require an asset). 570 // Check to see if hull was created (might require an asset).
561 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 571 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
562 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 572 if (!newShape.isNativeShape
573 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
574 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
563 { 575 {
564 // If a mesh was what was created, remember the built shape for later sharing. 576 // If a mesh was what was created, remember the built shape for later sharing.
565 Hulls.Add(newHullKey, retHull); 577 Hulls.Add(newHullKey, retHull);
@@ -1079,10 +1091,13 @@ public class BSShapeGImpact : BSShape
1079 // Check to see if mesh was created (might require an asset). 1091 // Check to see if mesh was created (might require an asset).
1080 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 1092 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
1081 newShape.shapeKey = newMeshKey; 1093 newShape.shapeKey = newMeshKey;
1082 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 1094 if (!newShape.isNativeShape
1095 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
1096 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
1083 { 1097 {
1084 // If a mesh was what was created, remember the built shape for later sharing. 1098 // If a mesh was what was created, remember the built shape for later sharing.
1085 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 1099 // Also note that if meshing failed we put it in the mesh list as there is nothing
1100 // else to do about the mesh.
1086 GImpacts.Add(newMeshKey, retGImpact); 1101 GImpacts.Add(newMeshKey, retGImpact);
1087 } 1102 }
1088 1103