public void Load(Stream stream) { CanSave = true; IsSaveDialog = IFileInfo != null && IFileInfo.InArchive; aampFile = AampFile.LoadFile(stream); }
static void Main(string[] args) { var aamp = "g3ds_packunslider.bgenv"; AampFile file = AampFile.LoadFile(aamp); GetChildNodes(file.RootNode); ToYaml(file); file.Save("New.aamp"); Console.Read(); }
public AglLightMap(Stream stream) { var aamp = AampFile.LoadFile(stream); LightAreas.Clear(); foreach (var ob in aamp.RootNode.paramObjects) { if (ob.HashString == "lut_param") { //32 curves. for (int i = 0; i < 32; i++) { LUTParameter param = new LUTParameter(); param.Name = ob.GetEntryValue <StringEntry>($"name{i}").ToString(); param.Intensity = GetCurve(ob, $"intensity{i}")[0]; LutTable[i] = param; } } } foreach (var lightAreaParam in aamp.RootNode.childParams) { var lightArea = new LightArea(); LightAreas.Add(lightArea); foreach (var ob in lightAreaParam.paramObjects) { if (ob.HashString == "setting") { lightArea.Settings = new LightSettings(ob); } } foreach (var c in lightAreaParam.childParams) { if (c.HashString == "env_obj_ref_array") { foreach (var childObj in c.paramObjects) { lightArea.Lights.Add(new LightEnvObject(childObj)); } } } } Console.WriteLine(); }
private ColorCorrection LoadColorCorrection(Stream file) { var aamp = AampFile.LoadFile(file); return(new ColorCorrection(aamp)); }
private CubeMapGraphics LoadCubemapGraphics(Stream file) { var aamp = AampFile.LoadFile(file); return(new CubeMapGraphics(aamp)); }
private ShadowGraphics LoadShadowGraphics(Stream file) { var aamp = AampFile.LoadFile(file); return(new ShadowGraphics(aamp)); }
private EnvironmentGraphics LoadEnvironmentGraphics(Stream file) { var aamp = AampFile.LoadFile(file); return(new EnvironmentGraphics(aamp)); }
public static void Prepare(byte[] fileData) { ProbeLighting = new ProbeLighting(); ProbeLighting.LoadValues(AampFile.LoadFile(new System.IO.MemoryStream(fileData))); }