aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorOren Hurvitz2013-01-22 08:49:36 +0200
committerJustin Clark-Casey (justincc)2013-01-25 04:03:20 +0000
commitfdec05a15ef126f344c03427e9ef264b4248646b (patch)
treecf3f1813727d0700fb342ebe11b63c70b5692e7a /OpenSim
parentChanged DAMap to be the container of "data stores", which are OSDMaps. Store ... (diff)
downloadopensim-SC_OLD-fdec05a15ef126f344c03427e9ef264b4248646b.zip
opensim-SC_OLD-fdec05a15ef126f344c03427e9ef264b4248646b.tar.gz
opensim-SC_OLD-fdec05a15ef126f344c03427e9ef264b4248646b.tar.bz2
opensim-SC_OLD-fdec05a15ef126f344c03427e9ef264b4248646b.tar.xz
Stopped storing dynamic attributes in the PrimShape
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs13
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations1
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs10
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations1
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs8
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs7
6 files changed, 5 insertions, 35 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index e0e260d..24252ad 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)
409 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, 409 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
410 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, 410 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
411 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, 411 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow,
412 Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media, DynAttrs = @DynAttrs 412 Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media
413 WHERE UUID = @UUID 413 WHERE UUID = @UUID
414 END 414 END
415ELSE 415ELSE
@@ -418,11 +418,11 @@ ELSE
418 primshapes ( 418 primshapes (
419 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, 419 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
420 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, 420 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin,
421 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media, DynAttrs 421 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media
422 ) VALUES ( 422 ) VALUES (
423 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, 423 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
424 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, 424 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin,
425 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media, @DynAttrs 425 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media
426 ) 426 )
427 END"; 427 END";
428 428
@@ -1754,11 +1754,6 @@ VALUES
1754 baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); 1754 baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
1755 } 1755 }
1756 1756
1757 if (!(shapeRow["DynAttrs"] is System.DBNull))
1758 baseShape.DynAttrs = DAMap.FromXml((string)shapeRow["DynAttrs"]);
1759 else
1760 baseShape.DynAttrs = new DAMap();
1761
1762 return baseShape; 1757 return baseShape;
1763 } 1758 }
1764 1759
@@ -2153,8 +2148,6 @@ VALUES
2153 parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); 2148 parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
2154 } 2149 }
2155 2150
2156 parameters.Add(_Database.CreateParameter("DynAttrs", s.DynAttrs.ToXml()));
2157
2158 return parameters.ToArray(); 2151 return parameters.ToArray();
2159 } 2152 }
2160 2153
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
index 5e88e36..92cc38a 100644
--- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
@@ -1154,6 +1154,5 @@ COMMIT
1154BEGIN TRANSACTION 1154BEGIN TRANSACTION
1155 1155
1156ALTER TABLE prims ADD COLUMN DynAttrs TEXT; 1156ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
1157ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT;
1158 1157
1159COMMIT 1158COMMIT
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 77fa1ec..1a6a0fb 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -221,7 +221,7 @@ namespace OpenSim.Data.MySQL
221 "PathTaperX, PathTaperY, PathTwist, " + 221 "PathTaperX, PathTaperY, PathTwist, " +
222 "PathTwistBegin, ProfileBegin, ProfileEnd, " + 222 "PathTwistBegin, ProfileBegin, ProfileEnd, " +
223 "ProfileCurve, ProfileHollow, Texture, " + 223 "ProfileCurve, ProfileHollow, Texture, " +
224 "ExtraParams, State, Media, DynAttrs) " + 224 "ExtraParams, State, Media) " +
225 "values (?UUID, " + 225 "values (?UUID, " +
226 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + 226 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
227 "?PCode, ?PathBegin, ?PathEnd, " + 227 "?PCode, ?PathBegin, ?PathEnd, " +
@@ -233,7 +233,7 @@ namespace OpenSim.Data.MySQL
233 "?PathTwistBegin, ?ProfileBegin, " + 233 "?PathTwistBegin, ?ProfileBegin, " +
234 "?ProfileEnd, ?ProfileCurve, " + 234 "?ProfileEnd, ?ProfileCurve, " +
235 "?ProfileHollow, ?Texture, ?ExtraParams, " + 235 "?ProfileHollow, ?Texture, ?ExtraParams, " +
236 "?State, ?Media, ?DynAttrs)"; 236 "?State, ?Media)";
237 237
238 FillShapeCommand(cmd, prim); 238 FillShapeCommand(cmd, prim);
239 239
@@ -1838,11 +1838,6 @@ namespace OpenSim.Data.MySQL
1838 1838
1839 if (!(row["Media"] is System.DBNull)) 1839 if (!(row["Media"] is System.DBNull))
1840 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 1840 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
1841
1842 if (!(row["DynAttrs"] is System.DBNull))
1843 s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1844 else
1845 s.DynAttrs = new DAMap();
1846 1841
1847 return s; 1842 return s;
1848 } 1843 }
@@ -1887,7 +1882,6 @@ namespace OpenSim.Data.MySQL
1887 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); 1882 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
1888 cmd.Parameters.AddWithValue("State", s.State); 1883 cmd.Parameters.AddWithValue("State", s.State);
1889 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); 1884 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
1890 cmd.Parameters.AddWithValue("DynAttrs", s.DynAttrs.ToXml());
1891 } 1885 }
1892 1886
1893 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) 1887 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 1a38836..c48aec2 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -908,6 +908,5 @@ COMMIT;
908BEGIN; 908BEGIN;
909 909
910ALTER TABLE prims ADD COLUMN DynAttrs TEXT; 910ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
911ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT;
912 911
913COMMIT; 912COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 6875ed6..fda7728 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1282,7 +1282,6 @@ namespace OpenSim.Data.SQLite
1282 createCol(shapes, "Texture", typeof(Byte[])); 1282 createCol(shapes, "Texture", typeof(Byte[]));
1283 createCol(shapes, "ExtraParams", typeof(Byte[])); 1283 createCol(shapes, "ExtraParams", typeof(Byte[]));
1284 createCol(shapes, "Media", typeof(String)); 1284 createCol(shapes, "Media", typeof(String));
1285 createCol(shapes, "DynAttrs", typeof(String));
1286 1285
1287 shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] }; 1286 shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] };
1288 1287
@@ -2406,11 +2405,6 @@ namespace OpenSim.Data.SQLite
2406 2405
2407 if (!(row["Media"] is System.DBNull)) 2406 if (!(row["Media"] is System.DBNull))
2408 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 2407 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
2409
2410 if (!(row["DynAttrs"] is System.DBNull))
2411 s.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
2412 else
2413 s.DynAttrs = new DAMap();
2414 2408
2415 return s; 2409 return s;
2416 } 2410 }
@@ -2458,8 +2452,6 @@ namespace OpenSim.Data.SQLite
2458 2452
2459 if (s.Media != null) 2453 if (s.Media != null)
2460 row["Media"] = s.Media.ToXml(); 2454 row["Media"] = s.Media.ToXml();
2461
2462 row["DynAttrs"] = s.DynAttrs.ToXml();
2463 } 2455 }
2464 2456
2465 /// <summary> 2457 /// <summary>
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 775412b..4c36819 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -82,11 +82,6 @@ namespace OpenSim.Framework
82 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 82 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
83 83
84 private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes(); 84 private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes();
85
86 /// <summary>
87 /// Dynamic attributes can be created and deleted as required.
88 /// </summary>
89 public DAMap DynAttrs { get; set; }
90 85
91 private byte[] m_textureEntry; 86 private byte[] m_textureEntry;
92 87
@@ -199,7 +194,6 @@ namespace OpenSim.Framework
199 { 194 {
200 PCode = (byte)PCodeEnum.Primitive; 195 PCode = (byte)PCodeEnum.Primitive;
201 m_textureEntry = DEFAULT_TEXTURE; 196 m_textureEntry = DEFAULT_TEXTURE;
202 DynAttrs = new DAMap();
203 } 197 }
204 198
205 /// <summary> 199 /// <summary>
@@ -211,7 +205,6 @@ namespace OpenSim.Framework
211// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); 205// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID);
212 206
213 PCode = (byte)prim.PrimData.PCode; 207 PCode = (byte)prim.PrimData.PCode;
214 DynAttrs = new DAMap();
215 208
216 State = prim.PrimData.State; 209 State = prim.PrimData.State;
217 PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); 210 PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);