Merge branch 'master' of /var/git/opensim/
commit
e863c0052b
File diff suppressed because it is too large
Load Diff
|
@ -124,14 +124,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
||||||
{
|
{
|
||||||
// There is only ever one prim. This oddity should be removeable post 0.5.9
|
// There is only ever one prim. This oddity should be removeable post 0.5.9
|
||||||
return SceneObjectSerializer.FromXml2Format(aPrimNode.OuterXml);
|
//return SceneObjectSerializer.FromXml2Format(aPrimNode.OuterXml);
|
||||||
|
using (reader = new XmlTextReader(new StringReader(aPrimNode.OuterXml)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
if (SceneObjectSerializer.Xml2ToSOG(reader, obj))
|
||||||
|
return obj;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return SceneObjectSerializer.FromXml2Format(rootNode.OuterXml);
|
//return SceneObjectSerializer.FromXml2Format(rootNode.OuterXml);
|
||||||
|
using (reader = new XmlTextReader(new StringReader(rootNode.OuterXml)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
if (SceneObjectSerializer.Xml2ToSOG(reader, obj))
|
||||||
|
return obj;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,12 +209,17 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
/// <returns>The scene object created. null if the scene object already existed</returns>
|
/// <returns>The scene object created. null if the scene object already existed</returns>
|
||||||
protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
|
protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
|
||||||
{
|
{
|
||||||
SceneObjectGroup obj = SceneObjectSerializer.FromXml2Format(xmlData);
|
//SceneObjectGroup obj = SceneObjectSerializer.FromXml2Format(xmlData);
|
||||||
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(xmlData)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
SceneObjectSerializer.Xml2ToSOG(reader, obj);
|
||||||
|
|
||||||
if (scene.AddRestoredSceneObject(obj, true, false))
|
if (scene.AddRestoredSceneObject(obj, true, false))
|
||||||
return obj;
|
return obj;
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SavePrimsToXml2(Scene scene, string fileName)
|
public static void SavePrimsToXml2(Scene scene, string fileName)
|
||||||
|
|
Loading…
Reference in New Issue