diff options
author | Justin Clark-Casey (justincc) | 2011-07-12 02:33:09 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-12 02:33:09 +0100 |
commit | df0e5cc9fe9b0851ae5442bdeeb49ab7778d5fe1 (patch) | |
tree | 1435bbc275609382086cd57c905b85f4bac67cb2 /OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |
parent | Fix permissions problem where newly uploaded meshes rezzed from inventory cou... (diff) | |
download | opensim-SC-df0e5cc9fe9b0851ae5442bdeeb49ab7778d5fe1.zip opensim-SC-df0e5cc9fe9b0851ae5442bdeeb49ab7778d5fe1.tar.gz opensim-SC-df0e5cc9fe9b0851ae5442bdeeb49ab7778d5fe1.tar.bz2 opensim-SC-df0e5cc9fe9b0851ae5442bdeeb49ab7778d5fe1.tar.xz |
When a mesh object is added to a scene, delay adding the physics actor until the sculpt data has been added to the shape (possibly via an async asset service request)
This prevents spurious 'no asset data' for meshes added on startup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 99392cc..7b8a80c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -1723,20 +1723,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1723 | PhysicsActor result; | 1723 | PhysicsActor result; |
1724 | IMesh mesh = null; | 1724 | IMesh mesh = null; |
1725 | 1725 | ||
1726 | if (needsMeshing(pbs)) | 1726 | // Don't create the mesh here - wait until the mesh data is loaded from the asset store. |
1727 | { | 1727 | // if (needsMeshing(pbs)) |
1728 | try | 1728 | // { |
1729 | { | 1729 | // try |
1730 | mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); | 1730 | // { |
1731 | } | 1731 | // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); |
1732 | catch(Exception e) | 1732 | // } |
1733 | { | 1733 | // catch(Exception e) |
1734 | m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); | 1734 | // { |
1735 | m_log.Debug(e.ToString()); | 1735 | // m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); |
1736 | mesh = null; | 1736 | // m_log.Debug(e.ToString()); |
1737 | return null; | 1737 | // mesh = null; |
1738 | } | 1738 | // return null; |
1739 | } | 1739 | // } |
1740 | // } | ||
1740 | 1741 | ||
1741 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); | 1742 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); |
1742 | 1743 | ||
@@ -2590,7 +2591,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2590 | { | 2591 | { |
2591 | if (!(_taintedPrimH.Contains(taintedprim))) | 2592 | if (!(_taintedPrimH.Contains(taintedprim))) |
2592 | { | 2593 | { |
2593 | //Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.m_primName); | 2594 | #if SPAM |
2595 | Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | ||
2596 | #endif | ||
2594 | _taintedPrimH.Add(taintedprim); // HashSet for searching | 2597 | _taintedPrimH.Add(taintedprim); // HashSet for searching |
2595 | _taintedPrimL.Add(taintedprim); // List for ordered readout | 2598 | _taintedPrimL.Add(taintedprim); // List for ordered readout |
2596 | } | 2599 | } |