* Implement 'Save Object Back to My Inventory'. On the Linden client this is in the Tools menu available when editing an object

* This facility allows you to save changes to an object that you've rezzed into a region back into their original inventory item without having to take a copy of the rezzed 
object.
This commit is contained in:
Justin Clarke Casey
2008-12-17 16:11:03 +00:00
parent ca0de93d9a
commit b4680f653d
12 changed files with 191 additions and 89 deletions

View File

@@ -401,16 +401,25 @@ namespace OpenSim.Region.Environment.Scenes
{
SetRootPart(part);
}
public SceneObjectGroup(string xmlData, bool isOriginalXmlFormat)
: this(UUID.Zero, xmlData, isOriginalXmlFormat)
{
}
/// <summary>
/// Create an object using serialized data in OpenSim's original xml format.
/// </summary>
/// <param name="fromUserInventoryItemID">
/// If applicable, the user inventory item id from which this object was rezzed. If not applicable then this
/// should be UUID.Zero
/// </param>
/// <param name="xmlData"></param>
/// <param name="isOriginalXmlFormat">
/// This parameter only exists to separate the two different xml constructors. In the future, versions should
/// be specified within the xml itself.
/// </param>
public SceneObjectGroup(string xmlData, bool isOriginalXmlFormat)
public SceneObjectGroup(UUID fromUserInventoryItemID, string xmlData, bool isOriginalXmlFormat)
{
if (!isOriginalXmlFormat)
throw new Exception("This constructor must specify the xml is in OpenSim's original format");
@@ -430,7 +439,7 @@ namespace OpenSim.Region.Environment.Scenes
reader.Read();
reader.ReadStartElement("SceneObjectGroup");
reader.ReadStartElement("RootPart");
SetRootPart(SceneObjectPart.FromXml(reader));
SetRootPart(SceneObjectPart.FromXml(fromUserInventoryItemID, reader));
reader.ReadEndElement();