1
0
mirror of synced 2024-12-01 02:27:22 +01:00

Add .anim support from forge for testing, and fix export filter

This commit is contained in:
KillzXGaming 2019-05-25 13:03:54 -04:00
parent 6cf95bf4bb
commit 7e16f21975
8 changed files with 16 additions and 3 deletions

Binary file not shown.

View File

@ -141,6 +141,16 @@ namespace Bfres.Structs
else
throw new Exception("No skeleton found to assign!");
}
else if (ext == ".anim")
{
STSkeleton skeleton = GetActiveSkeleton();
if (skeleton != null)
ANIM.CreateANIM(FileName, this, skeleton);
else
throw new Exception("No skeleton found to assign!");
}
else if (ext == ".seanim")
{
STSkeleton skeleton = GetActiveSkeleton();

View File

@ -21,7 +21,7 @@ namespace FirstPlugin
public static string BONE = GetFilter(".bfbon");
public static string FMAT = GetFilter(".bfmat");
public static string FSKA_EXPORT = GetFilter(".bfska", ".seanim", ".smd", ".chr0");
public static string FSKA_EXPORT = GetFilter(".bfska", ".anim", ".seanim", ".smd", ".chr0");
public static string FSKA_REPLACE = GetFilter(".bfska", ".chr0");
public static string FMAA = GetFilter(".bfmaa", ".gif");
@ -48,7 +48,7 @@ namespace FirstPlugin
else if (type == typeof(FMAT)) return FMAT;
else if (type == typeof(FSKL)) return FSKL;
else if (type == typeof(BfresBone)) return BONE;
else if (type == typeof(FMAA) && IsExporting) return FSKA_EXPORT;
else if (type == typeof(FSKA) && IsExporting) return FSKA_EXPORT;
else if (type == typeof(FSKA)) return FSKA_REPLACE;
else if (type == typeof(FMAA)) return FMAA;
else if (type == typeof(FTXP)) return FTXP;
@ -122,6 +122,7 @@ namespace FirstPlugin
case ".bftex": filters.Add(ext, "Binary Texture"); break;
case ".astc": filters.Add(ext, "Adaptable Scalable Texture Compression"); break;
case ".chr0": filters.Add(ext, "CHR0 Animation"); break;
case ".anim": filters.Add(ext, "Maya Animation"); break;
default:
filters.Add(ext, ""); break;
}

View File

@ -6,9 +6,11 @@ using System.Windows.Forms;
namespace Switch_Toolbox.Library.Animations
{
//Todo rewrite this
//Currently from forge
//https://github.com/jam1garner/Smash-Forge/blob/3a5b770a96b2ba7e67ff3912ca23941851f6d9eb/Smash%20Forge/Filetypes/Animation/ANIM.cs
public class ANIM
{
private class AnimKey{
public float input, output;
public string intan, outtan;