mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
cosmetics
This commit is contained in:
@@ -114,9 +114,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||
using (RestClient rc = new RestClient(m_URL))
|
||||
{
|
||||
List<WearableCacheItem> ret = new List<WearableCacheItem>();
|
||||
rc.AddResourcePath("bakes");
|
||||
rc.AddResourcePath(id.ToString());
|
||||
|
||||
rc.AddResourcePath("bakes/" + id.ToString());
|
||||
rc.RequestMethod = "GET";
|
||||
|
||||
try
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
internal IJ2KDecoder m_imgDecoder;
|
||||
|
||||
// caches per rendering
|
||||
private Dictionary<string, warp_Texture> m_warpTextures = new Dictionary<string, warp_Texture>();
|
||||
private Dictionary<UUID, warp_Texture> m_warpTextures = new Dictionary<UUID, warp_Texture>();
|
||||
private Dictionary<UUID, int> m_colors = new Dictionary<UUID, int>();
|
||||
|
||||
private IConfigSource m_config;
|
||||
@@ -518,13 +518,13 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
if (omvPrim.Sculpt != null && omvPrim.Sculpt.SculptTexture != UUID.Zero)
|
||||
{
|
||||
// Try fetchinng the asset
|
||||
byte[] sculptAsset = m_scene.AssetService.GetData(omvPrim.Sculpt.SculptTexture.ToString());
|
||||
AssetBase sculptAsset = m_scene.AssetService.Get(omvPrim.Sculpt.SculptTexture.ToString());
|
||||
if (sculptAsset != null)
|
||||
{
|
||||
// Is it a mesh?
|
||||
if (omvPrim.Sculpt.Type == SculptType.Mesh)
|
||||
{
|
||||
AssetMesh meshAsset = new AssetMesh(omvPrim.Sculpt.SculptTexture, sculptAsset);
|
||||
AssetMesh meshAsset = new AssetMesh(omvPrim.Sculpt.SculptTexture, sculptAsset.Data);
|
||||
FacetedMesh.TryDecodeFromAsset(omvPrim, meshAsset, lod, out renderMesh);
|
||||
meshAsset = null;
|
||||
}
|
||||
@@ -532,7 +532,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
{
|
||||
if (m_imgDecoder != null)
|
||||
{
|
||||
Image sculpt = m_imgDecoder.DecodeToImage(sculptAsset);
|
||||
Image sculpt = m_imgDecoder.DecodeToImage(sculptAsset.Data);
|
||||
if (sculpt != null)
|
||||
{
|
||||
renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim, (Bitmap)sculpt, lod);
|
||||
@@ -784,17 +784,15 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
warp_Texture ret = null;
|
||||
if (id == UUID.Zero)
|
||||
return ret;
|
||||
|
||||
if (m_warpTextures.TryGetValue(id.ToString(), out ret))
|
||||
if (m_warpTextures.TryGetValue(id, out ret))
|
||||
return ret;
|
||||
|
||||
byte[] asset = m_scene.AssetService.GetData(id.ToString());
|
||||
|
||||
AssetBase asset = m_scene.AssetService.Get(id.ToString());
|
||||
if (asset != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Bitmap img = (Bitmap)m_imgDecoder.DecodeToImage(asset))
|
||||
using (Bitmap img = (Bitmap)m_imgDecoder.DecodeToImage(asset.Data))
|
||||
ret = new warp_Texture(img, 8); // reduce textures size to 256x256
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -806,7 +804,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
m_log.WarnFormat("[Warp3D]: missing texture {0} data for prim {1} at {2}",
|
||||
id.ToString(), sop.Name, sop.GetWorldPosition().ToString());
|
||||
|
||||
m_warpTextures[id.ToString()] = ret;
|
||||
m_warpTextures[id] = ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -832,9 +832,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
if (httpserver == null || httpserver.Length == 0)
|
||||
{
|
||||
uint x = 0, y = 0;
|
||||
Util.RegionHandleToWorldLoc(regionhandle, out x, out y);
|
||||
|
||||
Util.RegionHandleToWorldLoc(regionhandle, out uint x, out uint y);
|
||||
GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
|
||||
if (mreg != null)
|
||||
|
||||
Reference in New Issue
Block a user