diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index acb6888c30..0af2ad2647 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -472,6 +472,11 @@ namespace OpenSim.Region.Environment.Scenes /// Create an object using serialized data in OpenSim's xml2 format. /// public SceneObjectGroup(string xmlData) + { + SetFromXml(xmlData); + } + + protected void SetFromXml(string xmlData) { // libomv.types changes UUID to Guid xmlData = xmlData.Replace("", ""); @@ -486,7 +491,7 @@ namespace OpenSim.Region.Environment.Scenes reader.Read(); reader.ReadStartElement("SceneObjectGroup"); - SetRootPart(SceneObjectPart.FromXml(reader)); + SetRootPart(CreatePartFromXml(reader)); reader.Read(); bool more = true; @@ -498,7 +503,7 @@ namespace OpenSim.Region.Environment.Scenes case XmlNodeType.Element: if (reader.Name == "SceneObjectPart") { - SceneObjectPart part = SceneObjectPart.FromXml(reader); + SceneObjectPart part = CreatePartFromXml(reader); AddPart(part); part.StoreUndoState(); } @@ -519,6 +524,12 @@ namespace OpenSim.Region.Environment.Scenes sr.Close(); } + protected virtual SceneObjectPart CreatePartFromXml(XmlTextReader reader) + { + SceneObjectPart part = SceneObjectPart.FromXml(reader); + return part; + } + /// /// Constructor. This object is added to the scene later via AttachToScene() /// diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5dbf3b7e6f..acec9218b7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1306,7 +1306,6 @@ if (m_shape != null) { /// /// Restore this part from the serialized xml representation. /// - /// /// public static SceneObjectPart FromXml(XmlReader xmlReader) {