public override void Replace(string FileName) { string ext = Utils.GetExtension(FileName); if (ext == ".bfmaa") { MaterialAnim.Import(FileName); MaterialAnim.Name = Text; LoadAnim(MaterialAnim); } else if (ext == ".yaml") { MaterialAnim = YamlFmaa.FromYaml(FileName); MaterialAnim.Name = Text; LoadAnim(MaterialAnim); } else if (ext == ".gif" || ext == ".png" || ext == ".apng") { BNTX bntx = PluginRuntime.bntxContainers[0]; GifToTexturePatternAnimation anim = new GifToTexturePatternAnimation(FileName, bntx, this); MaterialAnim.Name = Text; LoadAnim(MaterialAnim); } UpdateEditor(); }
private void Replace(object sender, EventArgs args) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Supported Formats|*.bfmaa;"; if (ofd.ShowDialog() == DialogResult.OK) { MaterialAnim.Import(ofd.FileName); } MaterialAnim.Name = Text; }