Stopped storing dynamic attributes in the PrimShape
parent
8b4441d940
commit
fdec05a15e
|
@ -409,7 +409,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID)
|
||||||
PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
|
PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
|
||||||
PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
|
PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
|
||||||
ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow,
|
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
|
WHERE UUID = @UUID
|
||||||
END
|
END
|
||||||
ELSE
|
ELSE
|
||||||
|
@ -418,11 +418,11 @@ ELSE
|
||||||
primshapes (
|
primshapes (
|
||||||
UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
|
UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
|
||||||
PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin,
|
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 (
|
) VALUES (
|
||||||
@UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
|
@UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
|
||||||
@PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin,
|
@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";
|
END";
|
||||||
|
|
||||||
|
@ -1754,11 +1754,6 @@ VALUES
|
||||||
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
|
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;
|
return baseShape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2153,8 +2148,6 @@ VALUES
|
||||||
parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
|
parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters.Add(_Database.CreateParameter("DynAttrs", s.DynAttrs.ToXml()));
|
|
||||||
|
|
||||||
return parameters.ToArray();
|
return parameters.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1154,6 +1154,5 @@ COMMIT
|
||||||
BEGIN TRANSACTION
|
BEGIN TRANSACTION
|
||||||
|
|
||||||
ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
|
ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
|
||||||
ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT;
|
|
||||||
|
|
||||||
COMMIT
|
COMMIT
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"PathTaperX, PathTaperY, PathTwist, " +
|
"PathTaperX, PathTaperY, PathTwist, " +
|
||||||
"PathTwistBegin, ProfileBegin, ProfileEnd, " +
|
"PathTwistBegin, ProfileBegin, ProfileEnd, " +
|
||||||
"ProfileCurve, ProfileHollow, Texture, " +
|
"ProfileCurve, ProfileHollow, Texture, " +
|
||||||
"ExtraParams, State, Media, DynAttrs) " +
|
"ExtraParams, State, Media) " +
|
||||||
"values (?UUID, " +
|
"values (?UUID, " +
|
||||||
"?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
|
"?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
|
||||||
"?PCode, ?PathBegin, ?PathEnd, " +
|
"?PCode, ?PathBegin, ?PathEnd, " +
|
||||||
|
@ -233,7 +233,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"?PathTwistBegin, ?ProfileBegin, " +
|
"?PathTwistBegin, ?ProfileBegin, " +
|
||||||
"?ProfileEnd, ?ProfileCurve, " +
|
"?ProfileEnd, ?ProfileCurve, " +
|
||||||
"?ProfileHollow, ?Texture, ?ExtraParams, " +
|
"?ProfileHollow, ?Texture, ?ExtraParams, " +
|
||||||
"?State, ?Media, ?DynAttrs)";
|
"?State, ?Media)";
|
||||||
|
|
||||||
FillShapeCommand(cmd, prim);
|
FillShapeCommand(cmd, prim);
|
||||||
|
|
||||||
|
@ -1838,11 +1838,6 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
if (!(row["Media"] is System.DBNull))
|
if (!(row["Media"] is System.DBNull))
|
||||||
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -1887,7 +1882,6 @@ namespace OpenSim.Data.MySQL
|
||||||
cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
|
cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
|
||||||
cmd.Parameters.AddWithValue("State", s.State);
|
cmd.Parameters.AddWithValue("State", s.State);
|
||||||
cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
|
cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
|
||||||
cmd.Parameters.AddWithValue("DynAttrs", s.DynAttrs.ToXml());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
|
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
|
||||||
|
|
|
@ -908,6 +908,5 @@ COMMIT;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
||||||
ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
|
ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
|
||||||
ALTER TABLE primshapes ADD COLUMN DynAttrs TEXT;
|
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
|
@ -1282,7 +1282,6 @@ namespace OpenSim.Data.SQLite
|
||||||
createCol(shapes, "Texture", typeof(Byte[]));
|
createCol(shapes, "Texture", typeof(Byte[]));
|
||||||
createCol(shapes, "ExtraParams", typeof(Byte[]));
|
createCol(shapes, "ExtraParams", typeof(Byte[]));
|
||||||
createCol(shapes, "Media", typeof(String));
|
createCol(shapes, "Media", typeof(String));
|
||||||
createCol(shapes, "DynAttrs", typeof(String));
|
|
||||||
|
|
||||||
shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] };
|
shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] };
|
||||||
|
|
||||||
|
@ -2406,11 +2405,6 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
if (!(row["Media"] is System.DBNull))
|
if (!(row["Media"] is System.DBNull))
|
||||||
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -2458,8 +2452,6 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
if (s.Media != null)
|
if (s.Media != null)
|
||||||
row["Media"] = s.Media.ToXml();
|
row["Media"] = s.Media.ToXml();
|
||||||
|
|
||||||
row["DynAttrs"] = s.DynAttrs.ToXml();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -82,11 +82,6 @@ namespace OpenSim.Framework
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
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();
|
private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Dynamic attributes can be created and deleted as required.
|
|
||||||
/// </summary>
|
|
||||||
public DAMap DynAttrs { get; set; }
|
|
||||||
|
|
||||||
private byte[] m_textureEntry;
|
private byte[] m_textureEntry;
|
||||||
|
|
||||||
|
@ -199,7 +194,6 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
PCode = (byte)PCodeEnum.Primitive;
|
PCode = (byte)PCodeEnum.Primitive;
|
||||||
m_textureEntry = DEFAULT_TEXTURE;
|
m_textureEntry = DEFAULT_TEXTURE;
|
||||||
DynAttrs = new DAMap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -211,7 +205,6 @@ namespace OpenSim.Framework
|
||||||
// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID);
|
// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID);
|
||||||
|
|
||||||
PCode = (byte)prim.PrimData.PCode;
|
PCode = (byte)prim.PrimData.PCode;
|
||||||
DynAttrs = new DAMap();
|
|
||||||
|
|
||||||
State = prim.PrimData.State;
|
State = prim.PrimData.State;
|
||||||
PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
|
PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
|
||||||
|
|
Loading…
Reference in New Issue