aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteSimulationData.cs
diff options
context:
space:
mode:
authorteravus2013-06-11 08:56:20 -0500
committerteravus2013-06-11 08:56:20 -0500
commitd47a18fd09cfa7abc5fbd646a7a8edbec12c870c (patch)
treed069d79cbcad4cb4b43fe8e37c02fd8b19db0eb5 /OpenSim/Data/SQLite/SQLiteSimulationData.cs
parentAdjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Add... (diff)
downloadopensim-SC-d47a18fd09cfa7abc5fbd646a7a8edbec12c870c.zip
opensim-SC-d47a18fd09cfa7abc5fbd646a7a8edbec12c870c.tar.gz
opensim-SC-d47a18fd09cfa7abc5fbd646a7a8edbec12c870c.tar.bz2
opensim-SC-d47a18fd09cfa7abc5fbd646a7a8edbec12c870c.tar.xz
* Adds KeyFrameMotion storage support to SQLite, just a note, seems that there's still something wrong with keyframed motion starting when the sim starts up, you have to 'select' and 'deselect' the prim again to get it to appear to move. Not sure what this is but maybe melanie_t can comment on this.
* Has a prim table migration.. that might take a while, hold on to your hats. * Fixes a null-ref when shutting down while keyframed motion is active.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index d4734a6..70b76c9 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -732,6 +732,8 @@ namespace OpenSim.Data.SQLite
732 } 732 }
733 733
734 SceneObjectGroup group = new SceneObjectGroup(prim); 734 SceneObjectGroup group = new SceneObjectGroup(prim);
735 if (prim.KeyframeMotion != null)
736 prim.KeyframeMotion.UpdateSceneObject(group);
735 createdObjects.Add(group.UUID, group); 737 createdObjects.Add(group.UUID, group);
736 retvals.Add(group); 738 retvals.Add(group);
737 LoadItems(prim); 739 LoadItems(prim);
@@ -1241,6 +1243,7 @@ namespace OpenSim.Data.SQLite
1241 createCol(prims, "Friction", typeof(Double)); 1243 createCol(prims, "Friction", typeof(Double));
1242 createCol(prims, "Restitution", typeof(Double)); 1244 createCol(prims, "Restitution", typeof(Double));
1243 1245
1246 createCol(prims, "KeyframeMotion", typeof(Byte[]));
1244 // Add in contraints 1247 // Add in contraints
1245 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1248 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
1246 1249
@@ -1736,6 +1739,20 @@ namespace OpenSim.Data.SQLite
1736 prim.Friction = Convert.ToSingle(row["Friction"]); 1739 prim.Friction = Convert.ToSingle(row["Friction"]);
1737 prim.Restitution = Convert.ToSingle(row["Restitution"]); 1740 prim.Restitution = Convert.ToSingle(row["Restitution"]);
1738 1741
1742
1743 if (!(row["KeyframeMotion"] is DBNull))
1744 {
1745 Byte[] data = (byte[])row["KeyframeMotion"];
1746 if (data.Length > 0)
1747 prim.KeyframeMotion = KeyframeMotion.FromData(null, data);
1748 else
1749 prim.KeyframeMotion = null;
1750 }
1751 else
1752 {
1753 prim.KeyframeMotion = null;
1754 }
1755
1739 return prim; 1756 return prim;
1740 } 1757 }
1741 1758
@@ -2168,6 +2185,13 @@ namespace OpenSim.Data.SQLite
2168 row["GravityModifier"] = (double)prim.GravityModifier; 2185 row["GravityModifier"] = (double)prim.GravityModifier;
2169 row["Friction"] = (double)prim.Friction; 2186 row["Friction"] = (double)prim.Friction;
2170 row["Restitution"] = (double)prim.Restitution; 2187 row["Restitution"] = (double)prim.Restitution;
2188
2189 if (prim.KeyframeMotion != null)
2190 row["KeyframeMotion"] = prim.KeyframeMotion.Serialize();
2191 else
2192 row["KeyframeMotion"] = new Byte[0];
2193
2194
2171 } 2195 }
2172 2196
2173 /// <summary> 2197 /// <summary>