Alter uuid gather so that it properly analyzes coalesced objects.
This should correct save all the assets required for the items within the coalesced objects in an IAR. This should also correctly gather the items on hypergrid takes.0.7.1-dev
parent
ccc26f7443
commit
63c1b7e475
|
@ -117,29 +117,40 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
{
|
||||
using (XmlTextReader reader = new XmlTextReader(sr))
|
||||
{
|
||||
reader.Read();
|
||||
if (reader.Name != "CoalescedObject")
|
||||
try
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false",
|
||||
// reader.Name);
|
||||
reader.Read();
|
||||
if (reader.Name != "CoalescedObject")
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false",
|
||||
// reader.Name);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
coa = new CoalescedSceneObjects(UUID.Zero);
|
||||
reader.Read();
|
||||
|
||||
while (reader.NodeType != XmlNodeType.EndElement && reader.Name != "CoalescedObject")
|
||||
{
|
||||
if (reader.Name == "SceneObjectGroup")
|
||||
{
|
||||
string soXml = reader.ReadOuterXml();
|
||||
coa.Add(SceneObjectSerializer.FromOriginalXmlFormat(soXml));
|
||||
}
|
||||
}
|
||||
|
||||
reader.ReadEndElement(); // CoalescedObject
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
coa = new CoalescedSceneObjects(UUID.Zero);
|
||||
reader.Read();
|
||||
|
||||
while (reader.NodeType != XmlNodeType.EndElement && reader.Name != "CoalescedObject")
|
||||
{
|
||||
if (reader.Name == "SceneObjectGroup")
|
||||
{
|
||||
string soXml = reader.ReadOuterXml();
|
||||
coa.Add(SceneObjectSerializer.FromOriginalXmlFormat(soXml));
|
||||
}
|
||||
}
|
||||
|
||||
reader.ReadEndElement(); // CoalescedObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -298,10 +298,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (null != objectAsset)
|
||||
{
|
||||
string xml = Utils.BytesToString(objectAsset.Data);
|
||||
SceneObjectGroup sog = SceneObjectSerializer.FromOriginalXmlFormat(xml);
|
||||
|
||||
if (null != sog)
|
||||
GatherAssetUuids(sog, assetUuids);
|
||||
|
||||
CoalescedSceneObjects coa;
|
||||
if (CoalescedSceneObjectsSerializer.TryFromXml(xml, out coa))
|
||||
{
|
||||
foreach (SceneObjectGroup sog in coa.Objects)
|
||||
GatherAssetUuids(sog, assetUuids);
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneObjectGroup sog = SceneObjectSerializer.FromOriginalXmlFormat(xml);
|
||||
|
||||
if (null != sog)
|
||||
GatherAssetUuids(sog, assetUuids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue