From cb702990923d77bf261b66d2feb47d01981f16d2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 16 Jun 2008 22:43:30 +0000 Subject: * Fix a bug in the archiver where I didn't realize a shape still needs its default texture as well as its face textures --- .../Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 1b78f4c..5ff435c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -99,17 +99,22 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver m_log.DebugFormat( "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); + LLObject.TextureEntry textureEntry = part.Shape.Textures; + + // Get the prim's default texture. This will be used for faces which don't have their own texture + assetUuids[textureEntry.DefaultTexture.TextureID] = 1; + // XXX: Not a great way to iterate through face textures, but there's no - // other way to tell how many faces there actually are + // other method available to tell how many faces there actually are int i = 0; - foreach (LLObject.TextureEntryFace texture in part.Shape.Textures.FaceTextures) + foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures) { if (texture != null) { m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++); assetUuids[texture.TextureID] = 1; } - } + } foreach (TaskInventoryItem tii in part.TaskInventory.Values) { -- cgit v1.1