comment out a spam coment on core Meshmerizer
parent
d5ea203f93
commit
4a87a8f3b9
|
@ -74,8 +74,6 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private bool cacheSculptMaps = true;
|
private bool cacheSculptMaps = true;
|
||||||
private bool cacheSculptAlphaMaps = true;
|
|
||||||
|
|
||||||
private string decodedSculptMapPath = null;
|
private string decodedSculptMapPath = null;
|
||||||
private bool useMeshiesPhysicsMesh = false;
|
private bool useMeshiesPhysicsMesh = false;
|
||||||
|
|
||||||
|
@ -89,16 +87,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
IConfig mesh_config = config.Configs["Mesh"];
|
IConfig mesh_config = config.Configs["Mesh"];
|
||||||
|
|
||||||
decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
|
decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
|
||||||
|
|
||||||
cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
|
cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
|
||||||
|
|
||||||
if (Environment.OSVersion.Platform == PlatformID.Unix)
|
|
||||||
{
|
|
||||||
cacheSculptAlphaMaps = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
cacheSculptAlphaMaps = cacheSculptMaps;
|
|
||||||
|
|
||||||
if(mesh_config != null)
|
if(mesh_config != null)
|
||||||
useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);
|
useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);
|
||||||
|
|
||||||
|
@ -279,18 +268,15 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
{
|
{
|
||||||
if (!GenerateCoordsAndFacesFromPrimSculptData(primName, primShape, size, lod, out coords, out faces))
|
if (!GenerateCoordsAndFacesFromPrimSculptData(primName, primShape, size, lod, out coords, out faces))
|
||||||
return null;
|
return null;
|
||||||
// Remove the reference to any JPEG2000 sculpt data so it can be GCed
|
|
||||||
// don't loose it
|
|
||||||
// primShape.SculptData = Utils.EmptyBytes;
|
|
||||||
}
|
}
|
||||||
// primShape.SculptDataLoaded = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, size, lod, out coords, out faces))
|
if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, size, lod, out coords, out faces))
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// keep compatible
|
|
||||||
|
// Remove the reference to any JPEG2000 sculpt data so it can be GCed
|
||||||
primShape.SculptData = Utils.EmptyBytes;
|
primShape.SculptData = Utils.EmptyBytes;
|
||||||
|
|
||||||
int numCoords = coords.Count;
|
int numCoords = coords.Count;
|
||||||
|
@ -335,7 +321,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
|
|
||||||
if (primShape.SculptData.Length <= 0)
|
if (primShape.SculptData.Length <= 0)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
|
// m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,8 +482,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
|
|
||||||
//idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData);
|
//idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData);
|
||||||
|
|
||||||
if (cacheSculptMaps && (cacheSculptAlphaMaps || (((ImageFlags)(idata.Flags) & ImageFlags.HasAlpha) ==0)))
|
if (cacheSculptMaps)
|
||||||
// don't cache images with alpha channel in linux since mono can't load them correctly)
|
|
||||||
{
|
{
|
||||||
try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
|
try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
|
||||||
catch (Exception e) { m_log.Error("[SCULPT]: unable to cache sculpt map " + decodedSculptFileName + " " + e.Message); }
|
catch (Exception e) { m_log.Error("[SCULPT]: unable to cache sculpt map " + decodedSculptFileName + " " + e.Message); }
|
||||||
|
@ -717,11 +702,6 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
return CreateMesh(primName, primShape, size, lod, false);
|
return CreateMesh(primName, primShape, size, lod, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
|
|
||||||
{
|
|
||||||
return CreateMesh(primName, primShape, size, lod, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
|
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
|
||||||
{
|
{
|
||||||
#if SPAM
|
#if SPAM
|
||||||
|
@ -763,7 +743,5 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
|
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
public void ReleaseMesh(IMesh imesh) { }
|
|
||||||
public void ExpireReleaseMeshs() { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue