Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-10-13 18:44:58 +01:00
commit bb1e35fbd9
3 changed files with 1389 additions and 16 deletions

View File

@ -124,14 +124,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
{
// 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;
}
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>
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))
return obj;
else
return null;
if (scene.AddRestoredSceneObject(obj, true, false))
return obj;
else
return null;
}
}
public static void SavePrimsToXml2(Scene scene, string fileName)

View File

@ -136,17 +136,16 @@
meshing = Meshmerizer
;meshing = ZeroMesher
;; Path to decoded sculpty maps
;; Defaults to "j2kDecodeCache
; Path to decoded sculpty maps
; Defaults to "j2kDecodeCache
;DecodedSculptMapPath = "j2kDecodeCache"
;# {CacheSculptMaps} {Cache decoded sculpt maps?} {true false} true
;; if you use Meshmerizer and want sculpt map collisions, setting this to
;; to true will store decoded sculpt maps in a special folder in your bin
;; folder, which can reduce startup times by reducing asset requests. Some
;; versions of mono dont work well when reading the cache files, so set this
;; to false if you have compatability problems.
; CacheSculptMaps = true
; if you use Meshmerizer and want sculpt map collisions, setting this to
; to true will store decoded sculpt maps in a special folder in your bin
; folder, which can reduce startup times by reducing asset requests. Some
; versions of mono dont work well when reading the cache files, so set this
; to false if you have compatibility problems.
;CacheSculptMaps = true
; Choose one of the physics engines below
; OpenDynamicsEngine is by some distance the most developed physics engine