Stop logging spurious asset data for {0} is zero length error for sculpts/mesh

ODEPrim, for instance, always hits this code path twice at the moment
Firstly before any sculpt data has been loaded (hence the spurious message)
Secondly when any sculpt data has been loaded or failed to load (when the message would be valid).
Hence comment this out and rely on the message in ODEPrim.MeshAssetReceived() instead
(though this is not ideal since it requires all physics plugins to copy/paste similar code).
integration
Justin Clark-Casey (justincc) 2012-11-28 02:01:04 +00:00
parent 8a1d3b322f
commit aae76f7be4
2 changed files with 9 additions and 1 deletions

View File

@ -321,7 +321,10 @@ namespace OpenSim.Region.Physics.Meshing
if (primShape.SculptData.Length <= 0) if (primShape.SculptData.Length <= 0)
{ {
m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName); // XXX: At the moment we can not log here since ODEPrim, for instance, ends up triggering this
// method twice - once before it has loaded sculpt data from the asset service and once afterwards.
// The first time will always call with unloaded SculptData if this needs to be uploaded.
// m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName);
return false; return false;
} }

View File

@ -3361,6 +3361,11 @@ Console.WriteLine(" JointCreateFixed");
_pbs.SculptData = new byte[asset.Data.Length]; _pbs.SculptData = new byte[asset.Data.Length];
asset.Data.CopyTo(_pbs.SculptData, 0); asset.Data.CopyTo(_pbs.SculptData, 0);
// m_assetFailed = false; // m_assetFailed = false;
// m_log.DebugFormat(
// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}",
// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name);
m_taintshape = true; m_taintshape = true;
_parent_scene.AddPhysicsActorTaint(this); _parent_scene.AddPhysicsActorTaint(this);
} }