1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Fix the frame value for bfres texture pattern animatons in viewport.

This commit is contained in:
KillzXGaming 2019-10-16 19:21:47 -04:00
parent 2df06f463d
commit 8153975f2e
3 changed files with 3 additions and 4 deletions

View File

@ -650,9 +650,6 @@ namespace Bfres.Structs
if (texture.SamplerName == samplerAnim.Text)
{
texture.textureState = STGenericMatTexture.TextureState.Animated;
Console.WriteLine($"Frame " + Frame);
texture.animatedTexName = samplerAnim.GetActiveTextureNameByFrame(Frame);
}
}

View File

@ -155,6 +155,7 @@ namespace FirstPlugin
var GXPaletteFormat = (Decode_Gamecube.PaletteFormats)palette.PaletteFormat;
Console.WriteLine($"GXPaletteFormat {GXPaletteFormat}");
texWrapper.SetPaletteData(palette.Data, Decode_Gamecube.ToGenericPaletteFormat(GXPaletteFormat));
}

View File

@ -75,7 +75,8 @@ namespace Toolbox.Library.Animations
public virtual string GetActiveTextureNameByFrame(float frame)
{
return MaterialAnimation.Textures[(int)GetValue(frame)];
var keyFrame = GetKeyFrame(frame);
return MaterialAnimation.Textures[(int)keyFrame.Value];
}
public virtual void SetActiveTextureName(int Frame, string TextureName)