* Extract and boil down necessary texture UUIDs for an archive of the scene prims
* no user functionality yet0.6.0-stable
parent
d500209da0
commit
5c8a93c426
|
@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
protected virtual void CreatePacketServer()
|
protected virtual void CreatePacketServer()
|
||||||
{
|
{
|
||||||
LLPacketServer packetServer = new LLPacketServer(this);
|
new LLPacketServer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnReceivedData(IAsyncResult result)
|
protected virtual void OnReceivedData(IAsyncResult result)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using libsecondlife;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
|
@ -71,12 +72,23 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
public void ArchiveRegion(string savePath)
|
public void ArchiveRegion(string savePath)
|
||||||
{
|
{
|
||||||
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
||||||
|
|
||||||
|
Dictionary<LLUUID, int> textureUuids = new Dictionary<LLUUID, int>();
|
||||||
|
|
||||||
List<EntityBase> entities = m_scene.GetEntities();
|
List<EntityBase> entities = m_scene.GetEntities();
|
||||||
|
|
||||||
foreach (EntityBase entity in entities)
|
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);
|
string serEntities = SerializeObjects(entities);
|
||||||
|
@ -84,6 +96,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
if (serEntities != null && serEntities.Length > 0)
|
if (serEntities != null && serEntities.Length > 0)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
||||||
|
m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// set { m_innerScene.SceneObjects = value; }
|
// 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
|
public Dictionary<LLUUID, EntityBase> Entities
|
||||||
{
|
{
|
||||||
get { return m_innerScene.Entities; }
|
get { return m_innerScene.Entities; }
|
||||||
|
|
|
@ -92,8 +92,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public bool HasGroupChanged = false;
|
public bool HasGroupChanged = false;
|
||||||
public float scriptScore = 0f;
|
public float scriptScore = 0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private LLVector3 lastPhysGroupPos;
|
private LLVector3 lastPhysGroupPos;
|
||||||
private LLQuaternion lastPhysGroupRot;
|
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()
|
public SceneObjectPart[] GetParts()
|
||||||
{
|
{
|
||||||
int numParts = Children.Count;
|
int numParts = Children.Count;
|
||||||
|
|
|
@ -85,7 +85,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public partial class SceneObjectPart : IScriptHost, ISerializable
|
public partial class SceneObjectPart : IScriptHost, ISerializable
|
||||||
{
|
{
|
||||||
|
|
||||||
[XmlIgnore] public PhysicsActor PhysActor = null;
|
[XmlIgnore] public PhysicsActor PhysActor = null;
|
||||||
|
|
||||||
public LLUUID LastOwnerID;
|
public LLUUID LastOwnerID;
|
||||||
|
@ -103,7 +102,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
[XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
|
[XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
|
||||||
[XmlIgnore] public bool DIE_AT_EDGE = false;
|
[XmlIgnore] public bool DIE_AT_EDGE = false;
|
||||||
|
|
||||||
|
|
||||||
[XmlIgnore] public bool m_IsAttachment = false;
|
[XmlIgnore] public bool m_IsAttachment = false;
|
||||||
[XmlIgnore] public uint m_attachmentPoint = (byte)0;
|
[XmlIgnore] public uint m_attachmentPoint = (byte)0;
|
||||||
[XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero;
|
[XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero;
|
||||||
|
@ -700,7 +698,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
get { return m_shape; }
|
get { return m_shape; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|
||||||
m_shape = value;
|
m_shape = value;
|
||||||
TriggerScriptChangedEvent(Changed.SHAPE);
|
TriggerScriptChangedEvent(Changed.SHAPE);
|
||||||
}
|
}
|
||||||
|
@ -1949,6 +1946,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
||||||
{
|
{
|
||||||
m_shape.ReadInUpdateExtraParam(type, inUse, data);
|
m_shape.ReadInUpdateExtraParam(type, inUse, data);
|
||||||
|
|
||||||
if (type == 0x30)
|
if (type == 0x30)
|
||||||
{
|
{
|
||||||
if (m_shape.SculptEntry && m_shape.SculptTexture != LLUUID.Zero)
|
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);
|
m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SculptTextureCallback(LLUUID textureID, AssetBase texture)
|
public void SculptTextureCallback(LLUUID textureID, AssetBase texture)
|
||||||
{
|
{
|
||||||
if (m_shape.SculptEntry)
|
if (m_shape.SculptEntry)
|
||||||
|
|
Loading…
Reference in New Issue