mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Fix Texture SRT/shader param animation playing in viewport.
This commit is contained in:
parent
8b052bf4b4
commit
7176063af3
7 changed files with 21 additions and 14 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -83,18 +83,23 @@ namespace FirstPlugin.Forms
|
|||
{
|
||||
if (IsKeyed(paramAnim, Frame))
|
||||
{
|
||||
/* var item1 = new ListViewItem($"{Frame}");
|
||||
var item1 = new ListViewItem($"{Frame}");
|
||||
listViewCustom1.Items.Add(item1);
|
||||
|
||||
foreach (var track in paramAnim.Values)
|
||||
{
|
||||
var keyFrame = track.GetKeyFrame(Frame);
|
||||
var keyFrame = track.GetKeyFrame(Frame, false);
|
||||
|
||||
if (keyFrame != null)
|
||||
{
|
||||
if (track.AnimDataOffset == (uint)TexSRT.Mode)
|
||||
item1.SubItems.Add(((uint)keyFrame.Value).ToString());
|
||||
else
|
||||
item1.SubItems.Add(keyFrame.Value.ToString());
|
||||
}*/
|
||||
}
|
||||
else
|
||||
item1.SubItems.Add("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,15 +115,19 @@ namespace FirstPlugin.Forms
|
|||
{
|
||||
if (IsKeyed(paramAnim, Frame))
|
||||
{
|
||||
/* var item1 = new ListViewItem($"{Frame}");
|
||||
var item1 = new ListViewItem($"{Frame}");
|
||||
listViewCustom1.Items.Add(item1);
|
||||
|
||||
foreach (var track in paramAnim.Values)
|
||||
{
|
||||
var keyFrame = track.GetKeyFrame(Frame);
|
||||
|
||||
if (keyFrame != null)
|
||||
item1.SubItems.Add(keyFrame.Value.ToString());
|
||||
}*/
|
||||
else
|
||||
item1.SubItems.Add("");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +137,7 @@ namespace FirstPlugin.Forms
|
|||
{
|
||||
foreach (var track in paramKeyGroup.Values)
|
||||
{
|
||||
if (track.GetKeyFrame(Frame).IsKeyed == true)
|
||||
if (track.GetKeyFrame(Frame, false) != null && track.GetKeyFrame(Frame).IsKeyed == true)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -137,8 +137,6 @@ namespace Switch_Toolbox.Library.Animations
|
|||
|
||||
public bool HasKeyedFrames(float frame)
|
||||
{
|
||||
return false;
|
||||
|
||||
return (XPOS.HasAnimation() && XPOS.GetKeyFrame(frame).IsKeyed ||
|
||||
YPOS.HasAnimation() && YPOS.GetKeyFrame(frame).IsKeyed ||
|
||||
ZPOS.HasAnimation() && ZPOS.GetKeyFrame(frame).IsKeyed ||
|
||||
|
@ -291,7 +289,7 @@ namespace Switch_Toolbox.Library.Animations
|
|||
}
|
||||
}
|
||||
|
||||
public KeyFrame GetKeyFrame(float frame)
|
||||
public KeyFrame GetKeyFrame(float frame, bool InsertNewKey = true)
|
||||
{
|
||||
KeyFrame key = null;
|
||||
int i;
|
||||
|
@ -308,7 +306,7 @@ namespace Switch_Toolbox.Library.Animations
|
|||
}
|
||||
}
|
||||
|
||||
if (key == null)
|
||||
if (key == null && InsertNewKey)
|
||||
{
|
||||
key = new KeyFrame();
|
||||
key.Frame = frame;
|
||||
|
|
Loading…
Reference in a new issue