mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
Switch to viewport only if models are present. Fix tex2 swizzle value not loading
This commit is contained in:
parent
0c37b03bb7
commit
c8b77411fa
10 changed files with 6 additions and 10 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -174,9 +174,11 @@ namespace FirstPlugin
|
|||
{
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor));
|
||||
|
||||
bool HasModels = BFRESRender.models.Count > 0;
|
||||
|
||||
if (bfresEditor == null)
|
||||
{
|
||||
bfresEditor = new BfresEditor();
|
||||
bfresEditor = new BfresEditor(HasModels);
|
||||
bfresEditor.Dock = DockStyle.Fill;
|
||||
LibraryGUI.Instance.LoadEditor(bfresEditor);
|
||||
}
|
||||
|
|
|
@ -133,8 +133,6 @@ namespace Bfres.Structs
|
|||
if (Tex2Swizzle != 0)
|
||||
setting.swizzle = Tex2Swizzle;
|
||||
|
||||
setting.swizzle = 0;
|
||||
|
||||
importer.LoadSetting(setting);
|
||||
|
||||
if (importer.ShowDialog() == DialogResult.OK)
|
||||
|
@ -194,8 +192,6 @@ namespace Bfres.Structs
|
|||
if (Tex2Swizzle != 0)
|
||||
setting.swizzle = Tex2Swizzle;
|
||||
|
||||
setting.swizzle = 0;
|
||||
|
||||
importer.LoadSetting(setting);
|
||||
|
||||
if (ext == ".dds")
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace FirstPlugin.Forms
|
|||
|
||||
AnimationPanel animationPanel;
|
||||
|
||||
public BfresEditor()
|
||||
public BfresEditor(bool HasModels)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
@ -57,7 +57,8 @@ namespace FirstPlugin.Forms
|
|||
}
|
||||
stPanel5.Controls.Add(viewport);
|
||||
|
||||
stTabControl1.SelectedIndex = 1;
|
||||
if (HasModels)
|
||||
stTabControl1.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
public UserControl GetActiveEditor(Type type)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -181,8 +181,6 @@ namespace Switch_Toolbox.Library.Forms
|
|||
if (AnimName.Length > 3)
|
||||
AnimName = AnimName.Substring(3);
|
||||
|
||||
Console.WriteLine("AnimName " + AnimName);
|
||||
|
||||
Animation running = new Animation(AnimName);
|
||||
running.ReplaceMe((Animation)e.Node);
|
||||
running.Tag = e.Node;
|
||||
|
@ -225,7 +223,6 @@ namespace Switch_Toolbox.Library.Forms
|
|||
|
||||
if (LibraryGUI.Instance.GetAnimationPanel() != null)
|
||||
{
|
||||
Console.WriteLine("running" + running.Text);
|
||||
LibraryGUI.Instance.GetAnimationPanel().CurrentAnimation = running;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue