fix problem persisting when only one face had a media texture
parent
7691a638e3
commit
d4684da8bd
|
@ -1867,7 +1867,10 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
List<MediaEntry> mediaEntries = new List<MediaEntry>();
|
List<MediaEntry> mediaEntries = new List<MediaEntry>();
|
||||||
foreach (OSD osdMe in osdMeArray)
|
foreach (OSD osdMe in osdMeArray)
|
||||||
mediaEntries.Add(MediaEntry.FromOSD(osdMe));
|
{
|
||||||
|
MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
|
||||||
|
mediaEntries.Add(me);
|
||||||
|
}
|
||||||
|
|
||||||
s.Media = mediaEntries;
|
s.Media = mediaEntries;
|
||||||
}
|
}
|
||||||
|
@ -1918,7 +1921,10 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
OSDArray meArray = new OSDArray();
|
OSDArray meArray = new OSDArray();
|
||||||
foreach (MediaEntry me in s.Media)
|
foreach (MediaEntry me in s.Media)
|
||||||
meArray.Add(me.GetOSD());
|
{
|
||||||
|
OSD osd = (null == me ? new OSD() : me.GetOSD());
|
||||||
|
meArray.Add(osd);
|
||||||
|
}
|
||||||
|
|
||||||
row["Media"] = OSDParser.SerializeLLSDXmlString(meArray);
|
row["Media"] = OSDParser.SerializeLLSDXmlString(meArray);
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,6 +212,13 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
|
m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
|
||||||
|
|
||||||
|
// for (int i = 0; i < omu.FaceMedia.Length; i++)
|
||||||
|
// {
|
||||||
|
// MediaEntry me = omu.FaceMedia[i];
|
||||||
|
// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD()));
|
||||||
|
// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v);
|
||||||
|
// }
|
||||||
|
|
||||||
part.Shape.Media = new List<MediaEntry>(omu.FaceMedia);
|
part.Shape.Media = new List<MediaEntry>(omu.FaceMedia);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue