diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index 1c91d42616..e81b33a001 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -399,3 +399,9 @@ COMMIT; BEGIN; ALTER TABLE `land` ADD COLUMN `environment` TEXT default NULL; COMMIT; + +:VERSION 40 #----- sop animations and materials +BEGIN; +ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL; +ALTER TABLE `primshapes` ADD COLUMN `MatOvrd` blob default NULL; +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 28bc0ee255..c61a11e1f9 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1251,6 +1251,7 @@ namespace OpenSim.Data.SQLite createCol(prims, "sitactrange", typeof(float)); createCol(prims, "pseudocrc", typeof(int)); + createCol(prims, "sopanims", typeof(byte[])); // Add in contraints prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; @@ -1300,7 +1301,7 @@ namespace OpenSim.Data.SQLite createCol(shapes, "Texture", typeof(Byte[])); createCol(shapes, "ExtraParams", typeof(Byte[])); createCol(shapes, "Media", typeof(String)); - + createCol(shapes, "NatOvrd", typeof(byte[])); shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] }; return shapes; @@ -1798,6 +1799,19 @@ namespace OpenSim.Data.SQLite if(pseudocrc != 0) prim.PseudoCRC = pseudocrc; + if (row["sopanims"] is not DBNull) + { + byte[] data = (byte[])row["sopanims"]; + if (data.Length > 0) + prim.DeSerializeAnimations(data); + else + prim.Animations = null; + } + else + { + prim.Animations = null; + } + return prim; } @@ -2189,6 +2203,8 @@ namespace OpenSim.Data.SQLite row["PhysInertia"] = String.Empty; row["pseudocrc"] = prim.PseudoCRC; + row["sopanims"] = prim.SerializeAnimations(); + } /// @@ -2398,6 +2414,11 @@ namespace OpenSim.Data.SQLite if (row["Media"] is not System.DBNull) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); + if (row["MatOvrd"] is not System.DBNull) + s.RenderMaterialsOvrFromRawBin((byte[])row["MatOvrd"]); + else + s.RenderMaterialsOvrFromRawBin(null); + return s; } @@ -2445,6 +2466,8 @@ namespace OpenSim.Data.SQLite if (s.Media is not null) row["Media"] = s.Media.ToXml(); + + row["MatOvrd"] = s.RenderMaterialsOvrToRawBin(); } ///