attempt to expire out old dynamic textures, so they don't grow forever.
parent
721988adcd
commit
32ca6b6035
|
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
|
||||||
Array.Copy(data, assetData, data.Length);
|
Array.Copy(data, assetData, data.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO delete the last asset(data), if it was a dynamic texture
|
// Create a new asset for user
|
||||||
AssetBase asset = new AssetBase();
|
AssetBase asset = new AssetBase();
|
||||||
asset.FullID = LLUUID.Random();
|
asset.FullID = LLUUID.Random();
|
||||||
asset.Data = assetData;
|
asset.Data = assetData;
|
||||||
|
@ -244,6 +244,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
|
||||||
|
|
||||||
// mostly keep the values from before
|
// mostly keep the values from before
|
||||||
LLObject.TextureEntry tmptex = part.Shape.Textures;
|
LLObject.TextureEntry tmptex = part.Shape.Textures;
|
||||||
|
|
||||||
|
// remove the old asset from the cache
|
||||||
|
LLUUID oldID = tmptex.DefaultTexture.TextureID;
|
||||||
|
scene.AssetCache.ExpireAsset(oldID);
|
||||||
|
|
||||||
tmptex.DefaultTexture.TextureID = asset.FullID;
|
tmptex.DefaultTexture.TextureID = asset.FullID;
|
||||||
// I'm pretty sure we always want to force this to true
|
// I'm pretty sure we always want to force this to true
|
||||||
tmptex.DefaultTexture.Fullbright = true;
|
tmptex.DefaultTexture.Fullbright = true;
|
||||||
|
|
Loading…
Reference in New Issue