public void OpenAnimSet()
        {
            SourceAnimSet = null;
            SourcePcc?.Dispose();
            SourcePcc = null;
            LiveFile?.Dispose();
            LiveFile = null;
            ActorTag = null;

            var dlg = new OpenFileDialog
            {
                Filter          = App.ME3ME2SaveFileFilter,
                CheckFileExists = true,
                Multiselect     = false,
                Title           = "Select ME3 file containing the FaceFXAnimSet you want to edit"
            };

            if (dlg.ShowDialog() == true)
            {
                try
                {
                    SourcePcc = MEPackageHandler.OpenME3Package(dlg.FileName);
                }
                catch (FormatException)
                {
                    MessageBox.Show("Must be an ME3 file!");
                    return;
                }

                if (EntrySelector.GetEntry <ExportEntry>(null, SourcePcc, "Choose FaceFxAnimSet to edit", exp => exp.ClassName == "FaceFXAnimSet") is ExportEntry animSetEntry)
                {
                    SourceAnimSet = animSetEntry.GetBinaryData <FaceFXAnimSet>();
                }
            }
        }
Beispiel #2
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int n = listBox1.SelectedIndex;

            if (n == -1)
            {
                return;
            }
            hb1.ByteProvider = new DynamicByteProvider(pcc.Exports[Objects[n]].Data);
            FaceFX           = new FaceFXAnimSet(pcc, Objects[n]);
            treeView1.Nodes.Clear();
            treeView1.Nodes.Add(FaceFX.HeaderToTree());
            treeView2.Nodes.Clear();
            treeView2.Nodes.Add(FaceFX.DataToTree());
        }