From abb193ec9421f167286f5cd07ff8d2b1fe207749 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Wed, 22 Jan 2014 16:14:42 +0200 Subject: In UuidGatherer, gather materials referenced in the prim's TextureEntry Signed-off-by: dahlia --- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs') diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 75a51b5..fe6cb84 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -161,7 +161,7 @@ namespace OpenSim.Region.Framework.Scenes { // Get the prim's default texture. This will be used for faces which don't have their own texture if (textureEntry.DefaultTexture != null) - assetUuids[textureEntry.DefaultTexture.TextureID] = (sbyte)AssetType.Texture; + GatherTextureEntryAssets(textureEntry.DefaultTexture, assetUuids); if (textureEntry.FaceTextures != null) { @@ -169,7 +169,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures) { if (texture != null) - assetUuids[texture.TextureID] = (sbyte)AssetType.Texture; + GatherTextureEntryAssets(texture, assetUuids); } } } @@ -233,6 +233,19 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Gather all the asset uuids found in one face of a Texture Entry. + /// + private void GatherTextureEntryAssets(Primitive.TextureEntryFace texture, IDictionary assetUuids) + { + assetUuids[texture.TextureID] = (sbyte)AssetType.Texture; + + if (texture.MaterialID != UUID.Zero) + { + GatherAssetUuids(texture.MaterialID, (sbyte)OpenSimAssetType.Material, assetUuids); + } + } + // /// // /// The callback made when we request the asset for an object from the asset service. // /// -- cgit v1.1