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.Text = Text;
|
||||||
form.editorBase.Dock = DockStyle.Fill;
|
form.editorBase.Dock = DockStyle.Fill;
|
||||||
|
|
||||||
|
image.Parameters.FlipY = true;
|
||||||
|
|
||||||
if (IsBntx)
|
if (IsBntx)
|
||||||
|
{
|
||||||
form.editorBase.LoadProperties(((TextureData)image).Texture);
|
form.editorBase.LoadProperties(((TextureData)image).Texture);
|
||||||
|
form.editorBase.LoadImage(image, ImageIndex);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
form.editorBase.LoadProperties(image.GenericProperties);
|
form.editorBase.LoadProperties(image.GenericProperties);
|
||||||
form.editorBase.LoadImage(image);
|
form.editorBase.LoadImage(image);
|
||||||
|
}
|
||||||
|
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
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 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;
|
editBtn.Enabled = false;
|
||||||
|
|
||||||
@ -275,10 +275,10 @@ namespace Toolbox.Library.Forms
|
|||||||
FileWatcher.EnableRaisingEvents = false;
|
FileWatcher.EnableRaisingEvents = false;
|
||||||
FileWatcher.Filter = "";
|
FileWatcher.Filter = "";
|
||||||
|
|
||||||
UpdateImage(texture);
|
UpdateImage(texture, arrayLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateImage(STGenericTexture texture)
|
private void UpdateImage(STGenericTexture texture, int arrayLevel = 0)
|
||||||
{
|
{
|
||||||
ResetChannelEditor();
|
ResetChannelEditor();
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ namespace Toolbox.Library.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
CurMipDisplayLevel = 0;
|
CurMipDisplayLevel = 0;
|
||||||
CurArrayDisplayLevel = 0;
|
CurArrayDisplayLevel = arrayLevel;
|
||||||
hasBeenEdited = false;
|
hasBeenEdited = false;
|
||||||
|
|
||||||
UpdateMipDisplay();
|
UpdateMipDisplay();
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user