Image editor fixes for bffnt
This commit is contained in:
parent
fb2648205b
commit
feecbeef55
@ -143,11 +143,18 @@ namespace FirstPlugin.Forms
|
||||
form.editorBase.Text = Text;
|
||||
form.editorBase.Dock = DockStyle.Fill;
|
||||
|
||||
image.Parameters.FlipY = true;
|
||||
|
||||
if (IsBntx)
|
||||
{
|
||||
form.editorBase.LoadProperties(((TextureData)image).Texture);
|
||||
form.editorBase.LoadImage(image, ImageIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
form.editorBase.LoadProperties(image.GenericProperties);
|
||||
form.editorBase.LoadImage(image);
|
||||
form.editorBase.LoadImage(image);
|
||||
}
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
@ -267,7 +267,7 @@ namespace Toolbox.Library.Forms
|
||||
|
||||
public void LoadProperties(object prop, Action OnPropertyChanged = null) => propertiesEditor.LoadProperties(prop, OnPropertyChanged);
|
||||
|
||||
public void LoadImage(STGenericTexture texture)
|
||||
public void LoadImage(STGenericTexture texture, int arrayLevel = 0)
|
||||
{
|
||||
editBtn.Enabled = false;
|
||||
|
||||
@ -275,10 +275,10 @@ namespace Toolbox.Library.Forms
|
||||
FileWatcher.EnableRaisingEvents = false;
|
||||
FileWatcher.Filter = "";
|
||||
|
||||
UpdateImage(texture);
|
||||
UpdateImage(texture, arrayLevel);
|
||||
}
|
||||
|
||||
private void UpdateImage(STGenericTexture texture)
|
||||
private void UpdateImage(STGenericTexture texture, int arrayLevel = 0)
|
||||
{
|
||||
ResetChannelEditor();
|
||||
|
||||
@ -303,7 +303,7 @@ namespace Toolbox.Library.Forms
|
||||
}
|
||||
|
||||
CurMipDisplayLevel = 0;
|
||||
CurArrayDisplayLevel = 0;
|
||||
CurArrayDisplayLevel = arrayLevel;
|
||||
hasBeenEdited = false;
|
||||
|
||||
UpdateMipDisplay();
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user