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) 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)

View File

@ -136,17 +136,16 @@
meshing = Meshmerizer meshing = Meshmerizer
;meshing = ZeroMesher ;meshing = ZeroMesher
;; Path to decoded sculpty maps ; Path to decoded sculpty maps
;; Defaults to "j2kDecodeCache ; Defaults to "j2kDecodeCache
;DecodedSculptMapPath = "j2kDecodeCache" ;DecodedSculptMapPath = "j2kDecodeCache"
;# {CacheSculptMaps} {Cache decoded sculpt maps?} {true false} true ; if you use Meshmerizer and want sculpt map collisions, setting this to
;; 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
;; 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
;; 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
;; versions of mono dont work well when reading the cache files, so set this ; to false if you have compatibility problems.
;; to false if you have compatability problems. ;CacheSculptMaps = true
; CacheSculptMaps = true
; Choose one of the physics engines below ; Choose one of the physics engines below
; OpenDynamicsEngine is by some distance the most developed physics engine ; OpenDynamicsEngine is by some distance the most developed physics engine