diff options
author | Justin Clarke Casey | 2008-12-17 16:11:03 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-17 16:11:03 +0000 |
commit | b4680f653dbc1c6f712898af79c4ea22bca3f678 (patch) | |
tree | 8482ca109db6d7e4b51221f0631c483a4a2d0fef /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |
parent | * Adding some locks to XEngine's m_PrimObjects which were prone to 'the colle... (diff) | |
download | opensim-SC_OLD-b4680f653dbc1c6f712898af79c4ea22bca3f678.zip opensim-SC_OLD-b4680f653dbc1c6f712898af79c4ea22bca3f678.tar.gz opensim-SC_OLD-b4680f653dbc1c6f712898af79c4ea22bca3f678.tar.bz2 opensim-SC_OLD-b4680f653dbc1c6f712898af79c4ea22bca3f678.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 10a37ee..3547cd4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -116,30 +116,55 @@ namespace OpenSim.Region.Environment.Scenes | |||
116 | // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) | 116 | // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) |
117 | [XmlIgnore] | 117 | [XmlIgnore] |
118 | public UUID Sound; | 118 | public UUID Sound; |
119 | |||
119 | [XmlIgnore] | 120 | [XmlIgnore] |
120 | public byte SoundFlags; | 121 | public byte SoundFlags; |
122 | |||
121 | [XmlIgnore] | 123 | [XmlIgnore] |
122 | public double SoundGain; | 124 | public double SoundGain; |
125 | |||
123 | [XmlIgnore] | 126 | [XmlIgnore] |
124 | public double SoundRadius; | 127 | public double SoundRadius; |
128 | |||
125 | [XmlIgnore] | 129 | [XmlIgnore] |
126 | public uint TimeStampFull = 0; | 130 | public uint TimeStampFull = 0; |
131 | |||
127 | [XmlIgnore] | 132 | [XmlIgnore] |
128 | public uint TimeStampLastActivity = 0; // Will be used for AutoReturn | 133 | public uint TimeStampLastActivity = 0; // Will be used for AutoReturn |
134 | |||
129 | [XmlIgnore] | 135 | [XmlIgnore] |
130 | public uint TimeStampTerse = 0; | 136 | public uint TimeStampTerse = 0; |
137 | |||
131 | [XmlIgnore] | 138 | [XmlIgnore] |
132 | public UUID FromAssetID = UUID.Zero; | 139 | public UUID FromAssetID = UUID.Zero; |
140 | |||
141 | /// <value> | ||
142 | /// The UUID of the user inventory item from which this object was rezzed if this is a root part. | ||
143 | /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. | ||
144 | /// </value> | ||
145 | private UUID m_fromUserInventoryItemID = UUID.Zero; | ||
146 | |||
147 | [XmlIgnore] | ||
148 | public UUID FromUserInventoryItemID | ||
149 | { | ||
150 | get { return m_fromUserInventoryItemID; } | ||
151 | } | ||
152 | |||
133 | [XmlIgnore] | 153 | [XmlIgnore] |
134 | public bool IsAttachment = false; | 154 | public bool IsAttachment = false; |
155 | |||
135 | [XmlIgnore] | 156 | [XmlIgnore] |
136 | public scriptEvents AggregateScriptEvents = 0; | 157 | public scriptEvents AggregateScriptEvents = 0; |
158 | |||
137 | [XmlIgnore] | 159 | [XmlIgnore] |
138 | public UUID AttachedAvatar = UUID.Zero; | 160 | public UUID AttachedAvatar = UUID.Zero; |
161 | |||
139 | [XmlIgnore] | 162 | [XmlIgnore] |
140 | public Vector3 AttachedPos = Vector3.Zero; | 163 | public Vector3 AttachedPos = Vector3.Zero; |
164 | |||
141 | [XmlIgnore] | 165 | [XmlIgnore] |
142 | public uint AttachmentPoint = (byte)0; | 166 | public uint AttachmentPoint = (byte)0; |
167 | |||
143 | [XmlIgnore] | 168 | [XmlIgnore] |
144 | public PhysicsVector RotationAxis = new PhysicsVector(1f,1f,1f); | 169 | public PhysicsVector RotationAxis = new PhysicsVector(1f,1f,1f); |
145 | 170 | ||
@@ -1428,15 +1453,27 @@ if (m_shape != null) { | |||
1428 | /// <summary> | 1453 | /// <summary> |
1429 | /// Restore this part from the serialized xml representation. | 1454 | /// Restore this part from the serialized xml representation. |
1430 | /// </summary> | 1455 | /// </summary> |
1456 | /// <param name="xmlReader"></param> | ||
1431 | /// <returns></returns> | 1457 | /// <returns></returns> |
1432 | public static SceneObjectPart FromXml(XmlReader xmlReader) | 1458 | public static SceneObjectPart FromXml(XmlReader xmlReader) |
1433 | { | 1459 | { |
1434 | // It's not necessary to persist this | 1460 | return FromXml(UUID.Zero, xmlReader); |
1435 | |||
1436 | XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); | ||
1437 | SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); | ||
1438 | return newobject; | ||
1439 | } | 1461 | } |
1462 | |||
1463 | /// <summary> | ||
1464 | /// Restore this part from the serialized xml representation. | ||
1465 | /// </summary> | ||
1466 | /// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param> | ||
1467 | /// <param name="xmlReader"></param> | ||
1468 | /// <returns></returns> | ||
1469 | public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlReader xmlReader) | ||
1470 | { | ||
1471 | XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); | ||
1472 | SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader); | ||
1473 | part.m_fromUserInventoryItemID = fromUserInventoryItemId; | ||
1474 | |||
1475 | return part; | ||
1476 | } | ||
1440 | 1477 | ||
1441 | public UUID GetAvatarOnSitTarget() | 1478 | public UUID GetAvatarOnSitTarget() |
1442 | { | 1479 | { |
@@ -1603,7 +1640,7 @@ if (m_shape != null) { | |||
1603 | public void GetProperties(IClientAPI client) | 1640 | public void GetProperties(IClientAPI client) |
1604 | { | 1641 | { |
1605 | client.SendObjectPropertiesReply( | 1642 | client.SendObjectPropertiesReply( |
1606 | UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, | 1643 | m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, |
1607 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, | 1644 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, |
1608 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, | 1645 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, |
1609 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, | 1646 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, |