Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2012-10-04 00:17:19 +02:00
commit d657c48abf
2 changed files with 41 additions and 4 deletions

View File

@ -4902,6 +4902,8 @@ namespace OpenSim.Region.Framework.Scenes
{
// m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId);
return;
if (ParentGroup.IsDeleted)
return;

View File

@ -29,7 +29,6 @@ namespace OpenSim.Region.Physics.OdePlugin
public float meshSculptLOD = 32;
public float MeshSculptphysicalLOD = 32;
public ODEMeshWorker(OdeScene pScene, ILog pLog, IMesher pMesher, IConfig pConfig)
{
m_scene = pScene;
@ -45,8 +44,6 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
/// <summary>
/// Routine to figure out if we need to mesh this prim with our mesher
/// </summary>
@ -207,9 +204,47 @@ namespace OpenSim.Region.Physics.OdePlugin
if(pbs.SculptData != null && pbs.SculptData.Length >0)
return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex);
ODEAssetRequest asr;
RequestAssetDelegate assetProvider = m_scene.RequestAssetMethod;
if (assetProvider != null)
asr = new ODEAssetRequest(this, assetProvider, actor, pbs);
return null;
}
}
return mesh;
}
}
public class ODEAssetRequest
{
PhysicsActor m_actor;
ODEMeshWorker m_worker;
PrimitiveBaseShape m_pbs;
public ODEAssetRequest(ODEMeshWorker pWorker, RequestAssetDelegate provider, PhysicsActor pActor, PrimitiveBaseShape ppbs)
{
m_actor = pActor;
m_worker = pWorker;
m_pbs = ppbs;
if (provider == null)
return;
UUID assetID = m_pbs.SculptTexture;
if (assetID == UUID.Zero)
return;
provider(assetID, ODEassetReceived);
}
void ODEassetReceived(AssetBase asset)
{
if (m_actor != null && m_pbs != null && asset != null && asset.Data != null && asset.Data.Length > 0)
{
m_pbs.SculptData = asset.Data;
m_actor.Shape = m_pbs;
}
}
}
}