1
0
mirror of synced 2025-01-31 04:13:51 +01:00

Texture pattern editor overhaul. Not functional yet!

This commit is contained in:
KillzXGaming 2019-07-09 17:50:50 -04:00
parent ad10e3b5bf
commit bb22dc8483
29 changed files with 3628 additions and 328 deletions

Binary file not shown.

View File

@ -0,0 +1,141 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Switch_Toolbox;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.IO;
namespace FirstPlugin
{
public class U8 : IArchiveFile, IFileFormat, IDirectoryContainer
{
public FileType FileType { get; set; } = FileType.Archive;
public bool CanSave { get; set; }
public string[] Description { get; set; } = new string[] { "U8" };
public string[] Extension { get; set; } = new string[] { "*.u8"};
public string FileName { get; set; }
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public bool CanAddFiles { get; set; }
public bool CanRenameFiles { get; set; }
public bool CanReplaceFiles { get; set; }
public bool CanDeleteFiles { get; set; }
public bool Identify(System.IO.Stream stream)
{
using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
{
reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
return reader.ReadUInt32() == 0x55AA382D;
}
}
public Type[] Types
{
get
{
List<Type> types = new List<Type>();
return types.ToArray();
}
}
public List<INode> nodes = new List<INode>();
public IEnumerable<ArchiveFileInfo> Files => null;
public IEnumerable<INode> Nodes => nodes;
public string Name
{
get { return FileName; }
set { FileName = value; }
}
private readonly uint Magic = 0x55AA382D;
public void Load(System.IO.Stream stream)
{
using (var reader = new FileReader(stream))
{
reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
uint Signature = reader.ReadUInt32();
uint FirstNodeOffset = reader.ReadUInt32();
uint NodeSectionSize = reader.ReadUInt32();
uint FileDataOffset = reader.ReadUInt32();
byte[] Reserved = new byte[4];
var RootNode = new NodeEntry();
RootNode.Read(reader);
nodes.Add(RootNode);
}
}
public void SaveFile(FileWriter writer)
{
long pos = writer.Position;
writer.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
writer.Write(Magic);
}
public class NodeEntry : INode
{
public NodeType nodeType
{
get { return (NodeType)(flags >> 24); }
}
public enum NodeType
{
Directory,
File,
}
private uint _stringPoolOffset
{
get { return flags & 0x00ffffff; }
}
private uint flags;
public uint Setting1; //Offset (file) or parent index (directory)
public uint Setting2; //Size (file) or node count (directory)
public string Name { get; set; }
public void Read(FileReader reader)
{
flags = reader.ReadUInt32();
Setting1 = reader.ReadUInt32();
Setting2 = reader.ReadUInt32();
}
}
public void Unload()
{
}
public byte[] Save()
{
var mem = new System.IO.MemoryStream();
SaveFile(new FileWriter(mem));
return mem.ToArray();
}
public bool AddFile(ArchiveFileInfo archiveFileInfo)
{
return false;
}
public bool DeleteFile(ArchiveFileInfo archiveFileInfo)
{
return false;
}
}
}

View File

@ -385,6 +385,8 @@ namespace FirstPlugin
return false;
}
public STForm ActiveFormEditor; //For active form windows as editors
private bool DrawablesLoaded = false;
public void LoadEditors(object SelectedSection)
{
@ -731,20 +733,6 @@ namespace FirstPlugin
OpenSubFileEditor<FMAA>(SelectedSection, bfresEditor);
else if (SelectedSection is FVIS)
OpenSubFileEditor<FVIS>(SelectedSection, bfresEditor);
/* else if (SelectedSection is FMAA && ((FMAA)SelectedSection).AnimType == MaterialAnimation.AnimationType.TexturePattern)
{
BfresTexturePatternEditor editor = (BfresTexturePatternEditor)bfresEditor.GetActiveEditor(typeof(BfresTexturePatternEditor));
if (editor == null)
{
editor = new BfresTexturePatternEditor();
bfresEditor.LoadEditor(editor);
}
editor.Text = Text;
editor.Dock = DockStyle.Fill;
editor.LoadAnim((FMAA)SelectedSection);
}*/
}
}

View File

@ -45,6 +45,15 @@ namespace Bfres.Structs
name.Contains(VisibiltyAnimType2);
}
public override void OnDoubleMouseClick(TreeView treeview)
{
var ParentFolder = this.Parent;
BfresTexturePatternEditor form = new BfresTexturePatternEditor(ParentFolder.Nodes);
form.LoadAnim(this);
form.Show();
}
public class MaterialAnimEntry : Material
{
public FMAA matAnimWrapper;

View File

@ -204,6 +204,15 @@ namespace Bfres.Structs
}
}
public override void OnDoubleMouseClick(TreeView treeview)
{
var ParentFolder = this.Parent;
BfresTexturePatternEditor form = new BfresTexturePatternEditor(ParentFolder.Nodes);
form.LoadAnim(this);
form.Show();
}
public override string ExportFilter => FileFilters.GetFilter(typeof(FTXP));
public override void Export(string FileName)

View File

@ -0,0 +1,170 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading.Tasks;
using Switch_Toolbox;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.Forms;
using Switch_Toolbox.Library.IO;
namespace FirstPlugin
{
public class TPL : TreeNodeFile, IFileFormat
{
public FileType FileType { get; set; } = FileType.Image;
public bool CanSave { get; set; }
public string[] Description { get; set; } = new string[] { "TPL" };
public string[] Extension { get; set; } = new string[] { "*.tpl" };
public string FileName { get; set; }
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public bool Identify(System.IO.Stream stream)
{
using (var reader = new FileReader(stream, true))
{
reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
return reader.ReadUInt32() == 0x0020AF30;
}
}
public Type[] Types
{
get
{
List<Type> types = new List<Type>();
return types.ToArray();
}
}
libWiiSharp.TPL tplFile = null;
public void Load(System.IO.Stream stream)
{
Text = FileName;
tplFile = libWiiSharp.TPL.Load(stream);
for (int i = 0; i < tplFile.NumOfTextures; i++)
Nodes.Add(new TPL_Texture(tplFile, i));
}
public void Unload()
{
}
public byte[] Save()
{
MemoryStream mem = new MemoryStream();
return mem.ToArray();
}
public class TPL_Texture : STGenericTexture
{
private libWiiSharp.TPL ParentTPL;
private int TextureIndex { get; set; }
private TextureProperties properties;
public class TextureProperties
{
private libWiiSharp.TPL ParentTPL;
private int TextureIndex { get; set; }
public libWiiSharp.TPL_TextureFormat TextureFormat
{
get { return ParentTPL.GetTextureFormat(TextureIndex); }
}
public libWiiSharp.TPL_PaletteFormat PaletteFormat
{
get { return ParentTPL.GetPaletteFormat(TextureIndex); }
}
public int Width
{
get { return ParentTPL.GetImageWidth(TextureIndex); }
}
public int Height
{
get { return ParentTPL.GetImageHeight(TextureIndex); }
}
public TextureProperties(libWiiSharp.TPL tpl, int index)
{
ParentTPL = tpl;
TextureIndex = index;
}
}
public TPL_Texture(libWiiSharp.TPL tpl, int index)
{
ParentTPL = tpl;
TextureIndex = index;
Width = tpl.GetImageWidth(index);
Height = tpl.GetImageHeight(index);
MipCount = 1;
Text = $"Image {index}";
Format = TEX_FORMAT.R8G8B8A8_UNORM;
SelectedImageKey = "texture";
ImageKey = "texture";
properties = new TextureProperties(tpl, index);
}
public override bool CanEdit { get; set; } = false;
public override TEX_FORMAT[] SupportedFormats
{
get
{
return new TEX_FORMAT[]
{
TEX_FORMAT.R8G8B8A8_UNORM,
};
}
}
public override void SetImageData(System.Drawing.Bitmap bitmap, int ArrayLevel)
{
}
public override byte[] GetImageData(int ArrayLevel = 0, int MipLevel = 0)
{
return ImageUtilty.ConvertBgraToRgba(ParentTPL.ExtractTextureByteArray(TextureIndex));
}
public override void OnClick(TreeView treeView)
{
UpdateEditor();
}
public void UpdateEditor()
{
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.Instance.GetActiveContent(typeof(ImageEditorBase));
if (editor == null)
{
editor = new ImageEditorBase();
editor.Dock = DockStyle.Fill;
LibraryGUI.Instance.LoadEditor(editor);
}
editor.Text = Text;
editor.LoadProperties(properties);
editor.LoadImage(this);
}
}
}
}

View File

@ -84,18 +84,7 @@ namespace FirstPlugin.Forms
if (anim.AnimType == MaterialAnimation.AnimationType.TexturePattern)
{
BfresTexturePatternEditor editor =(BfresTexturePatternEditor)GetActiveControl(typeof(BfresTexturePatternEditor));
if (editor == null)
{
stPanel2.Controls.Clear();
editor = new BfresTexturePatternEditor();
editor.Dock = DockStyle.Fill;
stPanel2.Controls.Add(editor);
}
editor.LoadAnim(anim);
editor.Refresh();
}
else
{
@ -211,19 +200,6 @@ namespace FirstPlugin.Forms
stPropertyGrid1.LoadProperty(anim.TexPatternAnim, OnPropertyChanged);
userDataEditor1.LoadUserData(anim.TexPatternAnim.UserData);
BfresTexturePatternEditor editor = (BfresTexturePatternEditor)GetActiveControl(typeof(BfresTexturePatternEditor));
if (editor == null)
{
stPanel2.Controls.Clear();
editor = new BfresTexturePatternEditor();
editor.Dock = DockStyle.Fill;
stPanel2.Controls.Add(editor);
}
editor.LoadAnim(anim);
editor.Refresh();
}
public void OnPropertyChanged()

View File

@ -38,19 +38,30 @@
this.stPanel6 = new Switch_Toolbox.Library.Forms.STPanel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.stPanel8 = new Switch_Toolbox.Library.Forms.STPanel();
this.stToolStrip2 = new Switch_Toolbox.Library.Forms.STToolStrip();
this.addKeyFrameToolstrip = new System.Windows.Forms.ToolStripButton();
this.removeKeyFrameToolstrip = new System.Windows.Forms.ToolStripButton();
this.toolstripShiftUp = new System.Windows.Forms.ToolStripButton();
this.toolstripShiftDown = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel();
this.stLabel2 = new Switch_Toolbox.Library.Forms.STLabel();
this.stLabel4 = new Switch_Toolbox.Library.Forms.STLabel();
this.textureFrameUD = new Switch_Toolbox.Library.Forms.NumericUpDownUint();
this.btnRemove = new Switch_Toolbox.Library.Forms.STButton();
this.btnAdd = new Switch_Toolbox.Library.Forms.STButton();
this.stLabel1 = new Switch_Toolbox.Library.Forms.STLabel();
this.treeView1 = new System.Windows.Forms.TreeView();
this.listViewCustom1 = new Switch_Toolbox.Library.Forms.ListViewCustom();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.stPanel7 = new Switch_Toolbox.Library.Forms.STPanel();
this.btnEditSamplers = new Switch_Toolbox.Library.Forms.STButton();
this.btnEditMaterial = new Switch_Toolbox.Library.Forms.STButton();
this.stLabel2 = new Switch_Toolbox.Library.Forms.STLabel();
this.stLabel5 = new Switch_Toolbox.Library.Forms.STLabel();
this.activeAnimCB = new Switch_Toolbox.Library.Forms.STComboBox();
this.stLabel3 = new Switch_Toolbox.Library.Forms.STLabel();
this.frameCountUD = new Switch_Toolbox.Library.Forms.STNumbericUpDown();
this.backgroundCB = new Switch_Toolbox.Library.Forms.STComboBox();
this.stToolStrip1 = new Switch_Toolbox.Library.Forms.STToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
this.materialCB = new Switch_Toolbox.Library.Forms.STComboBox();
this.samplerCB = new Switch_Toolbox.Library.Forms.STComboBox();
this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel();
this.loopChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.animationTrackBar = new ColorSlider.ColorSlider();
@ -61,11 +72,14 @@
this.btnForward1 = new Switch_Toolbox.Library.Forms.STButton();
this.btnPlay = new Switch_Toolbox.Library.Forms.STButton();
this.btnBackward1 = new Switch_Toolbox.Library.Forms.STButton();
this.stLabel3 = new Switch_Toolbox.Library.Forms.STLabel();
this.stLabel1 = new Switch_Toolbox.Library.Forms.STLabel();
this.stTextBox1 = new Switch_Toolbox.Library.Forms.STTextBox();
this.stMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.splitter4 = new System.Windows.Forms.Splitter();
this.splitter2 = new System.Windows.Forms.Splitter();
this.contentContainer.SuspendLayout();
this.stPanel3.SuspendLayout();
this.stPanel5.SuspendLayout();
this.stPanel6.SuspendLayout();
@ -74,20 +88,33 @@
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.stPanel8.SuspendLayout();
this.stToolStrip2.SuspendLayout();
this.stPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.textureFrameUD)).BeginInit();
this.stPanel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.frameCountUD)).BeginInit();
this.stToolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).BeginInit();
this.stPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.maxFrameCounterUD)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.currentFrameCounterUD)).BeginInit();
this.stPanel4.SuspendLayout();
this.stMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// contentContainer
//
this.contentContainer.Controls.Add(this.stPanel3);
this.contentContainer.Controls.Add(this.splitter1);
this.contentContainer.Size = new System.Drawing.Size(1000, 674);
this.contentContainer.Controls.SetChildIndex(this.splitter1, 0);
this.contentContainer.Controls.SetChildIndex(this.stPanel3, 0);
//
// splitter1
//
this.splitter1.Location = new System.Drawing.Point(0, 0);
this.splitter1.Location = new System.Drawing.Point(0, 25);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 837);
this.splitter1.Size = new System.Drawing.Size(3, 649);
this.splitter1.TabIndex = 7;
this.splitter1.TabStop = false;
//
@ -100,9 +127,9 @@
this.stPanel3.Controls.Add(this.stPanel5);
this.stPanel3.Controls.Add(this.splitter2);
this.stPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel3.Location = new System.Drawing.Point(3, 0);
this.stPanel3.Location = new System.Drawing.Point(3, 25);
this.stPanel3.Name = "stPanel3";
this.stPanel3.Size = new System.Drawing.Size(729, 837);
this.stPanel3.Size = new System.Drawing.Size(997, 649);
this.stPanel3.TabIndex = 8;
//
// stPanel5
@ -112,7 +139,7 @@
this.stPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel5.Location = new System.Drawing.Point(0, 0);
this.stPanel5.Name = "stPanel5";
this.stPanel5.Size = new System.Drawing.Size(729, 834);
this.stPanel5.Size = new System.Drawing.Size(997, 646);
this.stPanel5.TabIndex = 9;
//
// splitter3
@ -120,7 +147,7 @@
this.splitter3.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter3.Location = new System.Drawing.Point(0, 0);
this.splitter3.Name = "splitter3";
this.splitter3.Size = new System.Drawing.Size(729, 3);
this.splitter3.Size = new System.Drawing.Size(997, 3);
this.splitter3.TabIndex = 17;
this.splitter3.TabStop = false;
//
@ -131,7 +158,7 @@
this.stPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel6.Location = new System.Drawing.Point(0, 0);
this.stPanel6.Name = "stPanel6";
this.stPanel6.Size = new System.Drawing.Size(729, 834);
this.stPanel6.Size = new System.Drawing.Size(997, 646);
this.stPanel6.TabIndex = 16;
//
// splitContainer1
@ -147,27 +174,113 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.stPanel7);
this.splitContainer1.Size = new System.Drawing.Size(726, 834);
this.splitContainer1.SplitterDistance = 242;
this.splitContainer1.Size = new System.Drawing.Size(994, 646);
this.splitContainer1.SplitterDistance = 201;
this.splitContainer1.TabIndex = 17;
//
// stPanel8
//
this.stPanel8.Controls.Add(this.stLabel4);
this.stPanel8.Controls.Add(this.textureFrameUD);
this.stPanel8.Controls.Add(this.btnRemove);
this.stPanel8.Controls.Add(this.btnAdd);
this.stPanel8.Controls.Add(this.listViewCustom1);
this.stPanel8.Controls.Add(this.stToolStrip2);
this.stPanel8.Controls.Add(this.stPanel2);
this.stPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel8.Location = new System.Drawing.Point(0, 0);
this.stPanel8.Name = "stPanel8";
this.stPanel8.Size = new System.Drawing.Size(242, 834);
this.stPanel8.Size = new System.Drawing.Size(201, 646);
this.stPanel8.TabIndex = 15;
//
// stToolStrip2
//
this.stToolStrip2.Dock = System.Windows.Forms.DockStyle.Left;
this.stToolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addKeyFrameToolstrip,
this.removeKeyFrameToolstrip,
this.toolstripShiftUp,
this.toolstripShiftDown,
this.toolStripButton2});
this.stToolStrip2.Location = new System.Drawing.Point(0, 0);
this.stToolStrip2.Name = "stToolStrip2";
this.stToolStrip2.Size = new System.Drawing.Size(24, 646);
this.stToolStrip2.TabIndex = 19;
this.stToolStrip2.Text = "stToolStrip2";
//
// addKeyFrameToolstrip
//
this.addKeyFrameToolstrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.addKeyFrameToolstrip.Image = global::FirstPlugin.Properties.Resources.AddIcon;
this.addKeyFrameToolstrip.ImageTransparentColor = System.Drawing.Color.Magenta;
this.addKeyFrameToolstrip.Name = "addKeyFrameToolstrip";
this.addKeyFrameToolstrip.Size = new System.Drawing.Size(29, 20);
this.addKeyFrameToolstrip.Text = "Add Frame";
this.addKeyFrameToolstrip.Click += new System.EventHandler(this.addKeyFrameToolstrip_Click);
//
// removeKeyFrameToolstrip
//
this.removeKeyFrameToolstrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.removeKeyFrameToolstrip.Image = global::FirstPlugin.Properties.Resources.RemoveIcon;
this.removeKeyFrameToolstrip.ImageTransparentColor = System.Drawing.Color.Magenta;
this.removeKeyFrameToolstrip.Name = "removeKeyFrameToolstrip";
this.removeKeyFrameToolstrip.Size = new System.Drawing.Size(29, 20);
this.removeKeyFrameToolstrip.Text = "Remove Frame";
this.removeKeyFrameToolstrip.Click += new System.EventHandler(this.removeKeyFrameToolstrip_Click);
//
// toolstripShiftUp
//
this.toolstripShiftUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolstripShiftUp.Image = global::FirstPlugin.Properties.Resources.ArrowIcon;
this.toolstripShiftUp.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripShiftUp.Name = "toolstripShiftUp";
this.toolstripShiftUp.Size = new System.Drawing.Size(29, 20);
this.toolstripShiftUp.Text = "Move Up";
this.toolstripShiftUp.Click += new System.EventHandler(this.toolstripShiftUp_Click);
//
// toolstripShiftDown
//
this.toolstripShiftDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolstripShiftDown.Image = global::FirstPlugin.Properties.Resources.ArrowIcon;
this.toolstripShiftDown.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripShiftDown.Name = "toolstripShiftDown";
this.toolstripShiftDown.Size = new System.Drawing.Size(29, 20);
this.toolstripShiftDown.Text = "Move Down";
this.toolstripShiftDown.Click += new System.EventHandler(this.toolstripShiftDown_Click);
//
// toolStripButton2
//
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(21, 20);
this.toolStripButton2.Text = "toolStripButton2";
//
// stPanel2
//
this.stPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.stPanel2.Controls.Add(this.stLabel2);
this.stPanel2.Controls.Add(this.stLabel4);
this.stPanel2.Controls.Add(this.textureFrameUD);
this.stPanel2.Controls.Add(this.stLabel1);
this.stPanel2.Controls.Add(this.treeView1);
this.stPanel2.Controls.Add(this.listViewCustom1);
this.stPanel2.Location = new System.Drawing.Point(21, 6);
this.stPanel2.Name = "stPanel2";
this.stPanel2.Size = new System.Drawing.Size(178, 634);
this.stPanel2.TabIndex = 18;
//
// stLabel2
//
this.stLabel2.AutoSize = true;
this.stLabel2.Location = new System.Drawing.Point(6, 5);
this.stLabel2.Name = "stLabel2";
this.stLabel2.Size = new System.Drawing.Size(48, 13);
this.stLabel2.TabIndex = 18;
this.stLabel2.Text = "Textures";
//
// stLabel4
//
this.stLabel4.AutoSize = true;
this.stLabel4.Location = new System.Drawing.Point(6, 34);
this.stLabel4.Location = new System.Drawing.Point(6, 447);
this.stLabel4.Name = "stLabel4";
this.stLabel4.Size = new System.Drawing.Size(39, 13);
this.stLabel4.TabIndex = 15;
@ -175,7 +288,7 @@
//
// textureFrameUD
//
this.textureFrameUD.Location = new System.Drawing.Point(59, 32);
this.textureFrameUD.Location = new System.Drawing.Point(77, 445);
this.textureFrameUD.Maximum = new decimal(new int[] {
2147483647,
0,
@ -186,27 +299,24 @@
this.textureFrameUD.TabIndex = 10;
this.textureFrameUD.ValueChanged += new System.EventHandler(this.textureFrameUD_ValueChanged);
//
// btnRemove
// stLabel1
//
this.btnRemove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRemove.Location = new System.Drawing.Point(77, 3);
this.btnRemove.Name = "btnRemove";
this.btnRemove.Size = new System.Drawing.Size(75, 23);
this.btnRemove.TabIndex = 8;
this.btnRemove.Text = "Remove";
this.btnRemove.UseVisualStyleBackColor = false;
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
this.stLabel1.AutoSize = true;
this.stLabel1.Location = new System.Drawing.Point(6, 478);
this.stLabel1.Name = "stLabel1";
this.stLabel1.Size = new System.Drawing.Size(56, 13);
this.stLabel1.TabIndex = 17;
this.stLabel1.Text = "Data View";
//
// btnAdd
// treeView1
//
this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAdd.Location = new System.Drawing.Point(3, 3);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.TabIndex = 9;
this.btnAdd.Text = "Add";
this.btnAdd.UseVisualStyleBackColor = false;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.treeView1.Location = new System.Drawing.Point(6, 494);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(164, 140);
this.treeView1.TabIndex = 16;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
//
// listViewCustom1
//
@ -217,10 +327,11 @@
this.listViewCustom1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.listViewCustom1.FullRowSelect = true;
this.listViewCustom1.Location = new System.Drawing.Point(3, 58);
this.listViewCustom1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.listViewCustom1.Location = new System.Drawing.Point(9, 21);
this.listViewCustom1.Name = "listViewCustom1";
this.listViewCustom1.OwnerDraw = true;
this.listViewCustom1.Size = new System.Drawing.Size(230, 779);
this.listViewCustom1.Size = new System.Drawing.Size(172, 418);
this.listViewCustom1.TabIndex = 7;
this.listViewCustom1.UseCompatibleStateImageBehavior = false;
this.listViewCustom1.View = System.Windows.Forms.View.Details;
@ -229,96 +340,119 @@
//
// columnHeader1
//
this.columnHeader1.Width = 230;
this.columnHeader1.Width = 339;
//
// stPanel7
//
this.stPanel7.Controls.Add(this.btnEditSamplers);
this.stPanel7.Controls.Add(this.btnEditMaterial);
this.stPanel7.Controls.Add(this.stLabel2);
this.stPanel7.Controls.Add(this.pictureBoxCustom1);
this.stPanel7.Controls.Add(this.materialCB);
this.stPanel7.Controls.Add(this.samplerCB);
this.stPanel7.Controls.Add(this.stPanel1);
this.stPanel7.Controls.Add(this.stLabel5);
this.stPanel7.Controls.Add(this.activeAnimCB);
this.stPanel7.Controls.Add(this.stLabel3);
this.stPanel7.Controls.Add(this.stLabel1);
this.stPanel7.Controls.Add(this.stTextBox1);
this.stPanel7.Controls.Add(this.frameCountUD);
this.stPanel7.Controls.Add(this.backgroundCB);
this.stPanel7.Controls.Add(this.stToolStrip1);
this.stPanel7.Controls.Add(this.pictureBoxCustom1);
this.stPanel7.Controls.Add(this.stPanel1);
this.stPanel7.Controls.Add(this.stMenuStrip1);
this.stPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel7.Location = new System.Drawing.Point(0, 0);
this.stPanel7.Name = "stPanel7";
this.stPanel7.Size = new System.Drawing.Size(480, 834);
this.stPanel7.Size = new System.Drawing.Size(789, 646);
this.stPanel7.TabIndex = 14;
//
// btnEditSamplers
// stLabel5
//
this.btnEditSamplers.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEditSamplers.Location = new System.Drawing.Point(299, 41);
this.btnEditSamplers.Name = "btnEditSamplers";
this.btnEditSamplers.Size = new System.Drawing.Size(47, 23);
this.btnEditSamplers.TabIndex = 15;
this.btnEditSamplers.Text = "Edit";
this.btnEditSamplers.UseVisualStyleBackColor = false;
this.btnEditSamplers.Click += new System.EventHandler(this.stButton1_Click);
this.stLabel5.AutoSize = true;
this.stLabel5.Location = new System.Drawing.Point(141, 34);
this.stLabel5.Name = "stLabel5";
this.stLabel5.Size = new System.Drawing.Size(89, 13);
this.stLabel5.TabIndex = 8;
this.stLabel5.Text = "Active Animation:";
//
// btnEditMaterial
// activeAnimCB
//
this.btnEditMaterial.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEditMaterial.Location = new System.Drawing.Point(299, 12);
this.btnEditMaterial.Name = "btnEditMaterial";
this.btnEditMaterial.Size = new System.Drawing.Size(47, 23);
this.btnEditMaterial.TabIndex = 14;
this.btnEditMaterial.Text = "Edit";
this.btnEditMaterial.UseVisualStyleBackColor = false;
this.btnEditMaterial.Click += new System.EventHandler(this.btnEditMaterial_Click);
this.activeAnimCB.BorderColor = System.Drawing.Color.Empty;
this.activeAnimCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.activeAnimCB.ButtonColor = System.Drawing.Color.Empty;
this.activeAnimCB.FormattingEnabled = true;
this.activeAnimCB.Location = new System.Drawing.Point(233, 31);
this.activeAnimCB.Name = "activeAnimCB";
this.activeAnimCB.ReadOnly = true;
this.activeAnimCB.Size = new System.Drawing.Size(220, 21);
this.activeAnimCB.TabIndex = 7;
this.activeAnimCB.SelectedIndexChanged += new System.EventHandler(this.activeAnimCB_SelectedIndexChanged);
//
// stLabel2
// stLabel3
//
this.stLabel2.AutoSize = true;
this.stLabel2.Location = new System.Drawing.Point(3, 14);
this.stLabel2.Name = "stLabel2";
this.stLabel2.Size = new System.Drawing.Size(81, 13);
this.stLabel2.TabIndex = 11;
this.stLabel2.Text = "Material Target:";
this.stLabel3.AutoSize = true;
this.stLabel3.Location = new System.Drawing.Point(383, 6);
this.stLabel3.Name = "stLabel3";
this.stLabel3.Size = new System.Drawing.Size(70, 13);
this.stLabel3.TabIndex = 6;
this.stLabel3.Text = "Frame Count:";
//
// frameCountUD
//
this.frameCountUD.Location = new System.Drawing.Point(459, 4);
this.frameCountUD.Name = "frameCountUD";
this.frameCountUD.Size = new System.Drawing.Size(169, 20);
this.frameCountUD.TabIndex = 5;
//
// backgroundCB
//
this.backgroundCB.BorderColor = System.Drawing.Color.Empty;
this.backgroundCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.backgroundCB.ButtonColor = System.Drawing.Color.Empty;
this.backgroundCB.FormattingEnabled = true;
this.backgroundCB.Location = new System.Drawing.Point(233, 3);
this.backgroundCB.Name = "backgroundCB";
this.backgroundCB.ReadOnly = true;
this.backgroundCB.Size = new System.Drawing.Size(144, 21);
this.backgroundCB.TabIndex = 4;
this.backgroundCB.SelectedIndexChanged += new System.EventHandler(this.backgroundCB_SelectedIndexChanged);
//
// stToolStrip1
//
this.stToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton4});
this.stToolStrip1.Location = new System.Drawing.Point(0, 24);
this.stToolStrip1.Name = "stToolStrip1";
this.stToolStrip1.Size = new System.Drawing.Size(789, 25);
this.stToolStrip1.TabIndex = 3;
this.stToolStrip1.Text = "stToolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
//
// toolStripButton4
//
this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));
this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton4.Name = "toolStripButton4";
this.toolStripButton4.Size = new System.Drawing.Size(23, 22);
this.toolStripButton4.Text = "toolStripButton4";
//
// pictureBoxCustom1
//
this.pictureBoxCustom1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent;
this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage")));
this.pictureBoxCustom1.Location = new System.Drawing.Point(6, 102);
this.pictureBoxCustom1.Location = new System.Drawing.Point(16, 58);
this.pictureBoxCustom1.Name = "pictureBoxCustom1";
this.pictureBoxCustom1.Size = new System.Drawing.Size(467, 658);
this.pictureBoxCustom1.Size = new System.Drawing.Size(776, 514);
this.pictureBoxCustom1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxCustom1.TabIndex = 0;
this.pictureBoxCustom1.TabStop = false;
//
// materialCB
//
this.materialCB.BorderColor = System.Drawing.Color.Empty;
this.materialCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.materialCB.ButtonColor = System.Drawing.Color.Empty;
this.materialCB.FormattingEnabled = true;
this.materialCB.Location = new System.Drawing.Point(90, 14);
this.materialCB.Name = "materialCB";
this.materialCB.ReadOnly = true;
this.materialCB.Size = new System.Drawing.Size(203, 21);
this.materialCB.TabIndex = 10;
this.materialCB.SelectedIndexChanged += new System.EventHandler(this.materialCB_SelectedIndexChanged);
//
// samplerCB
//
this.samplerCB.BorderColor = System.Drawing.Color.Empty;
this.samplerCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.samplerCB.ButtonColor = System.Drawing.Color.Empty;
this.samplerCB.FormattingEnabled = true;
this.samplerCB.Location = new System.Drawing.Point(90, 43);
this.samplerCB.Name = "samplerCB";
this.samplerCB.ReadOnly = true;
this.samplerCB.Size = new System.Drawing.Size(203, 21);
this.samplerCB.TabIndex = 5;
this.samplerCB.SelectedIndexChanged += new System.EventHandler(this.samplerCB_SelectedIndexChanged);
//
// stPanel1
//
this.stPanel1.Controls.Add(this.loopChkBox);
@ -327,9 +461,9 @@
this.stPanel1.Controls.Add(this.currentFrameCounterUD);
this.stPanel1.Controls.Add(this.stPanel4);
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.stPanel1.Location = new System.Drawing.Point(0, 766);
this.stPanel1.Location = new System.Drawing.Point(0, 578);
this.stPanel1.Name = "stPanel1";
this.stPanel1.Size = new System.Drawing.Size(480, 68);
this.stPanel1.Size = new System.Drawing.Size(789, 68);
this.stPanel1.TabIndex = 1;
//
// loopChkBox
@ -338,7 +472,7 @@
this.loopChkBox.AutoSize = true;
this.loopChkBox.Checked = true;
this.loopChkBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.loopChkBox.Location = new System.Drawing.Point(355, 11);
this.loopChkBox.Location = new System.Drawing.Point(662, 5);
this.loopChkBox.Name = "loopChkBox";
this.loopChkBox.Size = new System.Drawing.Size(50, 17);
this.loopChkBox.TabIndex = 17;
@ -367,7 +501,7 @@
this.animationTrackBar.ScaleSubDivisions = 5;
this.animationTrackBar.ShowDivisionsText = true;
this.animationTrackBar.ShowSmallScale = false;
this.animationTrackBar.Size = new System.Drawing.Size(456, 19);
this.animationTrackBar.Size = new System.Drawing.Size(765, 19);
this.animationTrackBar.SmallChange = ((uint)(1u));
this.animationTrackBar.TabIndex = 16;
this.animationTrackBar.Text = "colorSlider1";
@ -385,7 +519,7 @@
// maxFrameCounterUD
//
this.maxFrameCounterUD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.maxFrameCounterUD.Location = new System.Drawing.Point(353, 28);
this.maxFrameCounterUD.Location = new System.Drawing.Point(662, 25);
this.maxFrameCounterUD.Name = "maxFrameCounterUD";
this.maxFrameCounterUD.Size = new System.Drawing.Size(109, 20);
this.maxFrameCounterUD.TabIndex = 15;
@ -394,7 +528,7 @@
// currentFrameCounterUD
//
this.currentFrameCounterUD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.currentFrameCounterUD.Location = new System.Drawing.Point(9, 28);
this.currentFrameCounterUD.Location = new System.Drawing.Point(8, 25);
this.currentFrameCounterUD.Name = "currentFrameCounterUD";
this.currentFrameCounterUD.Size = new System.Drawing.Size(109, 20);
this.currentFrameCounterUD.TabIndex = 14;
@ -409,9 +543,9 @@
this.stPanel4.Controls.Add(this.btnForward1);
this.stPanel4.Controls.Add(this.btnPlay);
this.stPanel4.Controls.Add(this.btnBackward1);
this.stPanel4.Location = new System.Drawing.Point(123, 11);
this.stPanel4.Location = new System.Drawing.Point(123, 7);
this.stPanel4.Name = "stPanel4";
this.stPanel4.Size = new System.Drawing.Size(225, 37);
this.stPanel4.Size = new System.Drawing.Size(534, 41);
this.stPanel4.TabIndex = 13;
//
// btnStop
@ -421,7 +555,7 @@
this.btnStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnStop.FlatAppearance.BorderSize = 0;
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Location = new System.Drawing.Point(159, 6);
this.btnStop.Location = new System.Drawing.Point(314, 6);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(35, 27);
this.btnStop.TabIndex = 3;
@ -435,7 +569,7 @@
this.btnForward1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnForward1.FlatAppearance.BorderSize = 0;
this.btnForward1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnForward1.Location = new System.Drawing.Point(116, 10);
this.btnForward1.Location = new System.Drawing.Point(271, 10);
this.btnForward1.Name = "btnForward1";
this.btnForward1.Size = new System.Drawing.Size(23, 20);
this.btnForward1.TabIndex = 2;
@ -449,7 +583,7 @@
this.btnPlay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnPlay.FlatAppearance.BorderSize = 0;
this.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPlay.Location = new System.Drawing.Point(64, 6);
this.btnPlay.Location = new System.Drawing.Point(219, 6);
this.btnPlay.Name = "btnPlay";
this.btnPlay.Size = new System.Drawing.Size(35, 28);
this.btnPlay.TabIndex = 0;
@ -463,55 +597,65 @@
this.btnBackward1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnBackward1.FlatAppearance.BorderSize = 0;
this.btnBackward1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBackward1.Location = new System.Drawing.Point(25, 10);
this.btnBackward1.Location = new System.Drawing.Point(180, 10);
this.btnBackward1.Name = "btnBackward1";
this.btnBackward1.Size = new System.Drawing.Size(20, 20);
this.btnBackward1.TabIndex = 1;
this.btnBackward1.UseVisualStyleBackColor = false;
this.btnBackward1.Click += new System.EventHandler(this.btnBackward1_Click);
//
// stLabel3
// stMenuStrip1
//
this.stLabel3.AutoSize = true;
this.stLabel3.Location = new System.Drawing.Point(3, 72);
this.stLabel3.Name = "stLabel3";
this.stLabel3.Size = new System.Drawing.Size(70, 13);
this.stLabel3.TabIndex = 13;
this.stLabel3.Text = "Sampler Hint:";
this.stMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editToolStripMenuItem,
this.viewToolStripMenuItem,
this.imageToolStripMenuItem,
this.adjustmentsToolStripMenuItem});
this.stMenuStrip1.Location = new System.Drawing.Point(0, 0);
this.stMenuStrip1.Name = "stMenuStrip1";
this.stMenuStrip1.Size = new System.Drawing.Size(789, 24);
this.stMenuStrip1.TabIndex = 2;
this.stMenuStrip1.Text = "stMenuStrip1";
//
// stLabel1
// editToolStripMenuItem
//
this.stLabel1.AutoSize = true;
this.stLabel1.Location = new System.Drawing.Point(6, 43);
this.stLabel1.Name = "stLabel1";
this.stLabel1.Size = new System.Drawing.Size(82, 13);
this.stLabel1.TabIndex = 6;
this.stLabel1.Text = "Sampler Target:";
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem.Text = "Edit";
//
// stTextBox1
// viewToolStripMenuItem
//
this.stTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.stTextBox1.Location = new System.Drawing.Point(90, 70);
this.stTextBox1.Name = "stTextBox1";
this.stTextBox1.ReadOnly = true;
this.stTextBox1.Size = new System.Drawing.Size(203, 20);
this.stTextBox1.TabIndex = 12;
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "View";
//
// imageToolStripMenuItem
//
this.imageToolStripMenuItem.Name = "imageToolStripMenuItem";
this.imageToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.imageToolStripMenuItem.Text = "Image";
//
// adjustmentsToolStripMenuItem
//
this.adjustmentsToolStripMenuItem.Name = "adjustmentsToolStripMenuItem";
this.adjustmentsToolStripMenuItem.Size = new System.Drawing.Size(86, 20);
this.adjustmentsToolStripMenuItem.Text = "Adjustments";
//
// splitter4
//
this.splitter4.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter4.Location = new System.Drawing.Point(726, 0);
this.splitter4.Location = new System.Drawing.Point(994, 0);
this.splitter4.Name = "splitter4";
this.splitter4.Size = new System.Drawing.Size(3, 834);
this.splitter4.Size = new System.Drawing.Size(3, 646);
this.splitter4.TabIndex = 16;
this.splitter4.TabStop = false;
//
// splitter2
//
this.splitter2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.splitter2.Location = new System.Drawing.Point(0, 834);
this.splitter2.Location = new System.Drawing.Point(0, 646);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(729, 3);
this.splitter2.Size = new System.Drawing.Size(997, 3);
this.splitter2.TabIndex = 8;
this.splitter2.TabStop = false;
//
@ -519,10 +663,10 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.stPanel3);
this.Controls.Add(this.splitter1);
this.ClientSize = new System.Drawing.Size(1006, 679);
this.MainMenuStrip = this.stMenuStrip1;
this.Name = "BfresTexturePatternEditor";
this.Size = new System.Drawing.Size(732, 837);
this.contentContainer.ResumeLayout(false);
this.stPanel3.ResumeLayout(false);
this.stPanel5.ResumeLayout(false);
this.stPanel6.ResumeLayout(false);
@ -532,15 +676,24 @@
this.splitContainer1.ResumeLayout(false);
this.stPanel8.ResumeLayout(false);
this.stPanel8.PerformLayout();
this.stToolStrip2.ResumeLayout(false);
this.stToolStrip2.PerformLayout();
this.stPanel2.ResumeLayout(false);
this.stPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.textureFrameUD)).EndInit();
this.stPanel7.ResumeLayout(false);
this.stPanel7.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.frameCountUD)).EndInit();
this.stToolStrip1.ResumeLayout(false);
this.stToolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).EndInit();
this.stPanel1.ResumeLayout(false);
this.stPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.maxFrameCounterUD)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.currentFrameCounterUD)).EndInit();
this.stPanel4.ResumeLayout(false);
this.stMenuStrip1.ResumeLayout(false);
this.stMenuStrip1.PerformLayout();
this.ResumeLayout(false);
}
@ -561,26 +714,39 @@
private Switch_Toolbox.Library.Forms.STButton btnPlay;
private Switch_Toolbox.Library.Forms.STButton btnBackward1;
private Switch_Toolbox.Library.Forms.PictureBoxCustom pictureBoxCustom1;
private Switch_Toolbox.Library.Forms.STLabel stLabel1;
private Switch_Toolbox.Library.Forms.STComboBox samplerCB;
private Switch_Toolbox.Library.Forms.STButton btnAdd;
private Switch_Toolbox.Library.Forms.STButton btnRemove;
private System.Windows.Forms.ColumnHeader columnHeader1;
private Switch_Toolbox.Library.Forms.STLabel stLabel3;
private Switch_Toolbox.Library.Forms.STTextBox stTextBox1;
private Switch_Toolbox.Library.Forms.STLabel stLabel2;
private Switch_Toolbox.Library.Forms.STComboBox materialCB;
private System.Windows.Forms.Splitter splitter3;
private Switch_Toolbox.Library.Forms.STPanel stPanel6;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Splitter splitter4;
private Switch_Toolbox.Library.Forms.STPanel stPanel8;
private Switch_Toolbox.Library.Forms.STPanel stPanel7;
private Switch_Toolbox.Library.Forms.STButton btnEditMaterial;
private Switch_Toolbox.Library.Forms.STCheckBox loopChkBox;
private System.Windows.Forms.SplitContainer splitContainer1;
private Switch_Toolbox.Library.Forms.NumericUpDownUint textureFrameUD;
private Switch_Toolbox.Library.Forms.STLabel stLabel4;
private Switch_Toolbox.Library.Forms.STButton btnEditSamplers;
private Switch_Toolbox.Library.Forms.STToolStrip stToolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private Switch_Toolbox.Library.Forms.STMenuStrip stMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.TreeView treeView1;
private Switch_Toolbox.Library.Forms.STLabel stLabel1;
private Switch_Toolbox.Library.Forms.STPanel stPanel2;
private Switch_Toolbox.Library.Forms.STLabel stLabel2;
private Switch_Toolbox.Library.Forms.STToolStrip stToolStrip2;
private System.Windows.Forms.ToolStripButton addKeyFrameToolstrip;
private System.Windows.Forms.ToolStripButton removeKeyFrameToolstrip;
private System.Windows.Forms.ToolStripButton toolstripShiftUp;
private System.Windows.Forms.ToolStripButton toolstripShiftDown;
private Switch_Toolbox.Library.Forms.STLabel stLabel3;
private Switch_Toolbox.Library.Forms.STNumbericUpDown frameCountUD;
private Switch_Toolbox.Library.Forms.STComboBox backgroundCB;
private System.Windows.Forms.ToolStripButton toolStripButton4;
private System.Windows.Forms.ToolStripMenuItem imageToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem adjustmentsToolStripMenuItem;
private Switch_Toolbox.Library.Forms.STLabel stLabel5;
private Switch_Toolbox.Library.Forms.STComboBox activeAnimCB;
private System.Windows.Forms.ToolStripButton toolStripButton2;
}
}

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Data;
using System.Linq;
using System.Text;
@ -13,7 +14,7 @@ using Bfres.Structs;
namespace FirstPlugin.Forms
{
public partial class BfresTexturePatternEditor : UserControl
public partial class BfresTexturePatternEditor : STForm
{
public PlayerState AnimationPlayerState = PlayerState.Stop;
@ -40,11 +41,11 @@ namespace FirstPlugin.Forms
ImageList imgList = new ImageList();
public BfresTexturePatternEditor()
private List<MaterialAnimation> MaterialAnimations;
public BfresTexturePatternEditor(TreeNodeCollection materialAnimations)
{
InitializeComponent();
btnEditSamplers.Enabled = false;
listViewCustom1.HeaderStyle = ColumnHeaderStyle.None;
listViewCustom1.BackColor = FormThemes.BaseTheme.TextEditorBackColor;
imgList = new ImageList()
@ -56,23 +57,40 @@ namespace FirstPlugin.Forms
stPanel4.BackColor = FormThemes.BaseTheme.FormBackColor;
timer1.Interval = 100 / 60;
treeView1.BackColor = FormThemes.BaseTheme.FormBackColor;
treeView1.ForeColor = FormThemes.BaseTheme.FormForeColor;
toolstripShiftUp.Image.RotateFlip(RotateFlipType.RotateNoneFlipY);
backgroundCB.Items.Add("Checkerboard");
backgroundCB.Items.Add("Black");
backgroundCB.Items.Add("White");
backgroundCB.SelectedIndex = 0;
MaterialAnimations = new List<MaterialAnimation>();
foreach (TreeNode matAnim in materialAnimations)
{
MaterialAnimations.Add((MaterialAnimation)matAnim);
activeAnimCB.Items.Add(matAnim.Text);
}
}
MaterialAnimation.Material material;
FMAA.BfresSamplerAnim activeSampler;
FTXP.BfresSamplerAnim activeSampleU;
MaterialAnimation activeMaterialAnim;
MaterialAnimation _activeMaterialAnim;
MaterialAnimation ActiveMaterialAnim
{
get
{
return activeMaterialAnim;
return _activeMaterialAnim;
}
set
{
activeMaterialAnim = value;
_activeMaterialAnim = value;
maxFrameCounterUD.Maximum = value.FrameCount;
maxFrameCounterUD.Value = value.FrameCount;
@ -88,90 +106,68 @@ namespace FirstPlugin.Forms
{
}
public void LoadAnim(FTXP materialAnim)
public bool IsLoaded = false;
public void LoadAnim(MaterialAnimation materialAnim)
{
if (materialAnim.Materials.Count <= 0)
return;
IsLoaded = false;
ActiveMaterialAnim = materialAnim;
materialCB.Items.Clear();
samplerCB.Items.Clear();
foreach (var mat in materialAnim.Materials)
materialCB.Items.Add(mat.Text);
materialCB.SelectedIndex = 0;
material = materialAnim.Materials[materialCB.SelectedIndex];
if (material.Samplers.Count <= 0)
return;
foreach (var sampler in material.Samplers)
samplerCB.Items.Add(sampler.Text);
samplerCB.SelectedIndex = 0;
activeSampleU = (FTXP.BfresSamplerAnim)material.Samplers[samplerCB.SelectedIndex];
listViewCustom1.SuspendLayout();
listViewCustom1.Items.Clear();
LoadAniamtion(materialAnim, activeSampleU);
listViewCustom1.ResumeLayout();
ReloadAnimationView(materialAnim);
IsLoaded = true;
activeAnimCB.SelectItemByText(materialAnim.Text);
animationTrackBar.Value = 0;
}
public bool IsLoaded = false;
public void LoadAnim(FMAA materialAnim)
private void ReloadAnimationView(MaterialAnimation materialAnim)
{
if (materialAnim.Materials.Count <= 0)
return;
frameCountUD.Maximum = materialAnim.FrameCount;
frameCountUD.Bind(materialAnim, "FrameCount");
IsLoaded = false;
ActiveMaterialAnim = materialAnim;
materialCB.Items.Clear();
samplerCB.Items.Clear();
treeView1.Nodes.Clear();
int Index = 0;
foreach (var mat in materialAnim.Materials)
materialCB.Items.Add(mat.Text);
{
mat.Nodes.Clear();
materialCB.SelectedIndex = 0;
var matWrapper = new TreeNode(mat.Text) { Tag = mat, };
treeView1.Nodes.Add(matWrapper);
material = materialAnim.Materials[materialCB.SelectedIndex];
foreach (var sampler in mat.Samplers)
matWrapper.Nodes.Add(new TreeNode(sampler.Text) { Tag = sampler, });
if (material.Samplers.Count <= 0)
return;
if (matWrapper.Nodes.Count > 0 && Index == 0)
treeView1.SelectedNode = matWrapper.Nodes[0];
foreach (var sampler in material.Samplers)
samplerCB.Items.Add(sampler.Text);
Index++;
}
samplerCB.SelectedIndex = 0;
activeSampler = (FMAA.BfresSamplerAnim)material.Samplers[samplerCB.SelectedIndex];
ReloadAnimationView();
}
private void ReloadAnimationView()
{
listViewCustom1.SuspendLayout();
listViewCustom1.Items.Clear();
LoadAniamtion(materialAnim, activeSampler);
if (activeSampleU != null)
LoadAniamtion(ActiveMaterialAnim, activeSampleU);
else
LoadAniamtion(ActiveMaterialAnim, activeSampler);
listViewCustom1.ResumeLayout();
IsLoaded = true;
animationTrackBar.Value = 0;
if (listViewCustom1.Items.Count > 0)
{
listViewCustom1.Items[0].Selected = true;
listViewCustom1.Select();
}
}
Dictionary<int, Bitmap> Images = new Dictionary<int, Bitmap>();
@ -253,48 +249,6 @@ namespace FirstPlugin.Forms
}
private void materialCB_SelectedIndexChanged(object sender, EventArgs e)
{
if (material == null || !IsLoaded)
return;
if (materialCB.SelectedIndex >= 0)
{
btnEditSamplers.Enabled = true;
material = ActiveMaterialAnim.Materials[materialCB.SelectedIndex];
if (activeSampleU != null)
LoadAniamtion(ActiveMaterialAnim, activeSampleU);
else
LoadAniamtion(ActiveMaterialAnim, activeSampler);
}
else
{
btnEditSamplers.Enabled = false;
}
}
private void samplerCB_SelectedIndexChanged(object sender, EventArgs e)
{
if (material == null || !IsLoaded)
return;
if (samplerCB.SelectedIndex >= 0)
{
if (activeSampleU != null)
{
activeSampleU = (FTXP.BfresSamplerAnim)material.Samplers[samplerCB.SelectedIndex];
LoadAniamtion(ActiveMaterialAnim, activeSampleU);
}
else
{
activeSampler = (FMAA.BfresSamplerAnim)material.Samplers[samplerCB.SelectedIndex];
LoadAniamtion(ActiveMaterialAnim, activeSampler);
}
}
}
private void btnPlay_Click(object sender, EventArgs e)
{
if (AnimationPlayerState == PlayerState.Playing)
@ -515,19 +469,6 @@ namespace FirstPlugin.Forms
}
}
private void stButton1_Click(object sender, EventArgs e)
{
if (materialCB.SelectedIndex < 0)
return;
TexPatternInfoEditor editor = new TexPatternInfoEditor();
editor.LoadAnim(ActiveMaterialAnim, ActiveMaterialAnim.Materials[materialCB.SelectedIndex]);
if (editor.ShowDialog() == DialogResult.OK)
{
}
}
private void textureFrameUD_ValueChanged(object sender, EventArgs e)
{
if (listViewCustom1.SelectedItems.Count > 0 && KeyFrames.Count > 0)
@ -536,5 +477,60 @@ namespace FirstPlugin.Forms
}
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
if (ActiveMaterialAnim == null || !IsLoaded)
return;
var node = treeView1.SelectedNode;
if (node.Tag is MaterialAnimation.Material)
{
}
if (node.Tag is MaterialAnimation.SamplerKeyGroup)
{
if (ActiveMaterialAnim is FMAA)
activeSampler = (FMAA.BfresSamplerAnim)node.Tag;
else
activeSampleU = (FTXP.BfresSamplerAnim)node.Tag;
ReloadAnimationView();
}
}
private void addKeyFrameToolstrip_Click(object sender, EventArgs e)
{
}
private void removeKeyFrameToolstrip_Click(object sender, EventArgs e)
{
}
private void toolstripShiftUp_Click(object sender, EventArgs e)
{
}
private void toolstripShiftDown_Click(object sender, EventArgs e)
{
}
private void activeAnimCB_SelectedIndexChanged(object sender, EventArgs e)
{
if (activeAnimCB.SelectedIndex != -1 && IsLoaded)
{
ActiveMaterialAnim = MaterialAnimations[activeAnimCB.SelectedIndex];
ReloadAnimationView(ActiveMaterialAnim);
}
}
private void backgroundCB_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}

View File

@ -117,10 +117,28 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="stToolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>345, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="stToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>228, 17</value>
</metadata>
<data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
@ -326,6 +344,42 @@
UbGMiuVULFKxnIpFKpZTsYyKZVQso2KZH1Is/D4jM+80LrRKBLQZIoHmCIFJmoigv0FAZZjRKRDQqYuE
kvArnu7TMGOwQkBrBGaOgI59BJSFX8p1KhBQJ17HuoWEyvhbosYIaBiu4xxnNGq/GayHAJq139oVZ/QQ
mGk4zW7tt3aFGa0JAhPXKv5Grfv8ckaj93+veSuXxEAIUwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="stMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>104, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnStop.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -1490,4 +1544,7 @@
IYwAAAAASUVORK5CYII=
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>

View File

@ -336,7 +336,7 @@ namespace FirstPlugin
Formats.Add(typeof(ME01));
Formats.Add(typeof(LM2_DICT));
Formats.Add(typeof(GMX));
// Formats.Add(typeof(TPL));
//Formats.Add(typeof(GFA));
//Unfinished wip formats not ready for use

View File

@ -70,6 +70,16 @@ namespace FirstPlugin.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ArrowIcon {
get {
object obj = ResourceManager.GetObject("ArrowIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -127,6 +127,12 @@
<data name="Black" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black.dds;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ViewportIconDisable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewportIconDisable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewportIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewportIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AddIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AddIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -157,10 +163,7 @@
<data name="arrowMinimize " type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrowMinimize .png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewportIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewportIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewportIconDisable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewportIconDisable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ArrowIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ArrowIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -209,6 +209,7 @@
<Compile Include="FileFormats\Archives\SARC_OLD.cs" />
<Compile Include="FileFormats\Archives\SP2.cs" />
<Compile Include="FileFormats\Archives\TMPK.cs" />
<Compile Include="FileFormats\Archives\U8.cs" />
<Compile Include="FileFormats\Audio\Archives\BARS.cs" />
<Compile Include="FileFormats\Audio\BARSLIST.cs" />
<Compile Include="FileFormats\Audio\BCSTM.cs" />
@ -243,6 +244,8 @@
<Compile Include="FileFormats\Effects\PTCL_WiiU.cs" />
<Compile Include="FileFormats\Font\BFFNT.cs" />
<Compile Include="FileFormats\Audio\Archives\BFGRP.cs" />
<Compile Include="FileFormats\Gamecube\TPL.cs" />
<Compile Include="libWiiSharp\TPL.cs" />
<Compile Include="FileFormats\GFBMDL\GFBMDL.cs" />
<Compile Include="FileFormats\GFBMDL\GFBMDL_Wrappers.cs" />
<Compile Include="FileFormats\GMX\GMX.cs" />
@ -674,7 +677,7 @@
<DependentUpon>RenderInfoDataEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\BFRES\TexturePattern\BfresTexturePatternEditor.cs">
<SubType>UserControl</SubType>
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\BFRES\TexturePattern\BfresTexturePatternEditor.Designer.cs">
<DependentUpon>BfresTexturePatternEditor.cs</DependentUpon>
@ -919,7 +922,9 @@
<Compile Include="XML\BfresMaterial2XML.cs" />
<Compile Include="XML\Bfsha2Xml.cs" />
<Compile Include="XML\Sharc2XML.cs" />
<Compile Include="YAML\YamlFmaa.cs" />
<Compile Include="YAML\YamlFmat.cs" />
<Compile Include="YAML\YamlFska.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\InjectTexErrored.dds" />
@ -1280,5 +1285,8 @@
<Folder Include="FileFormats\BMD\" />
<Folder Include="FileFormats\EvemtFlow\" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ArrowIcon.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bfres.Structs;
using SharpYaml;
using SharpYaml.Serialization;
using Syroot.NintenTools.NSW.Bfres;
namespace FirstPlugin
{
public class YamlFmaa
{
public class AnimConfig
{
public string Name { get; set; }
public string Path { get; set; }
public int FrameCount { get; set; }
}
public class MatAnimConfig
{
public string Name { get; set; }
public List<PatternInfo> TexturePatternInfos { get; set; }
public List<ParamInfo> ParamInfos { get; set; }
public List<PatternInfo> TexturePatternInfo { get; set; }
}
public class ParamInfo
{
public string Name { get; set; }
public bool IsConstant { get; set; }
public AnimCurve Curve { get; set; }
}
public class PatternInfo
{
public string Name { get; set; }
public bool IsConstant { get; set; }
}
public static string ToYaml(string Name, FMAA anim)
{
var serializerSettings = new SerializerSettings()
{
EmitTags = false
};
var MatAnim = anim.MaterialAnim;
var config = new AnimConfig();
var serializer = new Serializer(serializerSettings);
return serializer.Serialize(anim);
}
}
}

View File

@ -8,7 +8,7 @@ using SharpYaml;
using SharpYaml.Serialization;
using Syroot.NintenTools.NSW.Bfres;
namespace FirstPlugin.YAML
namespace FirstPlugin
{
public class YamlFmat
{

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bfres.Structs;
using SharpYaml;
using SharpYaml.Serialization;
using Syroot.NintenTools.NSW.Bfres;
namespace FirstPlugin
{
public class YamlFska
{
public static string ToYaml(string Name, FSKA skeletalAnim)
{
var serializerSettings = new SerializerSettings()
{
EmitTags = false
};
var serializer = new Serializer(serializerSettings);
return serializer.Serialize(skeletalAnim);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ namespace Switch_Toolbox.Library.Animations
public bool IsBaked { get; set; }
public float Frame = 0;
public int FrameCount = 0;
public int FrameCount { get; set; } = 0;
public List<KeyNode> Bones = new List<KeyNode>();

View File

@ -729,6 +729,7 @@
<Compile Include="ThemeConfig.cs" />
<Compile Include="UpdateProgram.cs" />
<Compile Include="Util\ColorUtility.cs" />
<Compile Include="Util\ImageUtilty.cs" />
<Compile Include="Util\OpenGLUtils.cs" />
<Compile Include="Util\Util.cs" />
<Compile Include="XML\XmlDoc.cs" />

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Switch_Toolbox.Library
{
public class ImageUtilty
{
public static byte[] ConvertBgraToRgba(byte[] bytes)
{
if (bytes == null)
throw new Exception("Data block returned null. Make sure the parameters and image properties are correct!");
for (int i = 0; i < bytes.Length; i += 4)
{
var temp = bytes[i];
bytes[i] = bytes[i + 2];
bytes[i + 2] = temp;
}
return bytes;
}
}
}