From 5c8a93c4262f3197a02645aea6c2b7362fd6784e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 26 May 2008 01:50:40 +0000 Subject: * Extract and boil down necessary texture UUIDs for an archive of the scene prims * no user functionality yet --- .../Environment/Modules/World/Archiver/ArchiverModule.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules/World') diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs index 7016d1b..dc81f41 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs @@ -30,6 +30,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser; using OpenSim.Region.Environment.Scenes; using System.Collections.Generic; using System.Reflection; +using libsecondlife; using log4net; using Nini.Config; @@ -71,12 +72,23 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver public void ArchiveRegion(string savePath) { m_log.Warn("[ARCHIVER]: Archive region not yet implemented"); + + Dictionary textureUuids = new Dictionary(); List entities = m_scene.GetEntities(); foreach (EntityBase entity in entities) { - + if (entity is SceneObjectGroup) + { + SceneObjectGroup sceneObject = (SceneObjectGroup)entity; + + foreach (SceneObjectPart part in sceneObject.GetParts()) + { + LLUUID texture = new LLUUID(part.Shape.TextureEntry, 0); + textureUuids[texture] = 1; + } + } } string serEntities = SerializeObjects(entities); @@ -84,6 +96,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver if (serEntities != null && serEntities.Length > 0) { m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); + m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count); } } -- cgit v1.1