Clear the texture list aswell when a new texture animation is loaded

This commit is contained in:
KillzXGaming 2019-07-14 10:17:55 -04:00
parent c9584baf33
commit d0c2ba1a3d
4 changed files with 4 additions and 0 deletions

Binary file not shown.

View file

@ -391,6 +391,8 @@ namespace Bfres.Structs
MaterialAnim = anim;
FrameCount = MaterialAnim.FrameCount;
Text = GetString(anim.Name);
Textures.Clear();
if (anim.TextureNames != null)
{
foreach (var name in anim.TextureNames)

View file

@ -166,6 +166,8 @@ namespace FirstPlugin
foreach (var KeyFrame in texturePatternCfg.CurveData.KeyFrames)
{
int Index = matAnim.TextureNames.IndexOf(KeyFrame.Value);
Console.WriteLine($"{Index} {KeyFrame.Value}");
curve.Frames[i] = KeyFrame.Key;
curve.Keys[i, 0] = Index;