* Extract and boil down necessary texture UUIDs for an archive of the scene prims

* no user functionality yet
0.6.0-stable
Justin Clarke Casey 2008-05-26 01:50:40 +00:00
parent d500209da0
commit 5c8a93c426
5 changed files with 32 additions and 8 deletions

View File

@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void CreatePacketServer()
{
LLPacketServer packetServer = new LLPacketServer(this);
new LLPacketServer(this);
}
protected virtual void OnReceivedData(IAsyncResult result)

View File

@ -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<LLUUID, int> textureUuids = new Dictionary<LLUUID, int>();
List<EntityBase> 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);
}
}

View File

@ -197,6 +197,14 @@ namespace OpenSim.Region.Environment.Scenes
// set { m_innerScene.SceneObjects = value; }
// }
/// <summary>
/// The dictionary of all entities in this scene. The contents of this dictionary may be changed at any time.
/// If you wish to add or remove entities, please use the appropriate method for that entity rather than
/// editing this dictionary directly.
///
/// If you want a list of entities where the list itself is guaranteed not to change, please use
/// GetEntities()
/// </summary>
public Dictionary<LLUUID, EntityBase> Entities
{
get { return m_innerScene.Entities; }

View File

@ -92,8 +92,6 @@ namespace OpenSim.Region.Environment.Scenes
public bool HasGroupChanged = false;
public float scriptScore = 0f;
private LLVector3 lastPhysGroupPos;
private LLQuaternion lastPhysGroupRot;
@ -2054,6 +2052,12 @@ namespace OpenSim.Region.Environment.Scenes
}
}
/// <summary>
/// Get the parts of this scene object
/// </summary>
/// <returns>
/// A <see cref="SceneObjectPart"/>
/// </returns>
public SceneObjectPart[] GetParts()
{
int numParts = Children.Count;

View File

@ -85,7 +85,6 @@ namespace OpenSim.Region.Environment.Scenes
[Serializable]
public partial class SceneObjectPart : IScriptHost, ISerializable
{
[XmlIgnore] public PhysicsActor PhysActor = null;
public LLUUID LastOwnerID;
@ -103,7 +102,6 @@ namespace OpenSim.Region.Environment.Scenes
[XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
[XmlIgnore] public bool DIE_AT_EDGE = false;
[XmlIgnore] public bool m_IsAttachment = false;
[XmlIgnore] public uint m_attachmentPoint = (byte)0;
[XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero;
@ -700,7 +698,6 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_shape; }
set
{
m_shape = value;
TriggerScriptChangedEvent(Changed.SHAPE);
}
@ -1949,6 +1946,7 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
{
m_shape.ReadInUpdateExtraParam(type, inUse, data);
if (type == 0x30)
{
if (m_shape.SculptEntry && m_shape.SculptTexture != LLUUID.Zero)
@ -1957,9 +1955,10 @@ namespace OpenSim.Region.Environment.Scenes
m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true);
}
}
ScheduleFullUpdate();
}
public void SculptTextureCallback(LLUUID textureID, AssetBase texture)
{
if (m_shape.SculptEntry)