stop passing FromUserInventoryItemID right down into the deserializer.
the code becomes simpler if this is set from the outside - only one place needs to do this.remove-scene-viewer
parent
9c0a03731d
commit
af7c6c5f39
|
@ -732,8 +732,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
|
||||
if (e == null || attachment) // Single
|
||||
{
|
||||
SceneObjectGroup g =
|
||||
SceneObjectSerializer.FromOriginalXmlFormat(UUID.Zero, xmlData);
|
||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
||||
|
||||
objlist.Add(g);
|
||||
veclist.Add(new Vector3(0, 0, 0));
|
||||
|
@ -762,8 +761,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
|
||||
foreach (XmlNode n in groups)
|
||||
{
|
||||
SceneObjectGroup g =
|
||||
SceneObjectSerializer.FromOriginalXmlFormat(UUID.Zero, n.OuterXml);
|
||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
|
||||
|
||||
objlist.Add(g);
|
||||
XmlElement el = (XmlElement)n;
|
||||
|
|
|
@ -1903,23 +1903,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="xmlReader"></param>
|
||||
/// <returns></returns>
|
||||
public static SceneObjectPart FromXml(XmlTextReader xmlReader)
|
||||
{
|
||||
return FromXml(UUID.Zero, xmlReader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restore this part from the serialized xml representation.
|
||||
/// </summary>
|
||||
/// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param>
|
||||
/// <param name="xmlReader"></param>
|
||||
/// <returns></returns>
|
||||
public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlTextReader xmlReader)
|
||||
{
|
||||
SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader);
|
||||
part.m_fromUserInventoryItemID = fromUserInventoryItemId;
|
||||
|
||||
// for tempOnRez objects, we have to fix the Expire date.
|
||||
if ((part.Flags & PrimFlags.TemporaryOnRez) != 0) part.ResetExpire();
|
||||
if ((part.Flags & PrimFlags.TemporaryOnRez) != 0)
|
||||
part.ResetExpire();
|
||||
|
||||
return part;
|
||||
}
|
||||
|
|
|
@ -53,19 +53,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
/// <summary>
|
||||
/// Deserialize a scene object from the original xml format
|
||||
/// </summary>
|
||||
/// <param name="serialization"></param>
|
||||
/// <param name="xmlData"></param>
|
||||
/// <returns></returns>
|
||||
public static SceneObjectGroup FromOriginalXmlFormat(string serialization)
|
||||
{
|
||||
return FromOriginalXmlFormat(UUID.Zero, serialization);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize a scene object from the original xml format
|
||||
/// </summary>
|
||||
/// <param name="serialization"></param>
|
||||
/// <returns></returns>
|
||||
public static SceneObjectGroup FromOriginalXmlFormat(UUID fromUserInventoryItemID, string xmlData)
|
||||
public static SceneObjectGroup FromOriginalXmlFormat(string xmlData)
|
||||
{
|
||||
//m_log.DebugFormat("[SOG]: Starting deserialization of SOG");
|
||||
//int time = System.Environment.TickCount;
|
||||
|
@ -87,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
|
||||
sr = new StringReader(parts[0].InnerXml);
|
||||
reader = new XmlTextReader(sr);
|
||||
SceneObjectGroup sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(fromUserInventoryItemID, reader));
|
||||
SceneObjectGroup sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
|
||||
reader.Close();
|
||||
sr.Close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue