From 1bd0b06ec1a0a5a7d6302d8017edcea7faf557e0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 16 Aug 2010 20:38:20 +0100 Subject: [PATCH 01/17] Implement Dynamic Attributes for SOP and PBS. Implement storage in SQLite --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 21 +++++ OpenSim/Framework/DynAttrsOSDMap.cs | 79 +++++++++++++++++++ OpenSim/Framework/PrimitiveBaseShape.cs | 7 ++ .../Framework/Scenes/SceneObjectPart.cs | 9 ++- 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 OpenSim/Framework/DynAttrsOSDMap.cs diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 29cac3c2f1..b97653baec 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1232,6 +1232,8 @@ namespace OpenSim.Data.SQLite createCol(prims, "VolumeDetect", typeof(Int16)); createCol(prims, "MediaURL", typeof(String)); + + createCol(prims, "DynAttrs", typeof(String)); // Add in contraints prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; @@ -1280,6 +1282,7 @@ namespace OpenSim.Data.SQLite createCol(shapes, "Texture", typeof(Byte[])); createCol(shapes, "ExtraParams", typeof(Byte[])); createCol(shapes, "Media", typeof(String)); + createCol(shapes, "DynAttrs", typeof(String)); shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] }; @@ -1711,6 +1714,16 @@ namespace OpenSim.Data.SQLite // m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); prim.MediaUrl = (string)row["MediaURL"]; } + + if (!(row["DynAttrs"] is System.DBNull)) + { + //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType()); + prim.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + } + else + { + prim.DynAttrs = new DynAttrsOSDMap(); + } return prim; } @@ -2133,6 +2146,7 @@ namespace OpenSim.Data.SQLite row["VolumeDetect"] = 0; row["MediaURL"] = prim.MediaUrl; + row["DynAttrs"] = prim.DynAttrs.ToXml(); } /// @@ -2393,6 +2407,11 @@ namespace OpenSim.Data.SQLite if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); + if (!(row["DynAttrs"] is System.DBNull)) + s.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + else + s.DynAttrs = new DynAttrsOSDMap(); + return s; } @@ -2439,6 +2458,8 @@ namespace OpenSim.Data.SQLite if (s.Media != null) row["Media"] = s.Media.ToXml(); + + row["DynAttrs"] = s.DynAttrs.ToXml(); } /// diff --git a/OpenSim/Framework/DynAttrsOSDMap.cs b/OpenSim/Framework/DynAttrsOSDMap.cs new file mode 100644 index 0000000000..2d45f66d80 --- /dev/null +++ b/OpenSim/Framework/DynAttrsOSDMap.cs @@ -0,0 +1,79 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.Serialization; +using OpenMetaverse; +using OpenMetaverse.StructuredData; + +namespace OpenSim.Framework +{ + /// + /// This is the map for storing and retrieving dynamic attributes. + /// + public class DynAttrsOSDMap : OSDMap, IXmlSerializable + { + public XmlSchema GetSchema() { return null; } + + public static DynAttrsOSDMap FromXml(string rawXml) + { + DynAttrsOSDMap map = new DynAttrsOSDMap(); + map.ReadXml(rawXml); + return map; + } + + public void ReadXml(string rawXml) + { + //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); + + OSDMap map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); + + foreach (string key in map.Keys) + this[key] = map[key]; + } + + public void ReadXml(XmlReader reader) + { + ReadXml(reader.ReadInnerXml()); + } + + public string ToXml() + { + return OSDParser.SerializeLLSDXmlString(this); + } + + public void WriteXml(XmlWriter writer) + { + writer.WriteRaw(ToXml()); + } + } +} \ No newline at end of file diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 4c36819bb2..fb0255b0a1 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -82,6 +82,11 @@ namespace OpenSim.Framework private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes(); + + /// + /// Dynamic attributes can be created and deleted as required. + /// + public DynAttrsOSDMap DynAttrs { get; set; } private byte[] m_textureEntry; @@ -194,6 +199,7 @@ namespace OpenSim.Framework { PCode = (byte)PCodeEnum.Primitive; m_textureEntry = DEFAULT_TEXTURE; + DynAttrs = new DynAttrsOSDMap(); } /// @@ -205,6 +211,7 @@ namespace OpenSim.Framework // m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); PCode = (byte)prim.PrimData.PCode; + DynAttrs = new DynAttrsOSDMap(); State = prim.PrimData.State; PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 672063555f..2a9b99e50a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -37,6 +37,7 @@ using System.Xml.Serialization; using log4net; using OpenMetaverse; using OpenMetaverse.Packets; +using OpenMetaverse.StructuredData; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; @@ -124,6 +125,11 @@ namespace OpenSim.Region.Framework.Scenes private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// + /// Dynamic attributes can be created and deleted as required. + /// + public DynAttrsOSDMap DynAttrs { get; set; } + /// /// Is this a root part? /// @@ -335,6 +341,7 @@ namespace OpenSim.Region.Framework.Scenes m_particleSystem = Utils.EmptyBytes; Rezzed = DateTime.UtcNow; Description = String.Empty; + DynAttrs = new DynAttrsOSDMap(); // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from @@ -4598,4 +4605,4 @@ namespace OpenSim.Region.Framework.Scenes } } } -} \ No newline at end of file +} From d3095e26493c15ce146e36fe38443722e86ac832 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 16 Aug 2010 21:31:36 +0100 Subject: [PATCH 02/17] Add DAExampleModule to demonstrate dynamic attributes This module demonstrates that we can add an arbitrary persisted value to SOP without any changes to core code. Every time the object is moved, the move record is updated and the users in the scene alerted The number of moves is persisted over server restarts in sqlite --- .../DynamicAttributes/DAExampleModule.cs | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs new file mode 100644 index 0000000000..2aca93a3d0 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs @@ -0,0 +1,98 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenMetaverse.Packets; +using OpenMetaverse.StructuredData; +using OpenSim.Framework; +using OpenSim.Region.Framework; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule +{ + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DAExampleModule")] + public class DAExampleModule : INonSharedRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + protected Scene m_scene; + protected IDialogModule m_dialogMod; + + public string Name { get { return "DAExample Module"; } } + public Type ReplaceableInterface { get { return null; } } + + public void Initialise(IConfigSource source) {} + + public void AddRegion(Scene scene) + { + m_scene = scene; + m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; + m_dialogMod = m_scene.RequestModuleInterface(); + } + + public void RemoveRegion(Scene scene) + { + m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; + } + + public void RegionLoaded(Scene scene) {} + + public void Close() + { + RemoveRegion(m_scene); + } + + protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) + { + SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId); + OSDMap attrs = sop.DynAttrs; + + lock (attrs) + { + OSDInteger newValue; + + if (!attrs.ContainsKey("moves")) + newValue = new OSDInteger(1); + else + newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1); + + attrs["moves"] = newValue; + + m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue)); + } + + return true; + } + } +} \ No newline at end of file From a3e1e6dd611a179eb2d894a45ae45ef278ae2e85 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 16 Aug 2010 21:57:08 +0100 Subject: [PATCH 03/17] Implement dynamic attribute persistence on mysql and mssql mssql is untested --- OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 23 ++++++++++++++----- .../MSSQL/Resources/RegionStore.migrations | 9 ++++++++ OpenSim/Data/MySQL/MySQLSimulationData.cs | 16 +++++++++++-- .../MySQL/Resources/RegionStore.migrations | 9 ++++++++ 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 17f42e1f0b..e9497389c8 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -351,7 +351,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID) ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, - LinkNumber = @LinkNumber, MediaURL = @MediaURL + LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs WHERE UUID = @UUID END ELSE @@ -366,7 +366,7 @@ ELSE PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, - ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL + ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL, DynAttrs ) VALUES ( @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, @@ -376,7 +376,7 @@ ELSE @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, - @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL + @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL, @DynAttrs ) END"; @@ -409,7 +409,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID) PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, - Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media + Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media, DynAttrs = @DynAttrs WHERE UUID = @UUID END ELSE @@ -418,11 +418,11 @@ ELSE primshapes ( UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, - ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media + ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media, DynAttrs ) VALUES ( @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, - @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media + @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media, @DynAttrs ) END"; @@ -1691,6 +1691,11 @@ VALUES if (!(primRow["MediaURL"] is System.DBNull)) prim.MediaUrl = (string)primRow["MediaURL"]; + + if (!(primRow["DynAttrs"] is System.DBNull)) + prim.DynAttrs = DynAttrsOSDMap.FromXml((string)primRow["DynAttrs"]); + else + prim.DynAttrs = new DynAttrsOSDMap(); return prim; } @@ -1749,6 +1754,10 @@ VALUES baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); } + if (!(shapeRow["DynAttrs"] is System.DBNull)) + baseShape.DynAttrs = DynAttrsOSDMap.FromXml((string)shapeRow["DynAttrs"]); + else + baseShape.DynAttrs = new DynAttrsOSDMap(); return baseShape; } @@ -2086,6 +2095,7 @@ VALUES parameters.Add(_Database.CreateParameter("PassTouches", 0)); parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); + parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); return parameters.ToArray(); } @@ -2143,6 +2153,7 @@ VALUES parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); } + parameters.Add(_Database.CreateParameter("DynAttrs", s.DynAttrs.ToXml())); return parameters.ToArray(); } diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index 350e548a0a..5e88e36eb4 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations @@ -1148,3 +1148,12 @@ CREATE TABLE [dbo].[regionenvironment]( ) ON [PRIMARY] COMMIT + +:VERSION 38 #---------------- Dynamic attributes + +BEGIN TRANSACTION + +ALTER TABLE prims ADD COLUMN DynAttrs TEXT; +ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; + +COMMIT diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index d56278354c..b7f39fba6f 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -202,7 +202,7 @@ namespace OpenSim.Data.MySQL "?SaleType, ?ColorR, ?ColorG, " + "?ColorB, ?ColorA, ?ParticleSystem, " + "?ClickAction, ?Material, ?CollisionSound, " + - "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)"; + "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL, ?DynAttrs)"; FillPrimCommand(cmd, prim, obj.UUID, regionUUID); @@ -230,7 +230,7 @@ namespace OpenSim.Data.MySQL "?PathTwistBegin, ?ProfileBegin, " + "?ProfileEnd, ?ProfileCurve, " + "?ProfileHollow, ?Texture, ?ExtraParams, " + - "?State, ?Media)"; + "?State, ?Media, ?DynAttrs)"; FillShapeCommand(cmd, prim); @@ -1291,6 +1291,11 @@ namespace OpenSim.Data.MySQL if (!(row["MediaURL"] is System.DBNull)) prim.MediaUrl = (string)row["MediaURL"]; + + if (!(row["DynAttrs"] is System.DBNull)) + prim.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + else + prim.DynAttrs = new DynAttrsOSDMap(); return prim; } @@ -1637,6 +1642,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); + cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); } /// @@ -1829,6 +1835,11 @@ namespace OpenSim.Data.MySQL if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); + + if (!(row["DynAttrs"] is System.DBNull)) + s.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + else + s.DynAttrs = new DynAttrsOSDMap(); return s; } @@ -1873,6 +1884,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); cmd.Parameters.AddWithValue("State", s.State); cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); + cmd.Parameters.AddWithValue("DynAttrs", s.DynAttrs.ToXml()); } public void StorePrimInventory(UUID primID, ICollection items) diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 5b59779050..1a38836ef1 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -902,3 +902,12 @@ BEGIN; CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`)); COMMIT; + +:VERSION 46 #---------------- Dynamic attributes + +BEGIN; + +ALTER TABLE prims ADD COLUMN DynAttrs TEXT; +ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; + +COMMIT; From a6d9c263650cc23d60f941718f87a64aa2f360b2 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 16 Aug 2010 22:21:46 +0100 Subject: [PATCH 04/17] Encapsulate an OSDMap in DAMap (was DynAttrsOSDMap) rather than inheriting from it This is the easier way to give us control over locking, rather than asking that OSDMap IDictionary methods be virtual --- OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 8 +- OpenSim/Data/MySQL/MySQLSimulationData.cs | 8 +- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 8 +- OpenSim/Framework/DAMap.cs | 173 ++++++++++++++++++ OpenSim/Framework/DynAttrsOSDMap.cs | 79 -------- OpenSim/Framework/PrimitiveBaseShape.cs | 6 +- .../DynamicAttributes/DAExampleModule.cs | 2 +- .../Framework/Scenes/SceneObjectPart.cs | 4 +- 8 files changed, 191 insertions(+), 97 deletions(-) create mode 100644 OpenSim/Framework/DAMap.cs delete mode 100644 OpenSim/Framework/DynAttrsOSDMap.cs diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index e9497389c8..e0e260d31f 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -1693,9 +1693,9 @@ VALUES prim.MediaUrl = (string)primRow["MediaURL"]; if (!(primRow["DynAttrs"] is System.DBNull)) - prim.DynAttrs = DynAttrsOSDMap.FromXml((string)primRow["DynAttrs"]); + prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); else - prim.DynAttrs = new DynAttrsOSDMap(); + prim.DynAttrs = new DAMap(); return prim; } @@ -1755,9 +1755,9 @@ VALUES } if (!(shapeRow["DynAttrs"] is System.DBNull)) - baseShape.DynAttrs = DynAttrsOSDMap.FromXml((string)shapeRow["DynAttrs"]); + baseShape.DynAttrs = DAMap.FromXml((string)shapeRow["DynAttrs"]); else - baseShape.DynAttrs = new DynAttrsOSDMap(); + baseShape.DynAttrs = new DAMap(); return baseShape; } diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index b7f39fba6f..e558702421 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -1293,9 +1293,9 @@ namespace OpenSim.Data.MySQL prim.MediaUrl = (string)row["MediaURL"]; if (!(row["DynAttrs"] is System.DBNull)) - prim.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); else - prim.DynAttrs = new DynAttrsOSDMap(); + prim.DynAttrs = new DAMap(); return prim; } @@ -1837,9 +1837,9 @@ namespace OpenSim.Data.MySQL s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); if (!(row["DynAttrs"] is System.DBNull)) - s.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); else - s.DynAttrs = new DynAttrsOSDMap(); + s.DynAttrs = new DAMap(); return s; } diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index b97653baec..6875ed60d7 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1718,11 +1718,11 @@ namespace OpenSim.Data.SQLite if (!(row["DynAttrs"] is System.DBNull)) { //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType()); - prim.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); } else { - prim.DynAttrs = new DynAttrsOSDMap(); + prim.DynAttrs = new DAMap(); } return prim; @@ -2408,9 +2408,9 @@ namespace OpenSim.Data.SQLite s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); if (!(row["DynAttrs"] is System.DBNull)) - s.DynAttrs = DynAttrsOSDMap.FromXml((string)row["DynAttrs"]); + s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); else - s.DynAttrs = new DynAttrsOSDMap(); + s.DynAttrs = new DAMap(); return s; } diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs new file mode 100644 index 0000000000..a6fdf6194a --- /dev/null +++ b/OpenSim/Framework/DAMap.cs @@ -0,0 +1,173 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.Serialization; +using OpenMetaverse; +using OpenMetaverse.StructuredData; + +namespace OpenSim.Framework +{ + /// + /// This is the map for storing and retrieving dynamic attributes. + /// + public class DAMap : IDictionary, IXmlSerializable + { + protected OSDMap m_map; + + public DAMap() { m_map = new OSDMap(); } + + public XmlSchema GetSchema() { return null; } + + public static DAMap FromXml(string rawXml) + { + DAMap map = new DAMap(); + map.ReadXml(rawXml); + return map; + } + + public void ReadXml(string rawXml) + { + //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); + + m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); + } + + public void ReadXml(XmlReader reader) + { + ReadXml(reader.ReadInnerXml()); + } + + public string ToXml() + { + lock (m_map) + return OSDParser.SerializeLLSDXmlString(m_map); + } + + public void WriteXml(XmlWriter writer) + { + writer.WriteRaw(ToXml()); + } + + public int Count { get { lock (m_map) { return m_map.Count; } } } + public bool IsReadOnly { get { return false; } } + public ICollection Keys { get { lock (m_map) { return m_map.Keys; } } } + public ICollection Values { get { lock (m_map) { return m_map.Values; } } } + public OSD this[string key] + { + get + { + OSD llsd; + + lock (m_map) + { + if (m_map.TryGetValue(key, out llsd)) + return llsd; + else + return null; + } + } + set { lock (m_map) { m_map[key] = value; } } + } + + public bool ContainsKey(string key) + { + lock (m_map) + return m_map.ContainsKey(key); + } + + public void Add(string key, OSD llsd) + { + lock (m_map) + m_map.Add(key, llsd); + } + + public void Add(KeyValuePair kvp) + { + lock (m_map) + m_map.Add(kvp.Key, kvp.Value); + } + + public bool Remove(string key) + { + lock (m_map) + return m_map.Remove(key); + } + + public bool TryGetValue(string key, out OSD llsd) + { + lock (m_map) + return m_map.TryGetValue(key, out llsd); + } + + public void Clear() + { + lock (m_map) + m_map.Clear(); + } + + public bool Contains(KeyValuePair kvp) + { + lock (m_map) + return m_map.ContainsKey(kvp.Key); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + throw new NotImplementedException(); + } + + public bool Remove(KeyValuePair kvp) + { + lock (m_map) + return m_map.Remove(kvp.Key); + } + + public System.Collections.IDictionaryEnumerator GetEnumerator() + { + lock (m_map) + return m_map.GetEnumerator(); + } + + IEnumerator> IEnumerable>.GetEnumerator() + { + return null; + } + + IEnumerator IEnumerable.GetEnumerator() + { + lock (m_map) + return m_map.GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/OpenSim/Framework/DynAttrsOSDMap.cs b/OpenSim/Framework/DynAttrsOSDMap.cs deleted file mode 100644 index 2d45f66d80..0000000000 --- a/OpenSim/Framework/DynAttrsOSDMap.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; -using System.Xml.Schema; -using System.Xml.Serialization; -using OpenMetaverse; -using OpenMetaverse.StructuredData; - -namespace OpenSim.Framework -{ - /// - /// This is the map for storing and retrieving dynamic attributes. - /// - public class DynAttrsOSDMap : OSDMap, IXmlSerializable - { - public XmlSchema GetSchema() { return null; } - - public static DynAttrsOSDMap FromXml(string rawXml) - { - DynAttrsOSDMap map = new DynAttrsOSDMap(); - map.ReadXml(rawXml); - return map; - } - - public void ReadXml(string rawXml) - { - //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); - - OSDMap map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); - - foreach (string key in map.Keys) - this[key] = map[key]; - } - - public void ReadXml(XmlReader reader) - { - ReadXml(reader.ReadInnerXml()); - } - - public string ToXml() - { - return OSDParser.SerializeLLSDXmlString(this); - } - - public void WriteXml(XmlWriter writer) - { - writer.WriteRaw(ToXml()); - } - } -} \ No newline at end of file diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index fb0255b0a1..775412b15b 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -86,7 +86,7 @@ namespace OpenSim.Framework /// /// Dynamic attributes can be created and deleted as required. /// - public DynAttrsOSDMap DynAttrs { get; set; } + public DAMap DynAttrs { get; set; } private byte[] m_textureEntry; @@ -199,7 +199,7 @@ namespace OpenSim.Framework { PCode = (byte)PCodeEnum.Primitive; m_textureEntry = DEFAULT_TEXTURE; - DynAttrs = new DynAttrsOSDMap(); + DynAttrs = new DAMap(); } /// @@ -211,7 +211,7 @@ namespace OpenSim.Framework // m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); PCode = (byte)prim.PrimData.PCode; - DynAttrs = new DynAttrsOSDMap(); + DynAttrs = new DAMap(); State = prim.PrimData.State; PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs index 2aca93a3d0..d6fb15bfbe 100644 --- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs +++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) { SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId); - OSDMap attrs = sop.DynAttrs; + DAMap attrs = sop.DynAttrs; lock (attrs) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2a9b99e50a..27f3a4d8f2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -128,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Dynamic attributes can be created and deleted as required. /// - public DynAttrsOSDMap DynAttrs { get; set; } + public DAMap DynAttrs { get; set; } /// /// Is this a root part? @@ -341,7 +341,7 @@ namespace OpenSim.Region.Framework.Scenes m_particleSystem = Utils.EmptyBytes; Rezzed = DateTime.UtcNow; Description = String.Empty; - DynAttrs = new DynAttrsOSDMap(); + DynAttrs = new DAMap(); // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from From 1650846df32872fa64a8d944f2144b866f17c57a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 16 Aug 2010 22:28:48 +0100 Subject: [PATCH 05/17] Lock DAMap rather than encapsulated OSDMap This allows external lockers to preserve atomicity of dynamic attribute changes --- OpenSim/Framework/DAMap.cs | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs index a6fdf6194a..7551a10fe4 100644 --- a/OpenSim/Framework/DAMap.cs +++ b/OpenSim/Framework/DAMap.cs @@ -60,7 +60,8 @@ namespace OpenSim.Framework { //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); - m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); + lock (this) + m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); } public void ReadXml(XmlReader reader) @@ -70,7 +71,7 @@ namespace OpenSim.Framework public string ToXml() { - lock (m_map) + lock (this) return OSDParser.SerializeLLSDXmlString(m_map); } @@ -79,17 +80,17 @@ namespace OpenSim.Framework writer.WriteRaw(ToXml()); } - public int Count { get { lock (m_map) { return m_map.Count; } } } + public int Count { get { lock (this) { return m_map.Count; } } } public bool IsReadOnly { get { return false; } } - public ICollection Keys { get { lock (m_map) { return m_map.Keys; } } } - public ICollection Values { get { lock (m_map) { return m_map.Values; } } } + public ICollection Keys { get { lock (this) { return m_map.Keys; } } } + public ICollection Values { get { lock (this) { return m_map.Values; } } } public OSD this[string key] { get { OSD llsd; - lock (m_map) + lock (this) { if (m_map.TryGetValue(key, out llsd)) return llsd; @@ -97,48 +98,48 @@ namespace OpenSim.Framework return null; } } - set { lock (m_map) { m_map[key] = value; } } + set { lock (this) { m_map[key] = value; } } } public bool ContainsKey(string key) { - lock (m_map) + lock (this) return m_map.ContainsKey(key); } public void Add(string key, OSD llsd) { - lock (m_map) + lock (this) m_map.Add(key, llsd); } public void Add(KeyValuePair kvp) { - lock (m_map) + lock (this) m_map.Add(kvp.Key, kvp.Value); } public bool Remove(string key) { - lock (m_map) + lock (this) return m_map.Remove(key); } public bool TryGetValue(string key, out OSD llsd) { - lock (m_map) + lock (this) return m_map.TryGetValue(key, out llsd); } public void Clear() { - lock (m_map) + lock (this) m_map.Clear(); } public bool Contains(KeyValuePair kvp) { - lock (m_map) + lock (this) return m_map.ContainsKey(kvp.Key); } @@ -149,13 +150,13 @@ namespace OpenSim.Framework public bool Remove(KeyValuePair kvp) { - lock (m_map) + lock (this) return m_map.Remove(kvp.Key); } public System.Collections.IDictionaryEnumerator GetEnumerator() { - lock (m_map) + lock (this) return m_map.GetEnumerator(); } @@ -166,7 +167,7 @@ namespace OpenSim.Framework IEnumerator IEnumerable.GetEnumerator() { - lock (m_map) + lock (this) return m_map.GetEnumerator(); } } From 918b06286607a06e73eae5f24762b45eee76fd6a Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 21 Jan 2013 18:45:01 +0200 Subject: [PATCH 06/17] Added missing DynAttrs references in MySQL --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index e558702421..77fa1ec194 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -171,7 +171,8 @@ namespace OpenSim.Data.MySQL "ParticleSystem, ClickAction, Material, " + "CollisionSound, CollisionSoundVolume, " + "PassTouches, " + - "LinkNumber, MediaURL) values (" + "?UUID, " + + "LinkNumber, MediaURL, DynAttrs) " + + "values (?UUID, " + "?CreationDate, ?Name, ?Text, " + "?Description, ?SitName, ?TouchName, " + "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + @@ -202,7 +203,8 @@ namespace OpenSim.Data.MySQL "?SaleType, ?ColorR, ?ColorG, " + "?ColorB, ?ColorA, ?ParticleSystem, " + "?ClickAction, ?Material, ?CollisionSound, " + - "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL, ?DynAttrs)"; + "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, " + + "?MediaURL, ?DynAttrs)"; FillPrimCommand(cmd, prim, obj.UUID, regionUUID); @@ -219,7 +221,8 @@ namespace OpenSim.Data.MySQL "PathTaperX, PathTaperY, PathTwist, " + "PathTwistBegin, ProfileBegin, ProfileEnd, " + "ProfileCurve, ProfileHollow, Texture, " + - "ExtraParams, State, Media) values (?UUID, " + + "ExtraParams, State, Media, DynAttrs) " + + "values (?UUID, " + "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + "?PCode, ?PathBegin, ?PathEnd, " + "?PathScaleX, ?PathScaleY, " + From 8b4441d940a55da90645580477ece33d15849078 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 08:41:32 +0200 Subject: [PATCH 07/17] Changed DAMap to be the container of "data stores", which are OSDMaps. Store names must have at least 4 characters. --- OpenSim/Framework/DAMap.cs | 104 ++++++++++++++---- .../DynamicAttributes/DAExampleModule.cs | 25 +++-- 2 files changed, 97 insertions(+), 32 deletions(-) diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs index 7551a10fe4..c25623065a 100644 --- a/OpenSim/Framework/DAMap.cs +++ b/OpenSim/Framework/DAMap.cs @@ -39,10 +39,19 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Framework { /// - /// This is the map for storing and retrieving dynamic attributes. + /// This class stores and retrieves dynamic attributes. /// - public class DAMap : IDictionary, IXmlSerializable - { + /// + /// Modules that want to use dynamic attributes need to do so in a private data store + /// which is accessed using a unique name. DAMap provides access to the data stores, + /// each of which is an OSDMap. Modules are free to store any type of data they want + /// within their data store. However, avoid storing large amounts of data because that + /// would slow down database access. + /// + public class DAMap : IDictionary, IXmlSerializable + { + private static readonly int MIN_STORE_NAME_LENGTH = 4; + protected OSDMap m_map; public DAMap() { m_map = new OSDMap(); } @@ -79,12 +88,42 @@ namespace OpenSim.Framework { writer.WriteRaw(ToXml()); } - + + /// + /// Returns the number of data stores. + /// public int Count { get { lock (this) { return m_map.Count; } } } + public bool IsReadOnly { get { return false; } } + + /// + /// Returns the names of the data stores. + /// public ICollection Keys { get { lock (this) { return m_map.Keys; } } } - public ICollection Values { get { lock (this) { return m_map.Values; } } } - public OSD this[string key] + + /// + /// Returns all the data stores. + /// + public ICollection Values + { + get + { + lock (this) + { + List stores = new List(m_map.Count); + foreach (OSD llsd in m_map.Values) + stores.Add((OSDMap)llsd); + return stores; + } + } + } + + /// + /// Gets or sets one data store. + /// + /// Store name + /// + public OSDMap this[string key] { get { @@ -93,13 +132,25 @@ namespace OpenSim.Framework lock (this) { if (m_map.TryGetValue(key, out llsd)) - return llsd; + return (OSDMap)llsd; else return null; } } - set { lock (this) { m_map[key] = value; } } - } + + set + { + ValidateKey(key); + lock (this) + m_map[key] = value; + } + } + + private static void ValidateKey(string key) + { + if (key.Length < MIN_STORE_NAME_LENGTH) + throw new Exception("Minimum store name length is " + MIN_STORE_NAME_LENGTH); + } public bool ContainsKey(string key) { @@ -107,13 +158,14 @@ namespace OpenSim.Framework return m_map.ContainsKey(key); } - public void Add(string key, OSD llsd) - { + public void Add(string key, OSDMap store) + { + ValidateKey(key); lock (this) - m_map.Add(key, llsd); + m_map.Add(key, store); } - public void Add(KeyValuePair kvp) + public void Add(KeyValuePair kvp) { lock (this) m_map.Add(kvp.Key, kvp.Value); @@ -125,10 +177,22 @@ namespace OpenSim.Framework return m_map.Remove(key); } - public bool TryGetValue(string key, out OSD llsd) - { + public bool TryGetValue(string key, out OSDMap store) + { lock (this) - return m_map.TryGetValue(key, out llsd); + { + OSD llsd; + if (m_map.TryGetValue(key, out llsd)) + { + store = (OSDMap)llsd; + return true; + } + else + { + store = null; + return false; + } + } } public void Clear() @@ -137,18 +201,18 @@ namespace OpenSim.Framework m_map.Clear(); } - public bool Contains(KeyValuePair kvp) + public bool Contains(KeyValuePair kvp) { lock (this) return m_map.ContainsKey(kvp.Key); } - public void CopyTo(KeyValuePair[] array, int index) + public void CopyTo(KeyValuePair[] array, int index) { throw new NotImplementedException(); } - public bool Remove(KeyValuePair kvp) + public bool Remove(KeyValuePair kvp) { lock (this) return m_map.Remove(kvp.Key); @@ -160,7 +224,7 @@ namespace OpenSim.Framework return m_map.GetEnumerator(); } - IEnumerator> IEnumerable>.GetEnumerator() + IEnumerator> IEnumerable>.GetEnumerator() { return null; } diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs index d6fb15bfbe..084fb5f70b 100644 --- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs +++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs @@ -75,22 +75,23 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) { + OSDMap attrs = null; SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId); - DAMap attrs = sop.DynAttrs; + if (!sop.DynAttrs.TryGetValue(Name, out attrs)) + attrs = new OSDMap(); - lock (attrs) - { - OSDInteger newValue; + OSDInteger newValue; - if (!attrs.ContainsKey("moves")) - newValue = new OSDInteger(1); - else - newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1); + if (!attrs.ContainsKey("moves")) + newValue = new OSDInteger(1); + else + newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1); - attrs["moves"] = newValue; - - m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue)); - } + attrs["moves"] = newValue; + + sop.DynAttrs[Name] = attrs; + + m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue)); return true; } From fdec05a15ef126f344c03427e9ef264b4248646b Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 08:49:36 +0200 Subject: [PATCH 08/17] Stopped storing dynamic attributes in the PrimShape --- OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 13 +++---------- OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 1 - OpenSim/Data/MySQL/MySQLSimulationData.cs | 10 ++-------- OpenSim/Data/MySQL/Resources/RegionStore.migrations | 1 - OpenSim/Data/SQLite/SQLiteSimulationData.cs | 8 -------- OpenSim/Framework/PrimitiveBaseShape.cs | 7 ------- 6 files changed, 5 insertions(+), 35 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index e0e260d31f..24252ad289 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -409,7 +409,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID) PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, - Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media, DynAttrs = @DynAttrs + Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media WHERE UUID = @UUID END ELSE @@ -418,11 +418,11 @@ ELSE primshapes ( UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, - ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media, DynAttrs + ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media ) VALUES ( @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, - @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media, @DynAttrs + @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media ) END"; @@ -1754,11 +1754,6 @@ VALUES baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); } - if (!(shapeRow["DynAttrs"] is System.DBNull)) - baseShape.DynAttrs = DAMap.FromXml((string)shapeRow["DynAttrs"]); - else - baseShape.DynAttrs = new DAMap(); - return baseShape; } @@ -2153,8 +2148,6 @@ VALUES parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); } - parameters.Add(_Database.CreateParameter("DynAttrs", s.DynAttrs.ToXml())); - return parameters.ToArray(); } diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index 5e88e36eb4..92cc38ab2e 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations @@ -1154,6 +1154,5 @@ COMMIT BEGIN TRANSACTION ALTER TABLE prims ADD COLUMN DynAttrs TEXT; -ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; COMMIT diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 77fa1ec194..1a6a0fb819 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -221,7 +221,7 @@ namespace OpenSim.Data.MySQL "PathTaperX, PathTaperY, PathTwist, " + "PathTwistBegin, ProfileBegin, ProfileEnd, " + "ProfileCurve, ProfileHollow, Texture, " + - "ExtraParams, State, Media, DynAttrs) " + + "ExtraParams, State, Media) " + "values (?UUID, " + "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + "?PCode, ?PathBegin, ?PathEnd, " + @@ -233,7 +233,7 @@ namespace OpenSim.Data.MySQL "?PathTwistBegin, ?ProfileBegin, " + "?ProfileEnd, ?ProfileCurve, " + "?ProfileHollow, ?Texture, ?ExtraParams, " + - "?State, ?Media, ?DynAttrs)"; + "?State, ?Media)"; FillShapeCommand(cmd, prim); @@ -1838,11 +1838,6 @@ namespace OpenSim.Data.MySQL if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); - - if (!(row["DynAttrs"] is System.DBNull)) - s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); - else - s.DynAttrs = new DAMap(); return s; } @@ -1887,7 +1882,6 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); cmd.Parameters.AddWithValue("State", s.State); cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); - cmd.Parameters.AddWithValue("DynAttrs", s.DynAttrs.ToXml()); } public void StorePrimInventory(UUID primID, ICollection items) diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 1a38836ef1..c48aec2798 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -908,6 +908,5 @@ COMMIT; BEGIN; ALTER TABLE prims ADD COLUMN DynAttrs TEXT; -ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 6875ed60d7..fda77280ff 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1282,7 +1282,6 @@ namespace OpenSim.Data.SQLite createCol(shapes, "Texture", typeof(Byte[])); createCol(shapes, "ExtraParams", typeof(Byte[])); createCol(shapes, "Media", typeof(String)); - createCol(shapes, "DynAttrs", typeof(String)); shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] }; @@ -2406,11 +2405,6 @@ namespace OpenSim.Data.SQLite if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); - - if (!(row["DynAttrs"] is System.DBNull)) - s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); - else - s.DynAttrs = new DAMap(); return s; } @@ -2458,8 +2452,6 @@ namespace OpenSim.Data.SQLite if (s.Media != null) row["Media"] = s.Media.ToXml(); - - row["DynAttrs"] = s.DynAttrs.ToXml(); } /// diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 775412b15b..4c36819bb2 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -82,11 +82,6 @@ namespace OpenSim.Framework private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes(); - - /// - /// Dynamic attributes can be created and deleted as required. - /// - public DAMap DynAttrs { get; set; } private byte[] m_textureEntry; @@ -199,7 +194,6 @@ namespace OpenSim.Framework { PCode = (byte)PCodeEnum.Primitive; m_textureEntry = DEFAULT_TEXTURE; - DynAttrs = new DAMap(); } /// @@ -211,7 +205,6 @@ namespace OpenSim.Framework // m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); PCode = (byte)prim.PrimData.PCode; - DynAttrs = new DAMap(); State = prim.PrimData.State; PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); From 86802bcf937e19ea99c2f9b7bc757b4e9daf3d16 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 08:55:15 +0200 Subject: [PATCH 09/17] Store NULL in the 'DynAttrs' column if the prim doesn't have any dynamic attributes --- OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 6 +++++- OpenSim/Data/MySQL/MySQLSimulationData.cs | 6 +++++- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 24252ad289..276a19002f 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -2090,7 +2090,11 @@ VALUES parameters.Add(_Database.CreateParameter("PassTouches", 0)); parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); - parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); + + if (prim.DynAttrs.Count > 0) + parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); + else + parameters.Add(_Database.CreateParameter("DynAttrs", null)); return parameters.ToArray(); } diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 1a6a0fb819..c95311e6c7 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -1645,7 +1645,11 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); - cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); + + if (prim.DynAttrs.Count > 0) + cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); + else + cmd.Parameters.AddWithValue("DynAttrs", null); } /// diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index fda77280ff..91fc704e61 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -2145,7 +2145,11 @@ namespace OpenSim.Data.SQLite row["VolumeDetect"] = 0; row["MediaURL"] = prim.MediaUrl; - row["DynAttrs"] = prim.DynAttrs.ToXml(); + + if (prim.DynAttrs.Count > 0) + row["DynAttrs"] = prim.DynAttrs.ToXml(); + else + row["DynAttrs"] = null; } /// From af6a7cf95df76708d013932d8ef92c9bbeda0e5d Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 11:59:20 +0200 Subject: [PATCH 10/17] Added DynAttrs to the serialized XML format of prims. When copying prims, use deep copy for DynAttrs. --- OpenSim/Framework/DAMap.cs | 26 +++++++++++++++++-- .../Framework/Scenes/SceneObjectPart.cs | 2 ++ .../Serialization/SceneObjectSerializer.cs | 14 ++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs index c25623065a..291c8b8385 100644 --- a/OpenSim/Framework/DAMap.cs +++ b/OpenSim/Framework/DAMap.cs @@ -67,7 +67,7 @@ namespace OpenSim.Framework public void ReadXml(string rawXml) { - //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); + // System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); lock (this) m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); @@ -87,7 +87,29 @@ namespace OpenSim.Framework public void WriteXml(XmlWriter writer) { writer.WriteRaw(ToXml()); - } + } + + public void CopyFrom(DAMap other) + { + // Deep copy + + string data = null; + lock (other) + { + if (other.Count > 0) + { + data = OSDParser.SerializeLLSDXmlString(other.m_map); + } + } + + lock (this) + { + if (data == null) + Clear(); + else + m_map = (OSDMap)OSDParser.DeserializeLLSDXml(data); + } + } /// /// Returns the number of data stores. diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 27f3a4d8f2..189d2987eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1625,6 +1625,8 @@ namespace OpenSim.Region.Framework.Scenes Array.Copy(Shape.ExtraParams, extraP, extraP.Length); dupe.Shape.ExtraParams = extraP; + dupe.DynAttrs.CopyFrom(DynAttrs); + if (userExposed) { /* diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 2d4c60ad75..4a2a47e685 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -359,6 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound); m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume); m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); + m_SOPXmlProcessors.Add("DynAttrs", ProcessDynAttrs); m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation); m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0); @@ -722,6 +723,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); } + private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader) + { + obj.DynAttrs.ReadXml(reader); + } + private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader) { obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); @@ -1235,6 +1241,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); if (sop.MediaUrl != null) writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); + + if (sop.DynAttrs.Count > 0) + { + writer.WriteStartElement("DynAttrs"); + sop.DynAttrs.WriteXml(writer); + writer.WriteEndElement(); + } + WriteBytes(writer, "TextureAnimation", sop.TextureAnimation); WriteBytes(writer, "ParticleSystem", sop.ParticleSystem); writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString()); From 23f0610f0ce33a7308fc2c9190204b2d8882ce85 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 12:17:16 +0200 Subject: [PATCH 11/17] Disabled DAExampleModule --- .../DynamicAttributes/DAExampleModule.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs index 084fb5f70b..d36f65acf3 100644 --- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs +++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs @@ -45,7 +45,9 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule public class DAExampleModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + + private static readonly bool ENABLED = false; // enable for testing + protected Scene m_scene; protected IDialogModule m_dialogMod; @@ -56,14 +58,20 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule public void AddRegion(Scene scene) { - m_scene = scene; - m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; - m_dialogMod = m_scene.RequestModuleInterface(); + if (ENABLED) + { + m_scene = scene; + m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; + m_dialogMod = m_scene.RequestModuleInterface(); + } } public void RemoveRegion(Scene scene) { - m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; + if (ENABLED) + { + m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; + } } public void RegionLoaded(Scene scene) {} From 6daf559fb678435779d766cc4435b4ec141fb7df Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Jan 2013 12:50:23 +0200 Subject: [PATCH 12/17] Added unit tests for Dynamic Attributes --- .../World/Serialiser/Tests/SerialiserTests.cs | 37 +++++++++++++++++++ prebuild.xml | 1 + 2 files changed, 38 insertions(+) diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index bcb8e2f537..b4348c9d5a 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs @@ -35,6 +35,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Tests.Common; +using OpenMetaverse.StructuredData; namespace OpenSim.Region.CoreModules.World.Serialiser.Tests { @@ -143,6 +144,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests None 00000000-0000-0000-0000-000000000000 0 + MyStorethe answer42 @@ -331,6 +333,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests 0 2147483647 None + MyStorelast wordsRosebud 00000000-0000-0000-0000-000000000000 @@ -359,6 +362,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests Assert.That(rootPart.UUID, Is.EqualTo(new UUID("e6a5a05e-e8cc-4816-8701-04165e335790"))); Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("a6dacf01-4636-4bb9-8a97-30609438af9d"))); Assert.That(rootPart.Name, Is.EqualTo("PrimMyRide")); + OSDMap store = rootPart.DynAttrs["MyStore"]; + Assert.AreEqual(42, store["the answer"].AsInteger()); // TODO: Check other properties } @@ -409,6 +414,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests rp.CreatorID = rpCreatorId; rp.Shape = shape; + string daStoreName = "MyStore"; + string daKey = "foo"; + string daValue = "bar"; + OSDMap myStore = new OSDMap(); + myStore.Add(daKey, daValue); + rp.DynAttrs = new DAMap(); + rp.DynAttrs[daStoreName] = myStore; + SceneObjectGroup so = new SceneObjectGroup(rp); // Need to add the object to the scene so that the request to get script state succeeds @@ -424,6 +437,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests UUID uuid = UUID.Zero; string name = null; UUID creatorId = UUID.Zero; + DAMap daMap = null; while (xtr.Read() && xtr.Name != "SceneObjectPart") { @@ -449,6 +463,10 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests creatorId = UUID.Parse(xtr.ReadElementString("UUID")); xtr.ReadEndElement(); break; + case "DynAttrs": + daMap = new DAMap(); + daMap.ReadXml(xtr); + break; } } @@ -462,6 +480,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests Assert.That(uuid, Is.EqualTo(rpUuid)); Assert.That(name, Is.EqualTo(rpName)); Assert.That(creatorId, Is.EqualTo(rpCreatorId)); + Assert.NotNull(daMap); + Assert.AreEqual(daValue, daMap[daStoreName][daKey].AsString()); } [Test] @@ -476,6 +496,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946"))); Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("b46ef588-411e-4a8b-a284-d7dcfe8e74ef"))); Assert.That(rootPart.Name, Is.EqualTo("PrimFun")); + OSDMap store = rootPart.DynAttrs["MyStore"]; + Assert.AreEqual("Rosebud", store["last words"].AsString()); // TODO: Check other properties } @@ -500,6 +522,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests rp.CreatorID = rpCreatorId; rp.Shape = shape; + string daStoreName = "MyStore"; + string daKey = "foo"; + string daValue = "bar"; + OSDMap myStore = new OSDMap(); + myStore.Add(daKey, daValue); + rp.DynAttrs = new DAMap(); + rp.DynAttrs[daStoreName] = myStore; + SceneObjectGroup so = new SceneObjectGroup(rp); // Need to add the object to the scene so that the request to get script state succeeds @@ -516,6 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests UUID uuid = UUID.Zero; string name = null; UUID creatorId = UUID.Zero; + DAMap daMap = null; while (xtr.Read() && xtr.Name != "SceneObjectPart") { @@ -537,6 +568,10 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests creatorId = UUID.Parse(xtr.ReadElementString("Guid")); xtr.ReadEndElement(); break; + case "DynAttrs": + daMap = new DAMap(); + daMap.ReadXml(xtr); + break; } } @@ -549,6 +584,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests Assert.That(uuid, Is.EqualTo(rpUuid)); Assert.That(name, Is.EqualTo(rpName)); Assert.That(creatorId, Is.EqualTo(rpCreatorId)); + Assert.NotNull(daMap); + Assert.AreEqual(daValue, daMap[daStoreName][daKey].AsString()); } } } \ No newline at end of file diff --git a/prebuild.xml b/prebuild.xml index 8a753800df..106ae39405 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -3023,6 +3023,7 @@ + From 77894151485e4e6ad397cee85a551a4593e57cdd Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 25 Jan 2013 04:22:32 +0000 Subject: [PATCH 13/17] Fix tests by adding DynAttrs add column commands to RegionStore.migrations (these were originally in 021_RegionStore.sql which I might have forgotton to add 2 years ago). --- OpenSim/Data/SQLite/Resources/RegionStore.migrations | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index e872977634..4c3c55da25 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -575,3 +575,9 @@ CREATE TABLE `regionenvironment` ( ); COMMIT; + +:VERSION 27 +BEGIN; +ALTER TABLE prims ADD COLUMN DynAttrs TEXT; +ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; +COMMIT; \ No newline at end of file From 7a139f8e5324c68c58249fc21e4ac78328cfa3bf Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 25 Jan 2013 04:35:06 +0000 Subject: [PATCH 14/17] Remove the accidental PrimShapes column that I added back to the SQLite region store --- OpenSim/Data/SQLite/Resources/RegionStore.migrations | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index 4c3c55da25..e583dc2bc1 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -579,5 +579,4 @@ COMMIT; :VERSION 27 BEGIN; ALTER TABLE prims ADD COLUMN DynAttrs TEXT; -ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT; -COMMIT; \ No newline at end of file +COMMIT; From 1f1da230976451d30d920c237d53c699ba96b9d9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 5 Feb 2013 00:23:17 +0000 Subject: [PATCH 15/17] Bump version and assembly version numbers from 0.7.5 to 0.7.6 This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force. --- .../ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs | 4 ++-- .../RegionModulesController/Properties/AssemblyInfo.cs | 2 +- .../RemoteController/Properties/AssemblyInfo.cs | 2 +- OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs | 2 +- OpenSim/Capabilities/Properties/AssemblyInfo.cs | 2 +- OpenSim/ConsoleClient/Properties/AssemblyInfo.cs | 2 +- OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | 2 +- OpenSim/Data/MySQL/Properties/AssemblyInfo.cs | 2 +- OpenSim/Data/Null/Properties/AssemblyInfo.cs | 2 +- OpenSim/Data/Properties/AssemblyInfo.cs | 2 +- OpenSim/Data/SQLite/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/AssemblyInfo.cs | 2 +- .../AssetLoader/Filesystem/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Communications/Properties/AssemblyInfo.cs | 2 +- .../Framework/Configuration/HTTP/Properties/AssemblyInfo.cs | 2 +- .../Framework/Configuration/XML/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Console/AssemblyInfo.cs | 2 +- OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs | 2 +- .../RegionLoader/Filesystem/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs | 2 +- .../Framework/Servers/HttpServer/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Servers/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Servers/VersionInfo.cs | 2 +- .../Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | 2 +- .../Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/Framework/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- .../Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs | 2 +- .../ConvexDecompositionDotNet/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/Manager/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs | 2 +- .../Region/RegionCombinerModule/Properties/AssemblyInfo.cs | 2 +- .../Shared/Api/Implementation/Properties/AssemblyInfo.cs | 2 +- .../Shared/Api/Runtime/Properties/AssemblyInfo.cs | 2 +- .../Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs | 2 +- .../ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs | 2 +- .../ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs | 2 +- .../Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs | 2 +- OpenSim/Server/Base/Properties/AssemblyInfo.cs | 2 +- OpenSim/Server/Handlers/Properties/AssemblyInfo.cs | 2 +- OpenSim/Server/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/AssetService/Properties/AssemblyInfo.cs | 2 +- .../Services/AuthenticationService/Properties/AssemblyInfo.cs | 2 +- .../Services/AuthorizationService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Base/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Connectors/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Friends/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/GridService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs | 2 +- .../Services/UserAccountService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/Configger/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs | 2 +- ThirdParty/SmartThreadPool/AssemblyInfo.cs | 2 +- 70 files changed, 71 insertions(+), 71 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs index 57615ea2d3..b81c1e5f28 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs @@ -60,7 +60,7 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("0.7.5.*")] +// [assembly: AssemblyVersion("0.7.6.*")] -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] \ No newline at end of file diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs index 14527d9ea9..be6054d150 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs index 8ad948c9bd..3ec7a13883 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs index a681fb643f..4ff5fe1d9a 100644 --- a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Capabilities/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Properties/AssemblyInfo.cs index 26254f2fcf..f8a9daeac0 100644 --- a/OpenSim/Capabilities/Properties/AssemblyInfo.cs +++ b/OpenSim/Capabilities/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs index c240f90ca3..9c0c784838 100644 --- a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs +++ b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs index 1a67e704e5..4e96be8da4 100644 --- a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs index ab3fe36e52..7bfa28dd39 100644 --- a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs index 43b0bb3214..3931b3dab8 100644 --- a/OpenSim/Data/Null/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Null/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Data/Properties/AssemblyInfo.cs b/OpenSim/Data/Properties/AssemblyInfo.cs index 0da1a6b799..9f342ad571 100644 --- a/OpenSim/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs index c9a8553de6..ba52f8258b 100644 --- a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs index 02986d5d2a..b3db56c3ec 100644 --- a/OpenSim/Framework/AssemblyInfo.cs +++ b/OpenSim/Framework/AssemblyInfo.cs @@ -59,5 +59,5 @@ using System.Runtime.InteropServices; // Revision // -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] \ No newline at end of file diff --git a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs index 0498ed4888..077244d4e6 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs index 6d1c03ad4b..cf575ac63b 100644 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] [assembly : AssemblyFileVersion("0.6.5.0")] diff --git a/OpenSim/Framework/Configuration/HTTP/Properties/AssemblyInfo.cs b/OpenSim/Framework/Configuration/HTTP/Properties/AssemblyInfo.cs index 0674656c75..c3b6227e9c 100644 --- a/OpenSim/Framework/Configuration/HTTP/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Configuration/HTTP/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Configuration/XML/Properties/AssemblyInfo.cs b/OpenSim/Framework/Configuration/XML/Properties/AssemblyInfo.cs index 1095b232e2..b0d2d67424 100644 --- a/OpenSim/Framework/Configuration/XML/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Configuration/XML/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs index 37c7304424..c618454a7a 100644 --- a/OpenSim/Framework/Console/AssemblyInfo.cs +++ b/OpenSim/Framework/Console/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] diff --git a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs index 1f2bb4087a..bb83db1d73 100644 --- a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs index d670f2f129..f836350fec 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs index 7309a12e88..72fa67981a 100644 --- a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs index 11efa4beb7..7a122dadbe 100644 --- a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs index 02ecc250a1..386be2de5c 100644 --- a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs index 021f63c632..792c62e2c7 100644 --- a/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index c9d977008c..80568e0951 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - private const string VERSION_NUMBER = "0.7.5"; + private const string VERSION_NUMBER = "0.7.6"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs index 060a61c472..d29a00174e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs index af2f6f8e84..8f9dad35ba 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs index e72bd863a6..0b6ee2fcd0 100644 --- a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs index 5a8c4a2f34..f6353f913f 100644 --- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs @@ -30,7 +30,7 @@ using Mono.Addins; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: Addin("OpenSim.Region.CoreModules", "0.1")] diff --git a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs index b92626461d..0f083c7b35 100644 --- a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs index 9b504c0147..2a5828e072 100644 --- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs index 217b2d5556..00655312d1 100644 --- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs @@ -30,7 +30,7 @@ using Mono.Addins; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: Addin("OpenSim.Region.OptionalModules", "0.1")] diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index fb9cb66584..6fd6f7e1d5 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] diff --git a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs index 0d1db3bd7c..d240c71814 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs index 5ff945d370..cafd7f41f5 100644 --- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs index 36b4235729..5da39564d9 100644 --- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] diff --git a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs index 4cc17312e8..bd70296cb6 100644 --- a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs index 3c4f06ad16..f477ed1119 100644 --- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs index d07df02e2b..4289863ffa 100644 --- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] diff --git a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs index 085eb59e1b..ca945b579f 100644 --- a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs index d173db0ae9..3c01eecc89 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs index 573a80377f..b1825acb11 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs index f6d5d41040..342dbff3c8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs index c65caa872d..fd37753eb0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs index 470e1a1842..74747a2435 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs index e6e8777ed2..d08b0a6388 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs index bd26a8b61b..a8871715a1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs index 100cf99d9e..caa6d4e2a0 100644 --- a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Server/Base/Properties/AssemblyInfo.cs b/OpenSim/Server/Base/Properties/AssemblyInfo.cs index 4bbe358258..8b4556418e 100644 --- a/OpenSim/Server/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Base/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs index 53e9737def..d72d36a091 100644 --- a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Server/Properties/AssemblyInfo.cs b/OpenSim/Server/Properties/AssemblyInfo.cs index ebc10fbcf5..ee45e10a49 100644 --- a/OpenSim/Server/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs index 15094001f2..b57052c4d7 100644 --- a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs index 0eb2ba71eb..99c46ecb33 100644 --- a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs index 6d6b11e42b..33e48d3c3c 100644 --- a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs index 0944149c5f..8b0214a536 100644 --- a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/Base/Properties/AssemblyInfo.cs b/OpenSim/Services/Base/Properties/AssemblyInfo.cs index 306b699d4b..2825a8865e 100644 --- a/OpenSim/Services/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Base/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs index bfb681b4cd..73fc72c5a6 100644 --- a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs index 58c7283505..fdd4b694f5 100644 --- a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs index dddb091248..cb624f03db 100644 --- a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs index 5c0c8f4e85..09084d328d 100644 --- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs index 49f21769bd..fe1889d06f 100644 --- a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs index 4723553dd1..669e0b889c 100644 --- a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs index 41ad9f84c4..0870065ff3 100644 --- a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs index 62c6e0ff81..3ac8af7a1f 100644 --- a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs index 23eb6644de..69adf73a37 100644 --- a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs index 8c03dd7892..040bbe0640 100644 --- a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs index 24e1d16750..576ccce768 100644 --- a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs b/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs index e1a1fda568..b98e2d2712 100644 --- a/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs b/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs index 62a2f2d8ec..89aafa3b57 100644 --- a/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs index 20598f1b60..c4d278a2e7 100644 --- a/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ThirdParty/SmartThreadPool/AssemblyInfo.cs b/ThirdParty/SmartThreadPool/AssemblyInfo.cs index af9baff8af..e2465b032b 100644 --- a/ThirdParty/SmartThreadPool/AssemblyInfo.cs +++ b/ThirdParty/SmartThreadPool/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] // // In order to sign your assembly you must specify a key to use. Refer to the From 562067eb16e2e6f4d097cae7795c5c86d4064db7 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 5 Feb 2013 02:09:21 +0000 Subject: [PATCH 16/17] Fix bug where viewers would not see the "Module command functions not enabled" error if these were disabled and a viewer attempted to call one. This was not working because the shouter was wrongly signalled as an agent rather than a prim --- .../Shared/Api/Implementation/MOD_Api.cs | 64 ++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 90456721c0..2fe6948d23 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs @@ -29,8 +29,10 @@ using System; using System.Reflection; using System.Collections; using System.Collections.Generic; +using System.Reflection; using System.Runtime.Remoting.Lifetime; using System.Threading; +using log4net; using OpenMetaverse; using Nini.Config; using OpenSim; @@ -56,6 +58,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [Serializable] public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi { +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + internal IScriptEngine m_ScriptEngine; internal SceneObjectPart m_host; internal TaskInventoryItem m_item; @@ -109,8 +113,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (message.Length > 1023) message = message.Substring(0, 1023); - World.SimChat(Utils.StringToBytes(message), - ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); + World.SimChat( + Utils.StringToBytes(message), + ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, + m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); @@ -124,6 +130,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// string result of the invocation public void modInvokeN(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(string)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -133,6 +145,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String modInvokeS(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(string)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -143,6 +161,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer modInvokeI(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(int)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -153,6 +177,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float modInvokeF(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(float)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -163,6 +193,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key modInvokeK(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(UUID)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -173,6 +209,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector modInvokeV(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(OpenMetaverse.Vector3)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -183,6 +225,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation modInvokeR(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(OpenMetaverse.Quaternion)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -193,6 +241,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List modInvokeL(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(object[])) MODError(String.Format("return type mismatch for {0}",fname)); @@ -250,6 +304,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ""; } +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type[] signature = m_comms.LookupTypeSignature(fname); if (signature.Length != parms.Length) MODError(String.Format("wrong number of parameters to function {0}",fname)); From 2163bebeb40755b59b0b186f0d75aae5f16d8c84 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Feb 2013 20:09:02 +0000 Subject: [PATCH 17/17] Try to fix uploaded mesh rotations - code from Avination code base. --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index a534522b6b..6ebe660a34 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -641,25 +641,40 @@ namespace OpenSim.Region.ClientStack.Linden grp.AddPart(prim); } - // Fix first link number + Vector3 rootPos = positions[0]; + if (grp.Parts.Length > 1) + { + // Fix first link number grp.RootPart.LinkNum++; - Vector3 rootPos = positions[0]; - grp.AbsolutePosition = rootPos; - for (int i = 0; i < positions.Count; i++) + Quaternion rootRotConj = Quaternion.Conjugate(rotations[0]); + Quaternion tmprot; + Vector3 offset; + + // fix children rotations and positions + for (int i = 1; i < rotations.Count; i++) + { + tmprot = rotations[i]; + tmprot = rootRotConj * tmprot; + + grp.Parts[i].RotationOffset = tmprot; + + offset = positions[i] - rootPos; + + offset *= rootRotConj; + grp.Parts[i].OffsetPosition = offset; + } + + grp.AbsolutePosition = rootPos; + grp.UpdateGroupRotationR(rotations[0]); + } + else { - Vector3 offset = positions[i] - rootPos; - grp.Parts[i].OffsetPosition = offset; + grp.AbsolutePosition = rootPos; + grp.UpdateGroupRotationR(rotations[0]); } - for (int i = 0; i < rotations.Count; i++) - { - if (i != 0) - grp.Parts[i].RotationOffset = rotations[i]; - } - - grp.UpdateGroupRotationR(rotations[0]); data = ASCIIEncoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(grp)); }