diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 100 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 159 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 44 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 360 |
8 files changed, 398 insertions, 298 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 542d454..3489873 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -30,6 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | ||
33 | using System.Timers; | 34 | using System.Timers; |
34 | using System.Xml; | 35 | using System.Xml; |
35 | using OpenMetaverse; | 36 | using OpenMetaverse; |
@@ -2192,60 +2193,87 @@ namespace OpenSim.Region.Framework.Scenes | |||
2192 | /// Returns one object if the asset is a regular object, and multiple objects for a coalesced object. | 2193 | /// Returns one object if the asset is a regular object, and multiple objects for a coalesced object. |
2193 | /// </remarks> | 2194 | /// </remarks> |
2194 | /// <param name="assetData">Asset data</param> | 2195 | /// <param name="assetData">Asset data</param> |
2195 | /// <param name="attachment">Whether the item is an attachment</param> | 2196 | /// <param name="isAttachment">True if the object is an attachment.</param> |
2196 | /// <param name="objlist">The objects included in the asset</param> | 2197 | /// <param name="objlist">The objects included in the asset</param> |
2197 | /// <param name="veclist">Relative positions of the objects</param> | 2198 | /// <param name="veclist">Relative positions of the objects</param> |
2198 | /// <param name="bbox">Bounding box of all the objects</param> | 2199 | /// <param name="bbox">Bounding box of all the objects</param> |
2199 | /// <param name="offsetHeight">Offset in the Z axis from the centre of the bounding box | 2200 | /// <param name="offsetHeight">Offset in the Z axis from the centre of the bounding box |
2200 | /// to the centre of the root prim (relevant only when returning a single object)</param> | 2201 | /// to the centre of the root prim (relevant only when returning a single object)</param> |
2201 | /// <returns>true = returning a single object; false = multiple objects</returns> | 2202 | /// <returns> |
2202 | public bool GetObjectsToRez(byte[] assetData, bool attachment, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, | 2203 | /// true if returning a single object or deserialization fails, false if returning the coalesced |
2204 | /// list of objects | ||
2205 | /// </returns> | ||
2206 | public bool GetObjectsToRez( | ||
2207 | byte[] assetData, bool isAttachment, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, | ||
2203 | out Vector3 bbox, out float offsetHeight) | 2208 | out Vector3 bbox, out float offsetHeight) |
2204 | { | 2209 | { |
2205 | objlist = new List<SceneObjectGroup>(); | 2210 | objlist = new List<SceneObjectGroup>(); |
2206 | veclist = new List<Vector3>(); | 2211 | veclist = new List<Vector3>(); |
2207 | 2212 | ||
2208 | XmlDocument doc = new XmlDocument(); | ||
2209 | string xmlData = Utils.BytesToString(assetData); | 2213 | string xmlData = Utils.BytesToString(assetData); |
2210 | doc.LoadXml(xmlData); | ||
2211 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | ||
2212 | 2214 | ||
2213 | if (e == null || attachment) // Single | 2215 | try |
2214 | { | 2216 | { |
2215 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 2217 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
2216 | objlist.Add(g); | 2218 | { |
2217 | veclist.Add(new Vector3(0, 0, 0)); | 2219 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) |
2218 | bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); | 2220 | { |
2219 | return true; | 2221 | reader.Read(); |
2222 | bool isSingleObject = reader.Name != "CoalescedObject"; | ||
2223 | |||
2224 | if (isSingleObject || isAttachment) | ||
2225 | { | ||
2226 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader); | ||
2227 | objlist.Add(g); | ||
2228 | veclist.Add(Vector3.Zero); | ||
2229 | bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); | ||
2230 | return true; | ||
2231 | } | ||
2232 | else | ||
2233 | { | ||
2234 | XmlDocument doc = new XmlDocument(); | ||
2235 | doc.LoadXml(xmlData); | ||
2236 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | ||
2237 | XmlElement coll = (XmlElement)e; | ||
2238 | float bx = Convert.ToSingle(coll.GetAttribute("x")); | ||
2239 | float by = Convert.ToSingle(coll.GetAttribute("y")); | ||
2240 | float bz = Convert.ToSingle(coll.GetAttribute("z")); | ||
2241 | bbox = new Vector3(bx, by, bz); | ||
2242 | offsetHeight = 0; | ||
2243 | |||
2244 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | ||
2245 | foreach (XmlNode n in groups) | ||
2246 | { | ||
2247 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | ||
2248 | objlist.Add(g); | ||
2249 | |||
2250 | XmlElement el = (XmlElement)n; | ||
2251 | string rawX = el.GetAttribute("offsetx"); | ||
2252 | string rawY = el.GetAttribute("offsety"); | ||
2253 | string rawZ = el.GetAttribute("offsetz"); | ||
2254 | |||
2255 | float x = Convert.ToSingle(rawX); | ||
2256 | float y = Convert.ToSingle(rawY); | ||
2257 | float z = Convert.ToSingle(rawZ); | ||
2258 | veclist.Add(new Vector3(x, y, z)); | ||
2259 | } | ||
2260 | |||
2261 | return false; | ||
2262 | } | ||
2263 | } | ||
2264 | } | ||
2220 | } | 2265 | } |
2221 | else | 2266 | catch (Exception e) |
2222 | { | 2267 | { |
2223 | XmlElement coll = (XmlElement)e; | 2268 | m_log.Error( |
2224 | float bx = Convert.ToSingle(coll.GetAttribute("x")); | 2269 | "[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ", |
2225 | float by = Convert.ToSingle(coll.GetAttribute("y")); | 2270 | e); |
2226 | float bz = Convert.ToSingle(coll.GetAttribute("z")); | ||
2227 | bbox = new Vector3(bx, by, bz); | ||
2228 | offsetHeight = 0; | ||
2229 | 2271 | ||
2230 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | 2272 | bbox = Vector3.Zero; |
2231 | foreach (XmlNode n in groups) | 2273 | offsetHeight = 0; |
2232 | { | ||
2233 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | ||
2234 | objlist.Add(g); | ||
2235 | |||
2236 | XmlElement el = (XmlElement)n; | ||
2237 | string rawX = el.GetAttribute("offsetx"); | ||
2238 | string rawY = el.GetAttribute("offsety"); | ||
2239 | string rawZ = el.GetAttribute("offsetz"); | ||
2240 | |||
2241 | float x = Convert.ToSingle(rawX); | ||
2242 | float y = Convert.ToSingle(rawY); | ||
2243 | float z = Convert.ToSingle(rawZ); | ||
2244 | veclist.Add(new Vector3(x, y, z)); | ||
2245 | } | ||
2246 | } | 2274 | } |
2247 | 2275 | ||
2248 | return false; | 2276 | return true; |
2249 | } | 2277 | } |
2250 | 2278 | ||
2251 | /// <summary> | 2279 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a43de29..18376c3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -329,6 +329,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
329 | private Dictionary<string, string> m_extraSettings; | 329 | private Dictionary<string, string> m_extraSettings; |
330 | 330 | ||
331 | /// <summary> | 331 | /// <summary> |
332 | /// If true then the next time the scene loop is activated, updates will be performed by firing of a timer | ||
333 | /// rather than on a single thread that sleeps. | ||
334 | /// </summary> | ||
335 | public bool UpdateOnTimer { get; set; } | ||
336 | |||
337 | /// <summary> | ||
338 | /// Only used if we are updating scene on a timer rather than sleeping a thread. | ||
339 | /// </summary> | ||
340 | private Timer m_sceneUpdateTimer; | ||
341 | |||
342 | /// <summary> | ||
332 | /// Current scene frame number | 343 | /// Current scene frame number |
333 | /// </summary> | 344 | /// </summary> |
334 | public uint Frame | 345 | public uint Frame |
@@ -430,7 +441,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
430 | /// Is the scene active? | 441 | /// Is the scene active? |
431 | /// </summary> | 442 | /// </summary> |
432 | /// <remarks> | 443 | /// <remarks> |
433 | /// If false, maintenance and update loops are not being run. Updates can still be triggered manually if | 444 | /// If false, maintenance and update loops are not being run, though after setting to false update may still |
445 | /// be active for a period (and IsRunning will still be true). Updates can still be triggered manually if | ||
434 | /// the scene is not active. | 446 | /// the scene is not active. |
435 | /// </remarks> | 447 | /// </remarks> |
436 | public bool Active | 448 | public bool Active |
@@ -453,8 +465,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
453 | } | 465 | } |
454 | private volatile bool m_active; | 466 | private volatile bool m_active; |
455 | 467 | ||
456 | // private int m_lastUpdate; | 468 | /// <summary> |
457 | // private bool m_firstHeartbeat = true; | 469 | /// If true then updates are running. This may be true for a short period after a scene is de-activated. |
470 | /// </summary> | ||
471 | public bool IsRunning { get { return m_isRunning; } } | ||
472 | private volatile bool m_isRunning; | ||
458 | 473 | ||
459 | private Timer m_mapGenerationTimer = new Timer(); | 474 | private Timer m_mapGenerationTimer = new Timer(); |
460 | private bool m_generateMaptiles; | 475 | private bool m_generateMaptiles; |
@@ -1352,19 +1367,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1352 | /// </param> | 1367 | /// </param> |
1353 | public void Start(bool startScripts) | 1368 | public void Start(bool startScripts) |
1354 | { | 1369 | { |
1370 | if (IsRunning) | ||
1371 | return; | ||
1372 | |||
1373 | m_isRunning = true; | ||
1355 | m_active = true; | 1374 | m_active = true; |
1356 | 1375 | ||
1357 | // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); | 1376 | // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); |
1358 | |||
1359 | //m_heartbeatTimer.Enabled = true; | ||
1360 | //m_heartbeatTimer.Interval = (int)(m_timespan * 1000); | ||
1361 | //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | ||
1362 | if (m_heartbeatThread != null) | 1377 | if (m_heartbeatThread != null) |
1363 | { | 1378 | { |
1364 | m_heartbeatThread.Abort(); | 1379 | m_heartbeatThread.Abort(); |
1365 | m_heartbeatThread = null; | 1380 | m_heartbeatThread = null; |
1366 | } | 1381 | } |
1367 | // m_lastUpdate = Util.EnvironmentTickCount(); | ||
1368 | 1382 | ||
1369 | m_heartbeatThread | 1383 | m_heartbeatThread |
1370 | = Watchdog.StartThread( | 1384 | = Watchdog.StartThread( |
@@ -1401,15 +1415,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1401 | /// </summary> | 1415 | /// </summary> |
1402 | private void Heartbeat() | 1416 | private void Heartbeat() |
1403 | { | 1417 | { |
1404 | // if (!Monitor.TryEnter(m_heartbeatLock)) | ||
1405 | // { | ||
1406 | // Watchdog.RemoveThread(); | ||
1407 | // return; | ||
1408 | // } | ||
1409 | |||
1410 | // try | ||
1411 | // { | ||
1412 | |||
1413 | m_eventManager.TriggerOnRegionStarted(this); | 1418 | m_eventManager.TriggerOnRegionStarted(this); |
1414 | 1419 | ||
1415 | // The first frame can take a very long time due to physics actors being added on startup. Therefore, | 1420 | // The first frame can take a very long time due to physics actors being added on startup. Therefore, |
@@ -1418,21 +1423,47 @@ namespace OpenSim.Region.Framework.Scenes | |||
1418 | Update(1); | 1423 | Update(1); |
1419 | 1424 | ||
1420 | Watchdog.StartThread( | 1425 | Watchdog.StartThread( |
1421 | Maintenance, string.Format("Maintenance ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, true); | 1426 | Maintenance, string.Format("Maintenance ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, true); |
1422 | 1427 | ||
1423 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; | 1428 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; |
1424 | Update(-1); | 1429 | m_lastFrameTick = Util.EnvironmentTickCount(); |
1425 | 1430 | ||
1426 | // m_lastUpdate = Util.EnvironmentTickCount(); | 1431 | if (UpdateOnTimer) |
1427 | // m_firstHeartbeat = false; | 1432 | { |
1428 | // } | 1433 | m_sceneUpdateTimer = new Timer(MinFrameTime * 1000); |
1429 | // finally | 1434 | m_sceneUpdateTimer.AutoReset = true; |
1430 | // { | 1435 | m_sceneUpdateTimer.Elapsed += Update; |
1431 | // Monitor.Pulse(m_heartbeatLock); | 1436 | m_sceneUpdateTimer.Start(); |
1432 | // Monitor.Exit(m_heartbeatLock); | 1437 | } |
1433 | // } | 1438 | else |
1439 | { | ||
1440 | Update(-1); | ||
1441 | Watchdog.RemoveThread(); | ||
1442 | m_isRunning = false; | ||
1443 | } | ||
1444 | } | ||
1434 | 1445 | ||
1435 | Watchdog.RemoveThread(); | 1446 | private volatile bool m_isTimerUpdateRunning; |
1447 | |||
1448 | private void Update(object sender, ElapsedEventArgs e) | ||
1449 | { | ||
1450 | if (m_isTimerUpdateRunning) | ||
1451 | return; | ||
1452 | |||
1453 | m_isTimerUpdateRunning = true; | ||
1454 | |||
1455 | // If the last frame did not complete on time, then immediately start the next update on the same thread | ||
1456 | // and ignore further timed updates until we have a frame that had spare time. | ||
1457 | while (!Update(1) && Active) {} | ||
1458 | |||
1459 | if (!Active || m_shuttingDown) | ||
1460 | { | ||
1461 | m_sceneUpdateTimer.Stop(); | ||
1462 | m_sceneUpdateTimer = null; | ||
1463 | m_isRunning = false; | ||
1464 | } | ||
1465 | |||
1466 | m_isTimerUpdateRunning = false; | ||
1436 | } | 1467 | } |
1437 | 1468 | ||
1438 | private void Maintenance() | 1469 | private void Maintenance() |
@@ -1502,7 +1533,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1502 | } | 1533 | } |
1503 | } | 1534 | } |
1504 | 1535 | ||
1505 | public override void Update(int frames) | 1536 | public override bool Update(int frames) |
1506 | { | 1537 | { |
1507 | long? endFrame = null; | 1538 | long? endFrame = null; |
1508 | 1539 | ||
@@ -1511,7 +1542,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1511 | 1542 | ||
1512 | float physicsFPS = 0f; | 1543 | float physicsFPS = 0f; |
1513 | int previousFrameTick, tmpMS; | 1544 | int previousFrameTick, tmpMS; |
1514 | int maintc = Util.EnvironmentTickCount(); | ||
1515 | 1545 | ||
1516 | while (!m_shuttingDown && ((endFrame == null && Active) || Frame < endFrame)) | 1546 | while (!m_shuttingDown && ((endFrame == null && Active) || Frame < endFrame)) |
1517 | { | 1547 | { |
@@ -1651,24 +1681,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
1651 | } | 1681 | } |
1652 | 1682 | ||
1653 | EventManager.TriggerRegionHeartbeatEnd(this); | 1683 | EventManager.TriggerRegionHeartbeatEnd(this); |
1684 | otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; | ||
1654 | 1685 | ||
1655 | Watchdog.UpdateThread(); | 1686 | if (!UpdateOnTimer) |
1687 | { | ||
1688 | Watchdog.UpdateThread(); | ||
1656 | 1689 | ||
1657 | previousFrameTick = m_lastFrameTick; | 1690 | tmpMS = Util.EnvironmentTickCountSubtract(Util.EnvironmentTickCount(), m_lastFrameTick); |
1658 | m_lastFrameTick = Util.EnvironmentTickCount(); | 1691 | tmpMS = (int)(MinFrameTime * 1000) - tmpMS; |
1659 | tmpMS = Util.EnvironmentTickCountSubtract(m_lastFrameTick, maintc); | ||
1660 | tmpMS = (int)(MinFrameTime * 1000) - tmpMS; | ||
1661 | 1692 | ||
1662 | if (tmpMS > 0) | 1693 | if (tmpMS > 0) |
1694 | { | ||
1695 | spareMS = tmpMS; | ||
1696 | Thread.Sleep(tmpMS); | ||
1697 | } | ||
1698 | } | ||
1699 | else | ||
1663 | { | 1700 | { |
1664 | Thread.Sleep(tmpMS); | 1701 | spareMS = Math.Max(0, (int)(MinFrameTime * 1000) - physicsMS2 - agentMS - physicsMS -otherMS); |
1665 | spareMS += tmpMS; | ||
1666 | } | 1702 | } |
1667 | 1703 | ||
1668 | frameMS = Util.EnvironmentTickCountSubtract(maintc); | 1704 | previousFrameTick = m_lastFrameTick; |
1669 | maintc = Util.EnvironmentTickCount(); | 1705 | frameMS = Util.EnvironmentTickCountSubtract(m_lastFrameTick); |
1670 | 1706 | m_lastFrameTick = Util.EnvironmentTickCount(); | |
1671 | otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; | ||
1672 | 1707 | ||
1673 | // if (Frame%m_update_avatars == 0) | 1708 | // if (Frame%m_update_avatars == 0) |
1674 | // UpdateInWorldTime(); | 1709 | // UpdateInWorldTime(); |
@@ -1683,7 +1718,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1683 | StatsReporter.AddSpareMS(spareMS); | 1718 | StatsReporter.AddSpareMS(spareMS); |
1684 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); | 1719 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); |
1685 | 1720 | ||
1686 | // Optionally warn if a frame takes double the amount of time that it should. | 1721 | // Optionally warn if a frame takes double the amount of time that it should. |
1687 | if (DebugUpdates | 1722 | if (DebugUpdates |
1688 | && Util.EnvironmentTickCountSubtract( | 1723 | && Util.EnvironmentTickCountSubtract( |
1689 | m_lastFrameTick, previousFrameTick) > (int)(MinFrameTime * 1000 * 2)) | 1724 | m_lastFrameTick, previousFrameTick) > (int)(MinFrameTime * 1000 * 2)) |
@@ -1693,6 +1728,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1693 | MinFrameTime * 1000, | 1728 | MinFrameTime * 1000, |
1694 | RegionInfo.RegionName); | 1729 | RegionInfo.RegionName); |
1695 | } | 1730 | } |
1731 | |||
1732 | return spareMS >= 0; | ||
1696 | } | 1733 | } |
1697 | 1734 | ||
1698 | public void AddGroupTarget(SceneObjectGroup grp) | 1735 | public void AddGroupTarget(SceneObjectGroup grp) |
@@ -2073,8 +2110,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2073 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); | 2110 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); |
2074 | 2111 | ||
2075 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); | 2112 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
2076 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 2113 | Vector3 AXOrigin = RayStart; |
2077 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 2114 | Vector3 AXdirection = direction; |
2078 | 2115 | ||
2079 | if (target != null) | 2116 | if (target != null) |
2080 | { | 2117 | { |
@@ -2090,19 +2127,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2090 | EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter); | 2127 | EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter); |
2091 | 2128 | ||
2092 | // Un-comment out the following line to Get Raytrace results printed to the console. | 2129 | // Un-comment out the following line to Get Raytrace results printed to the console. |
2093 | // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); | 2130 | // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); |
2094 | float ScaleOffset = 0.5f; | 2131 | float ScaleOffset = 0.5f; |
2095 | 2132 | ||
2096 | // If we hit something | 2133 | // If we hit something |
2097 | if (ei.HitTF) | 2134 | if (ei.HitTF) |
2098 | { | 2135 | { |
2099 | Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z); | 2136 | Vector3 scaleComponent = ei.AAfaceNormal; |
2100 | if (scaleComponent.X != 0) ScaleOffset = scale.X; | 2137 | if (scaleComponent.X != 0) ScaleOffset = scale.X; |
2101 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; | 2138 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; |
2102 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; | 2139 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; |
2103 | ScaleOffset = Math.Abs(ScaleOffset); | 2140 | ScaleOffset = Math.Abs(ScaleOffset); |
2104 | Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); | 2141 | Vector3 intersectionpoint = ei.ipoint; |
2105 | Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z); | 2142 | Vector3 normal = ei.normal; |
2106 | // Set the position to the intersection point | 2143 | // Set the position to the intersection point |
2107 | Vector3 offset = (normal * (ScaleOffset / 2f)); | 2144 | Vector3 offset = (normal * (ScaleOffset / 2f)); |
2108 | pos = (intersectionpoint + offset); | 2145 | pos = (intersectionpoint + offset); |
@@ -2127,8 +2164,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2127 | 2164 | ||
2128 | if (ei.HitTF) | 2165 | if (ei.HitTF) |
2129 | { | 2166 | { |
2130 | pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); | 2167 | pos = ei.ipoint; |
2131 | } else | 2168 | } |
2169 | else | ||
2132 | { | 2170 | { |
2133 | // fall back to our stupid functionality | 2171 | // fall back to our stupid functionality |
2134 | pos = RayEnd; | 2172 | pos = RayEnd; |
@@ -3181,8 +3219,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3181 | if (target != null && target2 != null) | 3219 | if (target != null && target2 != null) |
3182 | { | 3220 | { |
3183 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); | 3221 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
3184 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 3222 | Vector3 AXOrigin = RayStart; |
3185 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 3223 | Vector3 AXdirection = direction; |
3186 | 3224 | ||
3187 | pos = target2.AbsolutePosition; | 3225 | pos = target2.AbsolutePosition; |
3188 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); | 3226 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); |
@@ -3203,13 +3241,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3203 | if (ei.HitTF) | 3241 | if (ei.HitTF) |
3204 | { | 3242 | { |
3205 | Vector3 scale = target.Scale; | 3243 | Vector3 scale = target.Scale; |
3206 | Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z); | 3244 | Vector3 scaleComponent = ei.AAfaceNormal; |
3207 | if (scaleComponent.X != 0) ScaleOffset = scale.X; | 3245 | if (scaleComponent.X != 0) ScaleOffset = scale.X; |
3208 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; | 3246 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; |
3209 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; | 3247 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; |
3210 | ScaleOffset = Math.Abs(ScaleOffset); | 3248 | ScaleOffset = Math.Abs(ScaleOffset); |
3211 | Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); | 3249 | Vector3 intersectionpoint = ei.ipoint; |
3212 | Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z); | 3250 | Vector3 normal = ei.normal; |
3213 | Vector3 offset = normal * (ScaleOffset / 2f); | 3251 | Vector3 offset = normal * (ScaleOffset / 2f); |
3214 | pos = intersectionpoint + offset; | 3252 | pos = intersectionpoint + offset; |
3215 | 3253 | ||
@@ -3229,6 +3267,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3229 | { | 3267 | { |
3230 | copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity); | 3268 | copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity); |
3231 | } | 3269 | } |
3270 | |||
3232 | if (copy != null) | 3271 | if (copy != null) |
3233 | EventManager.TriggerObjectAddedToScene(copy); | 3272 | EventManager.TriggerObjectAddedToScene(copy); |
3234 | } | 3273 | } |
@@ -5061,7 +5100,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5061 | case PhysicsJointType.Ball: | 5100 | case PhysicsJointType.Ball: |
5062 | { | 5101 | { |
5063 | Vector3 jointAnchor = PhysicsScene.GetJointAnchor(joint); | 5102 | Vector3 jointAnchor = PhysicsScene.GetJointAnchor(joint); |
5064 | Vector3 proxyPos = new Vector3(jointAnchor.X, jointAnchor.Y, jointAnchor.Z); | 5103 | Vector3 proxyPos = jointAnchor; |
5065 | jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update | 5104 | jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update |
5066 | } | 5105 | } |
5067 | break; | 5106 | break; |
@@ -5086,7 +5125,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5086 | jointErrorMessage(joint, "joint.TrackedBodyName is null, joint " + joint.ObjectNameInScene); | 5125 | jointErrorMessage(joint, "joint.TrackedBodyName is null, joint " + joint.ObjectNameInScene); |
5087 | } | 5126 | } |
5088 | 5127 | ||
5089 | Vector3 proxyPos = new Vector3(jointAnchor.X, jointAnchor.Y, jointAnchor.Z); | 5128 | Vector3 proxyPos = jointAnchor; |
5090 | Quaternion q = trackedBody.RotationOffset * joint.LocalRotation; | 5129 | Quaternion q = trackedBody.RotationOffset * joint.LocalRotation; |
5091 | 5130 | ||
5092 | jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update | 5131 | jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update |
@@ -5187,8 +5226,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
5187 | y = Heightmap.Height - 1; | 5226 | y = Heightmap.Height - 1; |
5188 | 5227 | ||
5189 | Vector3 p0 = new Vector3(x, y, (float)Heightmap[(int)x, (int)y]); | 5228 | Vector3 p0 = new Vector3(x, y, (float)Heightmap[(int)x, (int)y]); |
5190 | Vector3 p1 = new Vector3(p0); | 5229 | Vector3 p1 = p0; |
5191 | Vector3 p2 = new Vector3(p0); | 5230 | Vector3 p2 = p0; |
5192 | 5231 | ||
5193 | p1.X += 1.0f; | 5232 | p1.X += 1.0f; |
5194 | if (p1.X < Heightmap.Width) | 5233 | if (p1.X < Heightmap.Width) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 0445268..aaddce6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -196,7 +196,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | /// Number of frames to update. Exits on shutdown even if there are frames remaining. | 196 | /// Number of frames to update. Exits on shutdown even if there are frames remaining. |
197 | /// If -1 then updates until shutdown. | 197 | /// If -1 then updates until shutdown. |
198 | /// </param> | 198 | /// </param> |
199 | public abstract void Update(int frames); | 199 | /// <returns>true if update completed within minimum frame time, false otherwise.</returns> |
200 | public abstract bool Update(int frames); | ||
200 | 201 | ||
201 | #endregion | 202 | #endregion |
202 | 203 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3678c7e..51f50d9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1446,8 +1446,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1446 | { | 1446 | { |
1447 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | 1447 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) |
1448 | { | 1448 | { |
1449 | group.GrabMovement(offset, pos, remoteClient); | 1449 | group.GrabMovement(objectID, offset, pos, remoteClient); |
1450 | } | 1450 | } |
1451 | |||
1451 | // This is outside the above permissions condition | 1452 | // This is outside the above permissions condition |
1452 | // so that if the object is locked the client moving the object | 1453 | // so that if the object is locked the client moving the object |
1453 | // get's it's position on the simulator even if it was the same as before | 1454 | // get's it's position on the simulator even if it was the same as before |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 69491b7..2aeccd8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -828,6 +828,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
828 | public UUID FromFolderID { get; set; } | 828 | public UUID FromFolderID { get; set; } |
829 | 829 | ||
830 | /// <summary> | 830 | /// <summary> |
831 | /// If true then grabs are blocked no matter what the individual part BlockGrab setting. | ||
832 | /// </summary> | ||
833 | /// <value><c>true</c> if block grab override; otherwise, <c>false</c>.</value> | ||
834 | public bool BlockGrabOverride { get; set; } | ||
835 | |||
836 | /// <summary> | ||
831 | /// IDs of all avatars sat on this scene object. | 837 | /// IDs of all avatars sat on this scene object. |
832 | /// </summary> | 838 | /// </summary> |
833 | /// <remarks> | 839 | /// <remarks> |
@@ -902,6 +908,34 @@ namespace OpenSim.Region.Framework.Scenes | |||
902 | } | 908 | } |
903 | } | 909 | } |
904 | 910 | ||
911 | public void LoadScriptState(XmlReader reader) | ||
912 | { | ||
913 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Looking for script state for {0} in {1}", Name); | ||
914 | |||
915 | while (reader.ReadToFollowing("SavedScriptState")) | ||
916 | { | ||
917 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Loading script state for {0}", Name); | ||
918 | |||
919 | if (m_savedScriptState == null) | ||
920 | m_savedScriptState = new Dictionary<UUID, string>(); | ||
921 | |||
922 | string uuid = reader.GetAttribute("UUID"); | ||
923 | |||
924 | if (uuid != null) | ||
925 | { | ||
926 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Found state for item ID {0} in object {1}", uuid, Name); | ||
927 | |||
928 | UUID itemid = new UUID(uuid); | ||
929 | if (itemid != UUID.Zero) | ||
930 | m_savedScriptState[itemid] = reader.ReadInnerXml(); | ||
931 | } | ||
932 | else | ||
933 | { | ||
934 | m_log.WarnFormat("[SCENE OBJECT GROUP]: SavedScriptState element had no UUID in object {0}", Name); | ||
935 | } | ||
936 | } | ||
937 | } | ||
938 | |||
905 | /// <summary> | 939 | /// <summary> |
906 | /// Hooks this object up to the backup event so that it is persisted to the database when the update thread executes. | 940 | /// Hooks this object up to the backup event so that it is persisted to the database when the update thread executes. |
907 | /// </summary> | 941 | /// </summary> |
@@ -2582,20 +2616,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2582 | /// If object is physical, apply force to move it around | 2616 | /// If object is physical, apply force to move it around |
2583 | /// If object is not physical, just put it at the resulting location | 2617 | /// If object is not physical, just put it at the resulting location |
2584 | /// </summary> | 2618 | /// </summary> |
2619 | /// <param name="partID">Part ID to check for grab</param> | ||
2585 | /// <param name="offset">Always seems to be 0,0,0, so ignoring</param> | 2620 | /// <param name="offset">Always seems to be 0,0,0, so ignoring</param> |
2586 | /// <param name="pos">New position. We do the math here to turn it into a force</param> | 2621 | /// <param name="pos">New position. We do the math here to turn it into a force</param> |
2587 | /// <param name="remoteClient"></param> | 2622 | /// <param name="remoteClient"></param> |
2588 | public void GrabMovement(Vector3 offset, Vector3 pos, IClientAPI remoteClient) | 2623 | public void GrabMovement(UUID partID, Vector3 offset, Vector3 pos, IClientAPI remoteClient) |
2589 | { | 2624 | { |
2590 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) | 2625 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) |
2591 | { | 2626 | { |
2627 | SceneObjectPart part = GetPart(partID); | ||
2628 | |||
2629 | if (part == null) | ||
2630 | return; | ||
2631 | |||
2592 | PhysicsActor pa = m_rootPart.PhysActor; | 2632 | PhysicsActor pa = m_rootPart.PhysActor; |
2593 | 2633 | ||
2594 | if (pa != null) | 2634 | if (pa != null) |
2595 | { | 2635 | { |
2596 | if (pa.IsPhysical) | 2636 | if (pa.IsPhysical) |
2597 | { | 2637 | { |
2598 | if (!m_rootPart.BlockGrab) | 2638 | if (!BlockGrabOverride && !part.BlockGrab) |
2599 | { | 2639 | { |
2600 | Vector3 llmoveforce = pos - AbsolutePosition; | 2640 | Vector3 llmoveforce = pos - AbsolutePosition; |
2601 | Vector3 grabforce = llmoveforce; | 2641 | Vector3 grabforce = llmoveforce; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 31fc26e..8785ca9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -186,7 +186,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
186 | 186 | ||
187 | public bool RETURN_AT_EDGE; | 187 | public bool RETURN_AT_EDGE; |
188 | 188 | ||
189 | public bool BlockGrab; | 189 | public bool BlockGrab { get; set; } |
190 | 190 | ||
191 | public bool StatusSandbox; | 191 | public bool StatusSandbox; |
192 | 192 | ||
@@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2044 | /// </summary> | 2044 | /// </summary> |
2045 | /// <param name="xmlReader"></param> | 2045 | /// <param name="xmlReader"></param> |
2046 | /// <returns></returns> | 2046 | /// <returns></returns> |
2047 | public static SceneObjectPart FromXml(XmlTextReader xmlReader) | 2047 | public static SceneObjectPart FromXml(XmlReader xmlReader) |
2048 | { | 2048 | { |
2049 | SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader); | 2049 | SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader); |
2050 | 2050 | ||
@@ -2079,22 +2079,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2079 | ParentGroup.RootPart.RETURN_AT_EDGE = p; | 2079 | ParentGroup.RootPart.RETURN_AT_EDGE = p; |
2080 | } | 2080 | } |
2081 | 2081 | ||
2082 | public bool GetBlockGrab() | ||
2083 | { | ||
2084 | if (ParentGroup.IsDeleted) | ||
2085 | return false; | ||
2086 | |||
2087 | return ParentGroup.RootPart.BlockGrab; | ||
2088 | } | ||
2089 | |||
2090 | public void SetBlockGrab(bool p) | ||
2091 | { | ||
2092 | if (ParentGroup.IsDeleted) | ||
2093 | return; | ||
2094 | |||
2095 | ParentGroup.RootPart.BlockGrab = p; | ||
2096 | } | ||
2097 | |||
2098 | public void SetStatusSandbox(bool p) | 2082 | public void SetStatusSandbox(bool p) |
2099 | { | 2083 | { |
2100 | if (ParentGroup.IsDeleted) | 2084 | if (ParentGroup.IsDeleted) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ebbc6f3..e0b7640 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -622,9 +622,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
622 | // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", | 622 | // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", |
623 | // m_velocity, Name, Scene.RegionInfo.RegionName); | 623 | // m_velocity, Name, Scene.RegionInfo.RegionName); |
624 | } | 624 | } |
625 | else if (ParentPart != null) | ||
626 | { | ||
627 | return ParentPart.ParentGroup.Velocity; | ||
628 | } | ||
625 | 629 | ||
626 | return m_velocity; | 630 | return m_velocity; |
627 | } | 631 | } |
632 | |||
628 | set | 633 | set |
629 | { | 634 | { |
630 | if (PhysicsActor != null) | 635 | if (PhysicsActor != null) |
@@ -2631,7 +2636,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2631 | 2636 | ||
2632 | // Vector3 standPositionAdjustment | 2637 | // Vector3 standPositionAdjustment |
2633 | // = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f); | 2638 | // = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f); |
2634 | Vector3 adjustmentForSitPosition = part.SitTargetPosition * part.GetWorldRotation(); | 2639 | Vector3 adjustmentForSitPosition = (part.SitTargetPosition + OffsetPosition) * part.GetWorldRotation(); |
2635 | 2640 | ||
2636 | // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than | 2641 | // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than |
2637 | // hardcoding here. | 2642 | // hardcoding here. |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index e68f954..3899b99 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -59,57 +59,59 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
59 | /// <returns>The scene object deserialized. Null on failure.</returns> | 59 | /// <returns>The scene object deserialized. Null on failure.</returns> |
60 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 60 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
61 | { | 61 | { |
62 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | ||
63 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | ||
64 | return FromOriginalXmlFormat(reader); | ||
65 | } | ||
66 | |||
67 | /// <summary> | ||
68 | /// Deserialize a scene object from the original xml format | ||
69 | /// </summary> | ||
70 | /// <param name="xmlData"></param> | ||
71 | /// <returns>The scene object deserialized. Null on failure.</returns> | ||
72 | public static SceneObjectGroup FromOriginalXmlFormat(XmlReader reader) | ||
73 | { | ||
62 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 74 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |
63 | //int time = System.Environment.TickCount; | 75 | //int time = System.Environment.TickCount; |
64 | 76 | ||
77 | SceneObjectGroup sceneObject = null; | ||
78 | |||
65 | try | 79 | try |
66 | { | 80 | { |
67 | StringReader sr; | ||
68 | XmlTextReader reader; | ||
69 | XmlNodeList parts; | ||
70 | XmlDocument doc; | ||
71 | int linkNum; | 81 | int linkNum; |
72 | 82 | ||
73 | doc = new XmlDocument(); | 83 | reader.ReadToFollowing("RootPart"); |
74 | doc.LoadXml(xmlData); | 84 | reader.ReadToFollowing("SceneObjectPart"); |
75 | parts = doc.GetElementsByTagName("RootPart"); | 85 | sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); |
86 | reader.ReadToFollowing("OtherParts"); | ||
76 | 87 | ||
77 | if (parts.Count == 0) | 88 | if (reader.ReadToDescendant("Part")) |
78 | throw new Exception("Invalid Xml format - no root part"); | ||
79 | |||
80 | sr = new StringReader(parts[0].InnerXml); | ||
81 | reader = new XmlTextReader(sr); | ||
82 | SceneObjectGroup sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); | ||
83 | reader.Close(); | ||
84 | sr.Close(); | ||
85 | |||
86 | parts = doc.GetElementsByTagName("Part"); | ||
87 | |||
88 | for (int i = 0; i < parts.Count; i++) | ||
89 | { | 89 | { |
90 | sr = new StringReader(parts[i].InnerXml); | 90 | do |
91 | reader = new XmlTextReader(sr); | 91 | { |
92 | SceneObjectPart part = SceneObjectPart.FromXml(reader); | 92 | if (reader.ReadToDescendant("SceneObjectPart")) |
93 | linkNum = part.LinkNum; | 93 | { |
94 | sceneObject.AddPart(part); | 94 | SceneObjectPart part = SceneObjectPart.FromXml(reader); |
95 | part.LinkNum = linkNum; | 95 | linkNum = part.LinkNum; |
96 | part.TrimPermissions(); | 96 | sceneObject.AddPart(part); |
97 | reader.Close(); | 97 | part.LinkNum = linkNum; |
98 | sr.Close(); | 98 | part.TrimPermissions(); |
99 | } | ||
100 | } | ||
101 | while (reader.ReadToNextSibling("Part")); | ||
99 | } | 102 | } |
100 | 103 | ||
101 | // Script state may, or may not, exist. Not having any, is NOT | 104 | // Script state may, or may not, exist. Not having any, is NOT |
102 | // ever a problem. | 105 | // ever a problem. |
103 | sceneObject.LoadScriptState(doc); | 106 | sceneObject.LoadScriptState(reader); |
104 | |||
105 | return sceneObject; | ||
106 | } | 107 | } |
107 | catch (Exception e) | 108 | catch (Exception e) |
108 | { | 109 | { |
109 | m_log.ErrorFormat( | 110 | m_log.ErrorFormat("[SERIALIZER]: Deserialization of xml failed. Exception {0}", e); |
110 | "[SERIALIZER]: Deserialization of xml failed with {0}. xml was {1}", e, xmlData); | ||
111 | return null; | 111 | return null; |
112 | } | 112 | } |
113 | |||
114 | return sceneObject; | ||
113 | } | 115 | } |
114 | 116 | ||
115 | /// <summary> | 117 | /// <summary> |
@@ -369,14 +371,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
369 | 371 | ||
370 | #region manual serialization | 372 | #region manual serialization |
371 | 373 | ||
372 | private static Dictionary<string, Action<SceneObjectPart, XmlTextReader>> m_SOPXmlProcessors | 374 | private static Dictionary<string, Action<SceneObjectPart, XmlReader>> m_SOPXmlProcessors |
373 | = new Dictionary<string, Action<SceneObjectPart, XmlTextReader>>(); | 375 | = new Dictionary<string, Action<SceneObjectPart, XmlReader>>(); |
374 | 376 | ||
375 | private static Dictionary<string, Action<TaskInventoryItem, XmlTextReader>> m_TaskInventoryXmlProcessors | 377 | private static Dictionary<string, Action<TaskInventoryItem, XmlReader>> m_TaskInventoryXmlProcessors |
376 | = new Dictionary<string, Action<TaskInventoryItem, XmlTextReader>>(); | 378 | = new Dictionary<string, Action<TaskInventoryItem, XmlReader>>(); |
377 | 379 | ||
378 | private static Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>> m_ShapeXmlProcessors | 380 | private static Dictionary<string, Action<PrimitiveBaseShape, XmlReader>> m_ShapeXmlProcessors |
379 | = new Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>>(); | 381 | = new Dictionary<string, Action<PrimitiveBaseShape, XmlReader>>(); |
380 | 382 | ||
381 | static SceneObjectSerializer() | 383 | static SceneObjectSerializer() |
382 | { | 384 | { |
@@ -532,112 +534,112 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
532 | } | 534 | } |
533 | 535 | ||
534 | #region SOPXmlProcessors | 536 | #region SOPXmlProcessors |
535 | private static void ProcessAllowedDrop(SceneObjectPart obj, XmlTextReader reader) | 537 | private static void ProcessAllowedDrop(SceneObjectPart obj, XmlReader reader) |
536 | { | 538 | { |
537 | obj.AllowedDrop = Util.ReadBoolean(reader); | 539 | obj.AllowedDrop = Util.ReadBoolean(reader); |
538 | } | 540 | } |
539 | 541 | ||
540 | private static void ProcessCreatorID(SceneObjectPart obj, XmlTextReader reader) | 542 | private static void ProcessCreatorID(SceneObjectPart obj, XmlReader reader) |
541 | { | 543 | { |
542 | obj.CreatorID = Util.ReadUUID(reader, "CreatorID"); | 544 | obj.CreatorID = Util.ReadUUID(reader, "CreatorID"); |
543 | } | 545 | } |
544 | 546 | ||
545 | private static void ProcessCreatorData(SceneObjectPart obj, XmlTextReader reader) | 547 | private static void ProcessCreatorData(SceneObjectPart obj, XmlReader reader) |
546 | { | 548 | { |
547 | obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | 549 | obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); |
548 | } | 550 | } |
549 | 551 | ||
550 | private static void ProcessFolderID(SceneObjectPart obj, XmlTextReader reader) | 552 | private static void ProcessFolderID(SceneObjectPart obj, XmlReader reader) |
551 | { | 553 | { |
552 | obj.FolderID = Util.ReadUUID(reader, "FolderID"); | 554 | obj.FolderID = Util.ReadUUID(reader, "FolderID"); |
553 | } | 555 | } |
554 | 556 | ||
555 | private static void ProcessInventorySerial(SceneObjectPart obj, XmlTextReader reader) | 557 | private static void ProcessInventorySerial(SceneObjectPart obj, XmlReader reader) |
556 | { | 558 | { |
557 | obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty); | 559 | obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty); |
558 | } | 560 | } |
559 | 561 | ||
560 | private static void ProcessTaskInventory(SceneObjectPart obj, XmlTextReader reader) | 562 | private static void ProcessTaskInventory(SceneObjectPart obj, XmlReader reader) |
561 | { | 563 | { |
562 | obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory"); | 564 | obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory"); |
563 | } | 565 | } |
564 | 566 | ||
565 | private static void ProcessUUID(SceneObjectPart obj, XmlTextReader reader) | 567 | private static void ProcessUUID(SceneObjectPart obj, XmlReader reader) |
566 | { | 568 | { |
567 | obj.UUID = Util.ReadUUID(reader, "UUID"); | 569 | obj.UUID = Util.ReadUUID(reader, "UUID"); |
568 | } | 570 | } |
569 | 571 | ||
570 | private static void ProcessLocalId(SceneObjectPart obj, XmlTextReader reader) | 572 | private static void ProcessLocalId(SceneObjectPart obj, XmlReader reader) |
571 | { | 573 | { |
572 | obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty); | 574 | obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty); |
573 | } | 575 | } |
574 | 576 | ||
575 | private static void ProcessName(SceneObjectPart obj, XmlTextReader reader) | 577 | private static void ProcessName(SceneObjectPart obj, XmlReader reader) |
576 | { | 578 | { |
577 | obj.Name = reader.ReadElementString("Name"); | 579 | obj.Name = reader.ReadElementString("Name"); |
578 | } | 580 | } |
579 | 581 | ||
580 | private static void ProcessMaterial(SceneObjectPart obj, XmlTextReader reader) | 582 | private static void ProcessMaterial(SceneObjectPart obj, XmlReader reader) |
581 | { | 583 | { |
582 | obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty); | 584 | obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty); |
583 | } | 585 | } |
584 | 586 | ||
585 | private static void ProcessPassTouches(SceneObjectPart obj, XmlTextReader reader) | 587 | private static void ProcessPassTouches(SceneObjectPart obj, XmlReader reader) |
586 | { | 588 | { |
587 | obj.PassTouches = Util.ReadBoolean(reader); | 589 | obj.PassTouches = Util.ReadBoolean(reader); |
588 | } | 590 | } |
589 | 591 | ||
590 | private static void ProcessPassCollisions(SceneObjectPart obj, XmlTextReader reader) | 592 | private static void ProcessPassCollisions(SceneObjectPart obj, XmlReader reader) |
591 | { | 593 | { |
592 | obj.PassCollisions = Util.ReadBoolean(reader); | 594 | obj.PassCollisions = Util.ReadBoolean(reader); |
593 | } | 595 | } |
594 | 596 | ||
595 | private static void ProcessRegionHandle(SceneObjectPart obj, XmlTextReader reader) | 597 | private static void ProcessRegionHandle(SceneObjectPart obj, XmlReader reader) |
596 | { | 598 | { |
597 | obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty); | 599 | obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty); |
598 | } | 600 | } |
599 | 601 | ||
600 | private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlTextReader reader) | 602 | private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlReader reader) |
601 | { | 603 | { |
602 | obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty); | 604 | obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty); |
603 | } | 605 | } |
604 | 606 | ||
605 | private static void ProcessGroupPosition(SceneObjectPart obj, XmlTextReader reader) | 607 | private static void ProcessGroupPosition(SceneObjectPart obj, XmlReader reader) |
606 | { | 608 | { |
607 | obj.GroupPosition = Util.ReadVector(reader, "GroupPosition"); | 609 | obj.GroupPosition = Util.ReadVector(reader, "GroupPosition"); |
608 | } | 610 | } |
609 | 611 | ||
610 | private static void ProcessOffsetPosition(SceneObjectPart obj, XmlTextReader reader) | 612 | private static void ProcessOffsetPosition(SceneObjectPart obj, XmlReader reader) |
611 | { | 613 | { |
612 | obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ; | 614 | obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ; |
613 | } | 615 | } |
614 | 616 | ||
615 | private static void ProcessRotationOffset(SceneObjectPart obj, XmlTextReader reader) | 617 | private static void ProcessRotationOffset(SceneObjectPart obj, XmlReader reader) |
616 | { | 618 | { |
617 | obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset"); | 619 | obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset"); |
618 | } | 620 | } |
619 | 621 | ||
620 | private static void ProcessVelocity(SceneObjectPart obj, XmlTextReader reader) | 622 | private static void ProcessVelocity(SceneObjectPart obj, XmlReader reader) |
621 | { | 623 | { |
622 | obj.Velocity = Util.ReadVector(reader, "Velocity"); | 624 | obj.Velocity = Util.ReadVector(reader, "Velocity"); |
623 | } | 625 | } |
624 | 626 | ||
625 | private static void ProcessAngularVelocity(SceneObjectPart obj, XmlTextReader reader) | 627 | private static void ProcessAngularVelocity(SceneObjectPart obj, XmlReader reader) |
626 | { | 628 | { |
627 | obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity"); | 629 | obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity"); |
628 | } | 630 | } |
629 | 631 | ||
630 | private static void ProcessAcceleration(SceneObjectPart obj, XmlTextReader reader) | 632 | private static void ProcessAcceleration(SceneObjectPart obj, XmlReader reader) |
631 | { | 633 | { |
632 | obj.Acceleration = Util.ReadVector(reader, "Acceleration"); | 634 | obj.Acceleration = Util.ReadVector(reader, "Acceleration"); |
633 | } | 635 | } |
634 | 636 | ||
635 | private static void ProcessDescription(SceneObjectPart obj, XmlTextReader reader) | 637 | private static void ProcessDescription(SceneObjectPart obj, XmlReader reader) |
636 | { | 638 | { |
637 | obj.Description = reader.ReadElementString("Description"); | 639 | obj.Description = reader.ReadElementString("Description"); |
638 | } | 640 | } |
639 | 641 | ||
640 | private static void ProcessColor(SceneObjectPart obj, XmlTextReader reader) | 642 | private static void ProcessColor(SceneObjectPart obj, XmlReader reader) |
641 | { | 643 | { |
642 | reader.ReadStartElement("Color"); | 644 | reader.ReadStartElement("Color"); |
643 | if (reader.Name == "R") | 645 | if (reader.Name == "R") |
@@ -651,57 +653,57 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
651 | } | 653 | } |
652 | } | 654 | } |
653 | 655 | ||
654 | private static void ProcessText(SceneObjectPart obj, XmlTextReader reader) | 656 | private static void ProcessText(SceneObjectPart obj, XmlReader reader) |
655 | { | 657 | { |
656 | obj.Text = reader.ReadElementString("Text", String.Empty); | 658 | obj.Text = reader.ReadElementString("Text", String.Empty); |
657 | } | 659 | } |
658 | 660 | ||
659 | private static void ProcessSitName(SceneObjectPart obj, XmlTextReader reader) | 661 | private static void ProcessSitName(SceneObjectPart obj, XmlReader reader) |
660 | { | 662 | { |
661 | obj.SitName = reader.ReadElementString("SitName", String.Empty); | 663 | obj.SitName = reader.ReadElementString("SitName", String.Empty); |
662 | } | 664 | } |
663 | 665 | ||
664 | private static void ProcessTouchName(SceneObjectPart obj, XmlTextReader reader) | 666 | private static void ProcessTouchName(SceneObjectPart obj, XmlReader reader) |
665 | { | 667 | { |
666 | obj.TouchName = reader.ReadElementString("TouchName", String.Empty); | 668 | obj.TouchName = reader.ReadElementString("TouchName", String.Empty); |
667 | } | 669 | } |
668 | 670 | ||
669 | private static void ProcessLinkNum(SceneObjectPart obj, XmlTextReader reader) | 671 | private static void ProcessLinkNum(SceneObjectPart obj, XmlReader reader) |
670 | { | 672 | { |
671 | obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty); | 673 | obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty); |
672 | } | 674 | } |
673 | 675 | ||
674 | private static void ProcessClickAction(SceneObjectPart obj, XmlTextReader reader) | 676 | private static void ProcessClickAction(SceneObjectPart obj, XmlReader reader) |
675 | { | 677 | { |
676 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); | 678 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); |
677 | } | 679 | } |
678 | 680 | ||
679 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlTextReader reader) | 681 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader) |
680 | { | 682 | { |
681 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); | 683 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); |
682 | } | 684 | } |
683 | 685 | ||
684 | private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) | 686 | private static void ProcessDensity(SceneObjectPart obj, XmlReader reader) |
685 | { | 687 | { |
686 | obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); | 688 | obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); |
687 | } | 689 | } |
688 | 690 | ||
689 | private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) | 691 | private static void ProcessFriction(SceneObjectPart obj, XmlReader reader) |
690 | { | 692 | { |
691 | obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); | 693 | obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); |
692 | } | 694 | } |
693 | 695 | ||
694 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) | 696 | private static void ProcessBounce(SceneObjectPart obj, XmlReader reader) |
695 | { | 697 | { |
696 | obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); | 698 | obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); |
697 | } | 699 | } |
698 | 700 | ||
699 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) | 701 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlReader reader) |
700 | { | 702 | { |
701 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); | 703 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); |
702 | } | 704 | } |
703 | 705 | ||
704 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 706 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) |
705 | { | 707 | { |
706 | List<string> errorNodeNames; | 708 | List<string> errorNodeNames; |
707 | obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); | 709 | obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); |
@@ -714,163 +716,163 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
714 | } | 716 | } |
715 | } | 717 | } |
716 | 718 | ||
717 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) | 719 | private static void ProcessScale(SceneObjectPart obj, XmlReader reader) |
718 | { | 720 | { |
719 | obj.Scale = Util.ReadVector(reader, "Scale"); | 721 | obj.Scale = Util.ReadVector(reader, "Scale"); |
720 | } | 722 | } |
721 | 723 | ||
722 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) | 724 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlReader reader) |
723 | { | 725 | { |
724 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); | 726 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); |
725 | } | 727 | } |
726 | 728 | ||
727 | private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlTextReader reader) | 729 | private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlReader reader) |
728 | { | 730 | { |
729 | obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition"); | 731 | obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition"); |
730 | } | 732 | } |
731 | 733 | ||
732 | private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlTextReader reader) | 734 | private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlReader reader) |
733 | { | 735 | { |
734 | obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL"); | 736 | obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL"); |
735 | } | 737 | } |
736 | 738 | ||
737 | private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlTextReader reader) | 739 | private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlReader reader) |
738 | { | 740 | { |
739 | obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL"); | 741 | obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL"); |
740 | } | 742 | } |
741 | 743 | ||
742 | private static void ProcessParentID(SceneObjectPart obj, XmlTextReader reader) | 744 | private static void ProcessParentID(SceneObjectPart obj, XmlReader reader) |
743 | { | 745 | { |
744 | string str = reader.ReadElementContentAsString("ParentID", String.Empty); | 746 | string str = reader.ReadElementContentAsString("ParentID", String.Empty); |
745 | obj.ParentID = Convert.ToUInt32(str); | 747 | obj.ParentID = Convert.ToUInt32(str); |
746 | } | 748 | } |
747 | 749 | ||
748 | private static void ProcessCreationDate(SceneObjectPart obj, XmlTextReader reader) | 750 | private static void ProcessCreationDate(SceneObjectPart obj, XmlReader reader) |
749 | { | 751 | { |
750 | obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); | 752 | obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); |
751 | } | 753 | } |
752 | 754 | ||
753 | private static void ProcessCategory(SceneObjectPart obj, XmlTextReader reader) | 755 | private static void ProcessCategory(SceneObjectPart obj, XmlReader reader) |
754 | { | 756 | { |
755 | obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty); | 757 | obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty); |
756 | } | 758 | } |
757 | 759 | ||
758 | private static void ProcessSalePrice(SceneObjectPart obj, XmlTextReader reader) | 760 | private static void ProcessSalePrice(SceneObjectPart obj, XmlReader reader) |
759 | { | 761 | { |
760 | obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); | 762 | obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); |
761 | } | 763 | } |
762 | 764 | ||
763 | private static void ProcessObjectSaleType(SceneObjectPart obj, XmlTextReader reader) | 765 | private static void ProcessObjectSaleType(SceneObjectPart obj, XmlReader reader) |
764 | { | 766 | { |
765 | obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); | 767 | obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); |
766 | } | 768 | } |
767 | 769 | ||
768 | private static void ProcessOwnershipCost(SceneObjectPart obj, XmlTextReader reader) | 770 | private static void ProcessOwnershipCost(SceneObjectPart obj, XmlReader reader) |
769 | { | 771 | { |
770 | obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); | 772 | obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); |
771 | } | 773 | } |
772 | 774 | ||
773 | private static void ProcessGroupID(SceneObjectPart obj, XmlTextReader reader) | 775 | private static void ProcessGroupID(SceneObjectPart obj, XmlReader reader) |
774 | { | 776 | { |
775 | obj.GroupID = Util.ReadUUID(reader, "GroupID"); | 777 | obj.GroupID = Util.ReadUUID(reader, "GroupID"); |
776 | } | 778 | } |
777 | 779 | ||
778 | private static void ProcessOwnerID(SceneObjectPart obj, XmlTextReader reader) | 780 | private static void ProcessOwnerID(SceneObjectPart obj, XmlReader reader) |
779 | { | 781 | { |
780 | obj.OwnerID = Util.ReadUUID(reader, "OwnerID"); | 782 | obj.OwnerID = Util.ReadUUID(reader, "OwnerID"); |
781 | } | 783 | } |
782 | 784 | ||
783 | private static void ProcessLastOwnerID(SceneObjectPart obj, XmlTextReader reader) | 785 | private static void ProcessLastOwnerID(SceneObjectPart obj, XmlReader reader) |
784 | { | 786 | { |
785 | obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); | 787 | obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); |
786 | } | 788 | } |
787 | 789 | ||
788 | private static void ProcessBaseMask(SceneObjectPart obj, XmlTextReader reader) | 790 | private static void ProcessBaseMask(SceneObjectPart obj, XmlReader reader) |
789 | { | 791 | { |
790 | obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); | 792 | obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); |
791 | } | 793 | } |
792 | 794 | ||
793 | private static void ProcessOwnerMask(SceneObjectPart obj, XmlTextReader reader) | 795 | private static void ProcessOwnerMask(SceneObjectPart obj, XmlReader reader) |
794 | { | 796 | { |
795 | obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty); | 797 | obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty); |
796 | } | 798 | } |
797 | 799 | ||
798 | private static void ProcessGroupMask(SceneObjectPart obj, XmlTextReader reader) | 800 | private static void ProcessGroupMask(SceneObjectPart obj, XmlReader reader) |
799 | { | 801 | { |
800 | obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty); | 802 | obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty); |
801 | } | 803 | } |
802 | 804 | ||
803 | private static void ProcessEveryoneMask(SceneObjectPart obj, XmlTextReader reader) | 805 | private static void ProcessEveryoneMask(SceneObjectPart obj, XmlReader reader) |
804 | { | 806 | { |
805 | obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty); | 807 | obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty); |
806 | } | 808 | } |
807 | 809 | ||
808 | private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlTextReader reader) | 810 | private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlReader reader) |
809 | { | 811 | { |
810 | obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty); | 812 | obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty); |
811 | } | 813 | } |
812 | 814 | ||
813 | private static void ProcessFlags(SceneObjectPart obj, XmlTextReader reader) | 815 | private static void ProcessFlags(SceneObjectPart obj, XmlReader reader) |
814 | { | 816 | { |
815 | obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags"); | 817 | obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags"); |
816 | } | 818 | } |
817 | 819 | ||
818 | private static void ProcessCollisionSound(SceneObjectPart obj, XmlTextReader reader) | 820 | private static void ProcessCollisionSound(SceneObjectPart obj, XmlReader reader) |
819 | { | 821 | { |
820 | obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound"); | 822 | obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound"); |
821 | } | 823 | } |
822 | 824 | ||
823 | private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlTextReader reader) | 825 | private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlReader reader) |
824 | { | 826 | { |
825 | obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty); | 827 | obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty); |
826 | } | 828 | } |
827 | 829 | ||
828 | private static void ProcessMediaUrl(SceneObjectPart obj, XmlTextReader reader) | 830 | private static void ProcessMediaUrl(SceneObjectPart obj, XmlReader reader) |
829 | { | 831 | { |
830 | obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); | 832 | obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); |
831 | } | 833 | } |
832 | 834 | ||
833 | private static void ProcessAttachedPos(SceneObjectPart obj, XmlTextReader reader) | 835 | private static void ProcessAttachedPos(SceneObjectPart obj, XmlReader reader) |
834 | { | 836 | { |
835 | obj.AttachedPos = Util.ReadVector(reader, "AttachedPos"); | 837 | obj.AttachedPos = Util.ReadVector(reader, "AttachedPos"); |
836 | } | 838 | } |
837 | 839 | ||
838 | private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader) | 840 | private static void ProcessDynAttrs(SceneObjectPart obj, XmlReader reader) |
839 | { | 841 | { |
840 | obj.DynAttrs.ReadXml(reader); | 842 | obj.DynAttrs.ReadXml(reader); |
841 | } | 843 | } |
842 | 844 | ||
843 | private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader) | 845 | private static void ProcessTextureAnimation(SceneObjectPart obj, XmlReader reader) |
844 | { | 846 | { |
845 | obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); | 847 | obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); |
846 | } | 848 | } |
847 | 849 | ||
848 | private static void ProcessParticleSystem(SceneObjectPart obj, XmlTextReader reader) | 850 | private static void ProcessParticleSystem(SceneObjectPart obj, XmlReader reader) |
849 | { | 851 | { |
850 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); | 852 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); |
851 | } | 853 | } |
852 | 854 | ||
853 | private static void ProcessPayPrice0(SceneObjectPart obj, XmlTextReader reader) | 855 | private static void ProcessPayPrice0(SceneObjectPart obj, XmlReader reader) |
854 | { | 856 | { |
855 | obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); | 857 | obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); |
856 | } | 858 | } |
857 | 859 | ||
858 | private static void ProcessPayPrice1(SceneObjectPart obj, XmlTextReader reader) | 860 | private static void ProcessPayPrice1(SceneObjectPart obj, XmlReader reader) |
859 | { | 861 | { |
860 | obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); | 862 | obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); |
861 | } | 863 | } |
862 | 864 | ||
863 | private static void ProcessPayPrice2(SceneObjectPart obj, XmlTextReader reader) | 865 | private static void ProcessPayPrice2(SceneObjectPart obj, XmlReader reader) |
864 | { | 866 | { |
865 | obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); | 867 | obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); |
866 | } | 868 | } |
867 | 869 | ||
868 | private static void ProcessPayPrice3(SceneObjectPart obj, XmlTextReader reader) | 870 | private static void ProcessPayPrice3(SceneObjectPart obj, XmlReader reader) |
869 | { | 871 | { |
870 | obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); | 872 | obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); |
871 | } | 873 | } |
872 | 874 | ||
873 | private static void ProcessPayPrice4(SceneObjectPart obj, XmlTextReader reader) | 875 | private static void ProcessPayPrice4(SceneObjectPart obj, XmlReader reader) |
874 | { | 876 | { |
875 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); | 877 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); |
876 | } | 878 | } |
@@ -878,122 +880,122 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
878 | #endregion | 880 | #endregion |
879 | 881 | ||
880 | #region TaskInventoryXmlProcessors | 882 | #region TaskInventoryXmlProcessors |
881 | private static void ProcessTIAssetID(TaskInventoryItem item, XmlTextReader reader) | 883 | private static void ProcessTIAssetID(TaskInventoryItem item, XmlReader reader) |
882 | { | 884 | { |
883 | item.AssetID = Util.ReadUUID(reader, "AssetID"); | 885 | item.AssetID = Util.ReadUUID(reader, "AssetID"); |
884 | } | 886 | } |
885 | 887 | ||
886 | private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlTextReader reader) | 888 | private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlReader reader) |
887 | { | 889 | { |
888 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); | 890 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); |
889 | } | 891 | } |
890 | 892 | ||
891 | private static void ProcessTICreationDate(TaskInventoryItem item, XmlTextReader reader) | 893 | private static void ProcessTICreationDate(TaskInventoryItem item, XmlReader reader) |
892 | { | 894 | { |
893 | item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty); | 895 | item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty); |
894 | } | 896 | } |
895 | 897 | ||
896 | private static void ProcessTICreatorID(TaskInventoryItem item, XmlTextReader reader) | 898 | private static void ProcessTICreatorID(TaskInventoryItem item, XmlReader reader) |
897 | { | 899 | { |
898 | item.CreatorID = Util.ReadUUID(reader, "CreatorID"); | 900 | item.CreatorID = Util.ReadUUID(reader, "CreatorID"); |
899 | } | 901 | } |
900 | 902 | ||
901 | private static void ProcessTICreatorData(TaskInventoryItem item, XmlTextReader reader) | 903 | private static void ProcessTICreatorData(TaskInventoryItem item, XmlReader reader) |
902 | { | 904 | { |
903 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | 905 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); |
904 | } | 906 | } |
905 | 907 | ||
906 | private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) | 908 | private static void ProcessTIDescription(TaskInventoryItem item, XmlReader reader) |
907 | { | 909 | { |
908 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); | 910 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); |
909 | } | 911 | } |
910 | 912 | ||
911 | private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlTextReader reader) | 913 | private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlReader reader) |
912 | { | 914 | { |
913 | item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty); | 915 | item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty); |
914 | } | 916 | } |
915 | 917 | ||
916 | private static void ProcessTIFlags(TaskInventoryItem item, XmlTextReader reader) | 918 | private static void ProcessTIFlags(TaskInventoryItem item, XmlReader reader) |
917 | { | 919 | { |
918 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); | 920 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); |
919 | } | 921 | } |
920 | 922 | ||
921 | private static void ProcessTIGroupID(TaskInventoryItem item, XmlTextReader reader) | 923 | private static void ProcessTIGroupID(TaskInventoryItem item, XmlReader reader) |
922 | { | 924 | { |
923 | item.GroupID = Util.ReadUUID(reader, "GroupID"); | 925 | item.GroupID = Util.ReadUUID(reader, "GroupID"); |
924 | } | 926 | } |
925 | 927 | ||
926 | private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlTextReader reader) | 928 | private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlReader reader) |
927 | { | 929 | { |
928 | item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty); | 930 | item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty); |
929 | } | 931 | } |
930 | 932 | ||
931 | private static void ProcessTIInvType(TaskInventoryItem item, XmlTextReader reader) | 933 | private static void ProcessTIInvType(TaskInventoryItem item, XmlReader reader) |
932 | { | 934 | { |
933 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); | 935 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); |
934 | } | 936 | } |
935 | 937 | ||
936 | private static void ProcessTIItemID(TaskInventoryItem item, XmlTextReader reader) | 938 | private static void ProcessTIItemID(TaskInventoryItem item, XmlReader reader) |
937 | { | 939 | { |
938 | item.ItemID = Util.ReadUUID(reader, "ItemID"); | 940 | item.ItemID = Util.ReadUUID(reader, "ItemID"); |
939 | } | 941 | } |
940 | 942 | ||
941 | private static void ProcessTIOldItemID(TaskInventoryItem item, XmlTextReader reader) | 943 | private static void ProcessTIOldItemID(TaskInventoryItem item, XmlReader reader) |
942 | { | 944 | { |
943 | item.OldItemID = Util.ReadUUID(reader, "OldItemID"); | 945 | item.OldItemID = Util.ReadUUID(reader, "OldItemID"); |
944 | } | 946 | } |
945 | 947 | ||
946 | private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlTextReader reader) | 948 | private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlReader reader) |
947 | { | 949 | { |
948 | item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); | 950 | item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); |
949 | } | 951 | } |
950 | 952 | ||
951 | private static void ProcessTIName(TaskInventoryItem item, XmlTextReader reader) | 953 | private static void ProcessTIName(TaskInventoryItem item, XmlReader reader) |
952 | { | 954 | { |
953 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); | 955 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); |
954 | } | 956 | } |
955 | 957 | ||
956 | private static void ProcessTINextPermissions(TaskInventoryItem item, XmlTextReader reader) | 958 | private static void ProcessTINextPermissions(TaskInventoryItem item, XmlReader reader) |
957 | { | 959 | { |
958 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); | 960 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); |
959 | } | 961 | } |
960 | 962 | ||
961 | private static void ProcessTIOwnerID(TaskInventoryItem item, XmlTextReader reader) | 963 | private static void ProcessTIOwnerID(TaskInventoryItem item, XmlReader reader) |
962 | { | 964 | { |
963 | item.OwnerID = Util.ReadUUID(reader, "OwnerID"); | 965 | item.OwnerID = Util.ReadUUID(reader, "OwnerID"); |
964 | } | 966 | } |
965 | 967 | ||
966 | private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlTextReader reader) | 968 | private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlReader reader) |
967 | { | 969 | { |
968 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); | 970 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); |
969 | } | 971 | } |
970 | 972 | ||
971 | private static void ProcessTIParentID(TaskInventoryItem item, XmlTextReader reader) | 973 | private static void ProcessTIParentID(TaskInventoryItem item, XmlReader reader) |
972 | { | 974 | { |
973 | item.ParentID = Util.ReadUUID(reader, "ParentID"); | 975 | item.ParentID = Util.ReadUUID(reader, "ParentID"); |
974 | } | 976 | } |
975 | 977 | ||
976 | private static void ProcessTIParentPartID(TaskInventoryItem item, XmlTextReader reader) | 978 | private static void ProcessTIParentPartID(TaskInventoryItem item, XmlReader reader) |
977 | { | 979 | { |
978 | item.ParentPartID = Util.ReadUUID(reader, "ParentPartID"); | 980 | item.ParentPartID = Util.ReadUUID(reader, "ParentPartID"); |
979 | } | 981 | } |
980 | 982 | ||
981 | private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlTextReader reader) | 983 | private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlReader reader) |
982 | { | 984 | { |
983 | item.PermsGranter = Util.ReadUUID(reader, "PermsGranter"); | 985 | item.PermsGranter = Util.ReadUUID(reader, "PermsGranter"); |
984 | } | 986 | } |
985 | 987 | ||
986 | private static void ProcessTIPermsMask(TaskInventoryItem item, XmlTextReader reader) | 988 | private static void ProcessTIPermsMask(TaskInventoryItem item, XmlReader reader) |
987 | { | 989 | { |
988 | item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty); | 990 | item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty); |
989 | } | 991 | } |
990 | 992 | ||
991 | private static void ProcessTIType(TaskInventoryItem item, XmlTextReader reader) | 993 | private static void ProcessTIType(TaskInventoryItem item, XmlReader reader) |
992 | { | 994 | { |
993 | item.Type = reader.ReadElementContentAsInt("Type", String.Empty); | 995 | item.Type = reader.ReadElementContentAsInt("Type", String.Empty); |
994 | } | 996 | } |
995 | 997 | ||
996 | private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlTextReader reader) | 998 | private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlReader reader) |
997 | { | 999 | { |
998 | item.OwnerChanged = Util.ReadBoolean(reader); | 1000 | item.OwnerChanged = Util.ReadBoolean(reader); |
999 | } | 1001 | } |
@@ -1001,243 +1003,243 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1001 | #endregion | 1003 | #endregion |
1002 | 1004 | ||
1003 | #region ShapeXmlProcessors | 1005 | #region ShapeXmlProcessors |
1004 | private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlTextReader reader) | 1006 | private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlReader reader) |
1005 | { | 1007 | { |
1006 | shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty); | 1008 | shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty); |
1007 | } | 1009 | } |
1008 | 1010 | ||
1009 | private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1011 | private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlReader reader) |
1010 | { | 1012 | { |
1011 | byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry")); | 1013 | byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry")); |
1012 | shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length); | 1014 | shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length); |
1013 | } | 1015 | } |
1014 | 1016 | ||
1015 | private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlTextReader reader) | 1017 | private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlReader reader) |
1016 | { | 1018 | { |
1017 | shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams")); | 1019 | shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams")); |
1018 | } | 1020 | } |
1019 | 1021 | ||
1020 | private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1022 | private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlReader reader) |
1021 | { | 1023 | { |
1022 | shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty); | 1024 | shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty); |
1023 | } | 1025 | } |
1024 | 1026 | ||
1025 | private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlTextReader reader) | 1027 | private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlReader reader) |
1026 | { | 1028 | { |
1027 | shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty); | 1029 | shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty); |
1028 | } | 1030 | } |
1029 | 1031 | ||
1030 | private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlTextReader reader) | 1032 | private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlReader reader) |
1031 | { | 1033 | { |
1032 | shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty); | 1034 | shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty); |
1033 | } | 1035 | } |
1034 | 1036 | ||
1035 | private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlTextReader reader) | 1037 | private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlReader reader) |
1036 | { | 1038 | { |
1037 | shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty); | 1039 | shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty); |
1038 | } | 1040 | } |
1039 | 1041 | ||
1040 | private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlTextReader reader) | 1042 | private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlReader reader) |
1041 | { | 1043 | { |
1042 | shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty); | 1044 | shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty); |
1043 | } | 1045 | } |
1044 | 1046 | ||
1045 | private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlTextReader reader) | 1047 | private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlReader reader) |
1046 | { | 1048 | { |
1047 | shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty); | 1049 | shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty); |
1048 | } | 1050 | } |
1049 | 1051 | ||
1050 | private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlTextReader reader) | 1052 | private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlReader reader) |
1051 | { | 1053 | { |
1052 | shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty); | 1054 | shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty); |
1053 | } | 1055 | } |
1054 | 1056 | ||
1055 | private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlTextReader reader) | 1057 | private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlReader reader) |
1056 | { | 1058 | { |
1057 | shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty); | 1059 | shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty); |
1058 | } | 1060 | } |
1059 | 1061 | ||
1060 | private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlTextReader reader) | 1062 | private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlReader reader) |
1061 | { | 1063 | { |
1062 | shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty); | 1064 | shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty); |
1063 | } | 1065 | } |
1064 | 1066 | ||
1065 | private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlTextReader reader) | 1067 | private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlReader reader) |
1066 | { | 1068 | { |
1067 | shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty); | 1069 | shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty); |
1068 | } | 1070 | } |
1069 | 1071 | ||
1070 | private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlTextReader reader) | 1072 | private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlReader reader) |
1071 | { | 1073 | { |
1072 | shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty); | 1074 | shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty); |
1073 | } | 1075 | } |
1074 | 1076 | ||
1075 | private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlTextReader reader) | 1077 | private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlReader reader) |
1076 | { | 1078 | { |
1077 | shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty); | 1079 | shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty); |
1078 | } | 1080 | } |
1079 | 1081 | ||
1080 | private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlTextReader reader) | 1082 | private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlReader reader) |
1081 | { | 1083 | { |
1082 | shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty); | 1084 | shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty); |
1083 | } | 1085 | } |
1084 | 1086 | ||
1085 | private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1087 | private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlReader reader) |
1086 | { | 1088 | { |
1087 | shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty); | 1089 | shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty); |
1088 | } | 1090 | } |
1089 | 1091 | ||
1090 | private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlTextReader reader) | 1092 | private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlReader reader) |
1091 | { | 1093 | { |
1092 | shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty); | 1094 | shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty); |
1093 | } | 1095 | } |
1094 | 1096 | ||
1095 | private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1097 | private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlReader reader) |
1096 | { | 1098 | { |
1097 | shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty); | 1099 | shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty); |
1098 | } | 1100 | } |
1099 | 1101 | ||
1100 | private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlTextReader reader) | 1102 | private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlReader reader) |
1101 | { | 1103 | { |
1102 | shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty); | 1104 | shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty); |
1103 | } | 1105 | } |
1104 | 1106 | ||
1105 | private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlTextReader reader) | 1107 | private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlReader reader) |
1106 | { | 1108 | { |
1107 | shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty); | 1109 | shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty); |
1108 | } | 1110 | } |
1109 | 1111 | ||
1110 | private static void ProcessShpScale(PrimitiveBaseShape shp, XmlTextReader reader) | 1112 | private static void ProcessShpScale(PrimitiveBaseShape shp, XmlReader reader) |
1111 | { | 1113 | { |
1112 | shp.Scale = Util.ReadVector(reader, "Scale"); | 1114 | shp.Scale = Util.ReadVector(reader, "Scale"); |
1113 | } | 1115 | } |
1114 | 1116 | ||
1115 | private static void ProcessShpState(PrimitiveBaseShape shp, XmlTextReader reader) | 1117 | private static void ProcessShpState(PrimitiveBaseShape shp, XmlReader reader) |
1116 | { | 1118 | { |
1117 | shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); | 1119 | shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); |
1118 | } | 1120 | } |
1119 | 1121 | ||
1120 | private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlTextReader reader) | 1122 | private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlReader reader) |
1121 | { | 1123 | { |
1122 | shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty); | 1124 | shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty); |
1123 | } | 1125 | } |
1124 | 1126 | ||
1125 | private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlTextReader reader) | 1127 | private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlReader reader) |
1126 | { | 1128 | { |
1127 | shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); | 1129 | shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); |
1128 | } | 1130 | } |
1129 | 1131 | ||
1130 | private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlTextReader reader) | 1132 | private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlReader reader) |
1131 | { | 1133 | { |
1132 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); | 1134 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); |
1133 | } | 1135 | } |
1134 | 1136 | ||
1135 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlTextReader reader) | 1137 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) |
1136 | { | 1138 | { |
1137 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); | 1139 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); |
1138 | } | 1140 | } |
1139 | 1141 | ||
1140 | private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlTextReader reader) | 1142 | private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlReader reader) |
1141 | { | 1143 | { |
1142 | shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty); | 1144 | shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty); |
1143 | } | 1145 | } |
1144 | 1146 | ||
1145 | private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlTextReader reader) | 1147 | private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlReader reader) |
1146 | { | 1148 | { |
1147 | shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty); | 1149 | shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty); |
1148 | } | 1150 | } |
1149 | 1151 | ||
1150 | private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlTextReader reader) | 1152 | private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlReader reader) |
1151 | { | 1153 | { |
1152 | shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty); | 1154 | shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty); |
1153 | } | 1155 | } |
1154 | 1156 | ||
1155 | private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlTextReader reader) | 1157 | private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlReader reader) |
1156 | { | 1158 | { |
1157 | shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty); | 1159 | shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty); |
1158 | } | 1160 | } |
1159 | 1161 | ||
1160 | private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlTextReader reader) | 1162 | private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlReader reader) |
1161 | { | 1163 | { |
1162 | shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty); | 1164 | shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty); |
1163 | } | 1165 | } |
1164 | 1166 | ||
1165 | private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlTextReader reader) | 1167 | private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlReader reader) |
1166 | { | 1168 | { |
1167 | shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty); | 1169 | shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty); |
1168 | } | 1170 | } |
1169 | 1171 | ||
1170 | private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlTextReader reader) | 1172 | private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlReader reader) |
1171 | { | 1173 | { |
1172 | shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty); | 1174 | shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty); |
1173 | } | 1175 | } |
1174 | 1176 | ||
1175 | private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlTextReader reader) | 1177 | private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlReader reader) |
1176 | { | 1178 | { |
1177 | shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty); | 1179 | shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty); |
1178 | } | 1180 | } |
1179 | 1181 | ||
1180 | private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlTextReader reader) | 1182 | private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlReader reader) |
1181 | { | 1183 | { |
1182 | shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty); | 1184 | shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty); |
1183 | } | 1185 | } |
1184 | 1186 | ||
1185 | private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlTextReader reader) | 1187 | private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlReader reader) |
1186 | { | 1188 | { |
1187 | shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty); | 1189 | shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty); |
1188 | } | 1190 | } |
1189 | 1191 | ||
1190 | private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlTextReader reader) | 1192 | private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlReader reader) |
1191 | { | 1193 | { |
1192 | shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty); | 1194 | shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty); |
1193 | } | 1195 | } |
1194 | 1196 | ||
1195 | private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlTextReader reader) | 1197 | private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlReader reader) |
1196 | { | 1198 | { |
1197 | shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty); | 1199 | shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty); |
1198 | } | 1200 | } |
1199 | 1201 | ||
1200 | private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlTextReader reader) | 1202 | private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlReader reader) |
1201 | { | 1203 | { |
1202 | shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty); | 1204 | shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty); |
1203 | } | 1205 | } |
1204 | 1206 | ||
1205 | private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlTextReader reader) | 1207 | private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlReader reader) |
1206 | { | 1208 | { |
1207 | shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty); | 1209 | shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty); |
1208 | } | 1210 | } |
1209 | 1211 | ||
1210 | private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlTextReader reader) | 1212 | private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlReader reader) |
1211 | { | 1213 | { |
1212 | shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty); | 1214 | shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty); |
1213 | } | 1215 | } |
1214 | 1216 | ||
1215 | private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlTextReader reader) | 1217 | private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlReader reader) |
1216 | { | 1218 | { |
1217 | shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty); | 1219 | shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty); |
1218 | } | 1220 | } |
1219 | 1221 | ||
1220 | private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlTextReader reader) | 1222 | private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlReader reader) |
1221 | { | 1223 | { |
1222 | shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty); | 1224 | shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty); |
1223 | } | 1225 | } |
1224 | 1226 | ||
1225 | private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1227 | private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlReader reader) |
1226 | { | 1228 | { |
1227 | shp.FlexiEntry = Util.ReadBoolean(reader); | 1229 | shp.FlexiEntry = Util.ReadBoolean(reader); |
1228 | } | 1230 | } |
1229 | 1231 | ||
1230 | private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1232 | private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlReader reader) |
1231 | { | 1233 | { |
1232 | shp.LightEntry = Util.ReadBoolean(reader); | 1234 | shp.LightEntry = Util.ReadBoolean(reader); |
1233 | } | 1235 | } |
1234 | 1236 | ||
1235 | private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1237 | private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlReader reader) |
1236 | { | 1238 | { |
1237 | shp.SculptEntry = Util.ReadBoolean(reader); | 1239 | shp.SculptEntry = Util.ReadBoolean(reader); |
1238 | } | 1240 | } |
1239 | 1241 | ||
1240 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlTextReader reader) | 1242 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader) |
1241 | { | 1243 | { |
1242 | string value = reader.ReadElementContentAsString("Media", String.Empty); | 1244 | string value = reader.ReadElementContentAsString("Media", String.Empty); |
1243 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | 1245 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); |
@@ -1589,7 +1591,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1589 | } | 1591 | } |
1590 | } | 1592 | } |
1591 | 1593 | ||
1592 | public static SceneObjectPart Xml2ToSOP(XmlTextReader reader) | 1594 | public static SceneObjectPart Xml2ToSOP(XmlReader reader) |
1593 | { | 1595 | { |
1594 | SceneObjectPart obj = new SceneObjectPart(); | 1596 | SceneObjectPart obj = new SceneObjectPart(); |
1595 | 1597 | ||
@@ -1610,7 +1612,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1610 | return obj; | 1612 | return obj; |
1611 | } | 1613 | } |
1612 | 1614 | ||
1613 | public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) | 1615 | public static TaskInventoryDictionary ReadTaskInventory(XmlReader reader, string name) |
1614 | { | 1616 | { |
1615 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); | 1617 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); |
1616 | 1618 | ||
@@ -1651,7 +1653,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1651 | /// <param name="name">The name of the xml element containing the shape</param> | 1653 | /// <param name="name">The name of the xml element containing the shape</param> |
1652 | /// <param name="errors">a list containing the failing node names. If no failures then null.</param> | 1654 | /// <param name="errors">a list containing the failing node names. If no failures then null.</param> |
1653 | /// <returns>The shape parsed</returns> | 1655 | /// <returns>The shape parsed</returns> |
1654 | public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out List<string> errorNodeNames) | 1656 | public static PrimitiveBaseShape ReadShape(XmlReader reader, string name, out List<string> errorNodeNames) |
1655 | { | 1657 | { |
1656 | List<string> internalErrorNodeNames = null; | 1658 | List<string> internalErrorNodeNames = null; |
1657 | 1659 | ||