public OSD ToOSD() { OSDArray array = new OSDArray(4) { null, null, null, null }; array[0] = new OSDMap { { "regionID", RegionID } }; Cycle.ToOSD(ref array); Water.ToOSD(ref array); return(array); }
public byte[] GetDefaultAssetData(int type) { OSD osddata; switch (type) { case 0: SkyData sky = new SkyData(); sky.Name = "DefaultSky"; osddata = sky.ToOSD(); break; case 1: WaterData water = new WaterData(); water.Name = "DefaultWater"; osddata = water.ToOSD(); break; case 2: DayCycle day = new DayCycle(); day.Name = "New Daycycle"; DayCycle.TrackEntry te = new DayCycle.TrackEntry(); WaterData dwater = new WaterData(); dwater.Name = "DefaultWater"; day.waterframes["DefaultWater"] = dwater; te.time = 0; te.frameName = "DefaultWater"; day.waterTrack.Add(te); SkyData dsky = new SkyData(); dsky.Name = "DefaultSky"; day.skyframes["DefaultSky"] = dsky; te.time = 0; te.frameName = "DefaultSky"; day.skyTrack0.Add(te); osddata = day.ToOSD(); break; default: return(null); } return(OSDParser.SerializeLLSDNotationToBytes(osddata, true)); }