1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Update bntx images properly in bfres editor when replaced

This commit is contained in:
KillzXGaming 2019-07-12 20:47:04 -04:00
parent 530c86e672
commit 46c7141486
7 changed files with 14 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
*NodeEditorWinforms-master
*GL_EditorFramework-master
*SuperBMD-master
*SuperBMD-link
*Assimp
*.resources
Debug/

Binary file not shown.

View File

@ -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,12 +1262,19 @@ namespace FirstPlugin
private bool IsEditorActive()
{
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.GetActiveContent(typeof(ImageEditorBase));
if (editor == null)
return false;
else
return true;
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.GetActiveContent(typeof(BfresEditor));
if (bfresEditor != null)
{
var imageEditor = bfresEditor.GetActiveEditor(typeof(ImageEditorBase));
return imageEditor != null;
}
else
{
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.GetActiveContent(typeof(ImageEditorBase));
return editor != null;
}
}
public void UpdateEditor()
{
@ -1407,6 +1415,7 @@ namespace FirstPlugin
if (IsEditorActive())
UpdateEditor();
}
private void UpdateTextureMapping()
{
var viewport = LibraryGUI.GetActiveViewport();