mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 07:04:36 +00:00
Update bntx images properly in bfres editor when replaced
This commit is contained in:
parent
530c86e672
commit
46c7141486
7 changed files with 14 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
|||
*NodeEditorWinforms-master
|
||||
*GL_EditorFramework-master
|
||||
*SuperBMD-master
|
||||
*SuperBMD-link
|
||||
*Assimp
|
||||
*.resources
|
||||
Debug/
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -17,6 +17,7 @@ using Switch_Toolbox.Library;
|
|||
using Switch_Toolbox.Library.Forms;
|
||||
using Switch_Toolbox.Library.IO;
|
||||
using Switch_Toolbox.Library.Animations;
|
||||
using FirstPlugin.Forms;
|
||||
|
||||
namespace FirstPlugin
|
||||
{
|
||||
|
@ -1261,13 +1262,20 @@ namespace FirstPlugin
|
|||
|
||||
private bool IsEditorActive()
|
||||
{
|
||||
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.GetActiveContent(typeof(ImageEditorBase));
|
||||
if (editor == null)
|
||||
return false;
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.GetActiveContent(typeof(BfresEditor));
|
||||
if (bfresEditor != null)
|
||||
{
|
||||
var imageEditor = bfresEditor.GetActiveEditor(typeof(ImageEditorBase));
|
||||
return imageEditor != null;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
{
|
||||
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.GetActiveContent(typeof(ImageEditorBase));
|
||||
return editor != null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void UpdateEditor()
|
||||
{
|
||||
if (Parent != null && Parent.Parent != null && Parent.Parent is BFRES)
|
||||
|
@ -1407,6 +1415,7 @@ namespace FirstPlugin
|
|||
if (IsEditorActive())
|
||||
UpdateEditor();
|
||||
}
|
||||
|
||||
private void UpdateTextureMapping()
|
||||
{
|
||||
var viewport = LibraryGUI.GetActiveViewport();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue