Fix sub files issues
This commit is contained in:
parent
4865ca1a8f
commit
c173edd611
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -237,6 +237,7 @@ namespace Bfres.Structs
|
|||||||
fmdl.ModelU = new ResU.Model();
|
fmdl.ModelU = new ResU.Model();
|
||||||
fmdl.ModelU.Name = ResourceName;
|
fmdl.ModelU.Name = ResourceName;
|
||||||
fmdl.ModelU.Shapes.Add("", new ResU.Shape());
|
fmdl.ModelU.Shapes.Add("", new ResU.Shape());
|
||||||
|
fmdl.ModelU.Materials.Add("", new ResU.Material());
|
||||||
fmdl.ModelU.VertexBuffers.Add(new ResU.VertexBuffer());
|
fmdl.ModelU.VertexBuffers.Add(new ResU.VertexBuffer());
|
||||||
|
|
||||||
var skeleton = new ResU.Skeleton();
|
var skeleton = new ResU.Skeleton();
|
||||||
|
@ -99,6 +99,7 @@ namespace FirstPlugin
|
|||||||
{
|
{
|
||||||
if (model == null)
|
if (model == null)
|
||||||
model = new FMDL();
|
model = new FMDL();
|
||||||
|
|
||||||
model.Text = mdl.Name;
|
model.Text = mdl.Name;
|
||||||
model.Skeleton = new FSKL(mdl.Skeleton);
|
model.Skeleton = new FSKL(mdl.Skeleton);
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ namespace FirstPlugin
|
|||||||
{
|
{
|
||||||
public bool OverrideMipCounter = false;
|
public bool OverrideMipCounter = false;
|
||||||
|
|
||||||
|
bool IsLoaded = false;
|
||||||
public GTXTextureImporter()
|
public GTXTextureImporter()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -68,8 +69,10 @@ namespace FirstPlugin
|
|||||||
ImgDimComb.Items.Add(GX2.GX2SurfaceDimension.DIM_LAST);
|
ImgDimComb.Items.Add(GX2.GX2SurfaceDimension.DIM_LAST);
|
||||||
|
|
||||||
ImgDimComb.SelectedItem = GX2.GX2SurfaceDimension.DIM_2D;
|
ImgDimComb.SelectedItem = GX2.GX2SurfaceDimension.DIM_2D;
|
||||||
tileModeCB.SelectedItem = GX2.GX2TileMode.MODE_2D_TILED_THIN1;
|
tileModeCB.SelectedItem = GX2.GX2TileMode.MODE_DEFAULT;
|
||||||
formatComboBox.SelectedItem = GX2.GX2SurfaceFormat.T_BC1_SRGB;
|
formatComboBox.SelectedItem = GX2.GX2SurfaceFormat.T_BC1_SRGB;
|
||||||
|
|
||||||
|
IsLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadSupportedFormats(TEX_FORMAT[] Formats)
|
public void LoadSupportedFormats(TEX_FORMAT[] Formats)
|
||||||
@ -150,11 +153,20 @@ namespace FirstPlugin
|
|||||||
SelectedTexSettings.tileMode = (uint)tileModeCB.SelectedItem;
|
SelectedTexSettings.tileMode = (uint)tileModeCB.SelectedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DialogShown = false;
|
||||||
private void formatComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
private void formatComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (formatComboBox.SelectedIndex > -1 && SelectedTexSettings != null)
|
if (formatComboBox.SelectedIndex > -1 && SelectedTexSettings != null)
|
||||||
{
|
{
|
||||||
SetupSettings();
|
SetupSettings();
|
||||||
|
|
||||||
|
if (formatComboBox.SelectedIndex != 0 && IsLoaded)
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show("Warning! Only change the tile mode unless you know what you are doing!", "Texture Importer", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
||||||
|
if (result == DialogResult.Cancel)
|
||||||
|
formatComboBox.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +191,7 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
MipmapNum.Value = SelectedTexSettings.MipCount;
|
MipmapNum.Value = SelectedTexSettings.MipCount;
|
||||||
|
|
||||||
SwizzleNum.Value = SelectedTexSettings.swizzle;
|
SwizzleNum.Value = SelectedTexSettings.swizzle >> 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +260,7 @@ namespace FirstPlugin
|
|||||||
this.SwizzleNum.ForeColor = System.Drawing.Color.White;
|
this.SwizzleNum.ForeColor = System.Drawing.Color.White;
|
||||||
this.SwizzleNum.Location = new System.Drawing.Point(877, 142);
|
this.SwizzleNum.Location = new System.Drawing.Point(877, 142);
|
||||||
this.SwizzleNum.Maximum = new decimal(new int[] {
|
this.SwizzleNum.Maximum = new decimal(new int[] {
|
||||||
-1,
|
7,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
@ -268,10 +280,13 @@ namespace FirstPlugin
|
|||||||
//
|
//
|
||||||
// tileModeCB
|
// tileModeCB
|
||||||
//
|
//
|
||||||
this.tileModeCB.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
|
this.tileModeCB.BorderColor = System.Drawing.Color.Empty;
|
||||||
|
this.tileModeCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
|
||||||
|
this.tileModeCB.ButtonColor = System.Drawing.Color.Empty;
|
||||||
this.tileModeCB.FormattingEnabled = true;
|
this.tileModeCB.FormattingEnabled = true;
|
||||||
this.tileModeCB.Location = new System.Drawing.Point(877, 69);
|
this.tileModeCB.Location = new System.Drawing.Point(877, 69);
|
||||||
this.tileModeCB.Name = "tileModeCB";
|
this.tileModeCB.Name = "tileModeCB";
|
||||||
|
this.tileModeCB.ReadOnly = true;
|
||||||
this.tileModeCB.Size = new System.Drawing.Size(172, 21);
|
this.tileModeCB.Size = new System.Drawing.Size(172, 21);
|
||||||
this.tileModeCB.TabIndex = 42;
|
this.tileModeCB.TabIndex = 42;
|
||||||
this.tileModeCB.SelectedIndexChanged += new System.EventHandler(this.tileModeCB_SelectedIndexChanged);
|
this.tileModeCB.SelectedIndexChanged += new System.EventHandler(this.tileModeCB_SelectedIndexChanged);
|
||||||
@ -287,10 +302,13 @@ namespace FirstPlugin
|
|||||||
//
|
//
|
||||||
// ImgDimComb
|
// ImgDimComb
|
||||||
//
|
//
|
||||||
this.ImgDimComb.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
|
this.ImgDimComb.BorderColor = System.Drawing.Color.Empty;
|
||||||
|
this.ImgDimComb.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
|
||||||
|
this.ImgDimComb.ButtonColor = System.Drawing.Color.Empty;
|
||||||
this.ImgDimComb.FormattingEnabled = true;
|
this.ImgDimComb.FormattingEnabled = true;
|
||||||
this.ImgDimComb.Location = new System.Drawing.Point(875, 36);
|
this.ImgDimComb.Location = new System.Drawing.Point(875, 36);
|
||||||
this.ImgDimComb.Name = "ImgDimComb";
|
this.ImgDimComb.Name = "ImgDimComb";
|
||||||
|
this.ImgDimComb.ReadOnly = true;
|
||||||
this.ImgDimComb.Size = new System.Drawing.Size(172, 21);
|
this.ImgDimComb.Size = new System.Drawing.Size(172, 21);
|
||||||
this.ImgDimComb.TabIndex = 40;
|
this.ImgDimComb.TabIndex = 40;
|
||||||
//
|
//
|
||||||
@ -356,10 +374,13 @@ namespace FirstPlugin
|
|||||||
//
|
//
|
||||||
// formatComboBox
|
// formatComboBox
|
||||||
//
|
//
|
||||||
this.formatComboBox.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
|
this.formatComboBox.BorderColor = System.Drawing.Color.Empty;
|
||||||
|
this.formatComboBox.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
|
||||||
|
this.formatComboBox.ButtonColor = System.Drawing.Color.Empty;
|
||||||
this.formatComboBox.FormattingEnabled = true;
|
this.formatComboBox.FormattingEnabled = true;
|
||||||
this.formatComboBox.Location = new System.Drawing.Point(875, 6);
|
this.formatComboBox.Location = new System.Drawing.Point(875, 6);
|
||||||
this.formatComboBox.Name = "formatComboBox";
|
this.formatComboBox.Name = "formatComboBox";
|
||||||
|
this.formatComboBox.ReadOnly = true;
|
||||||
this.formatComboBox.Size = new System.Drawing.Size(172, 21);
|
this.formatComboBox.Size = new System.Drawing.Size(172, 21);
|
||||||
this.formatComboBox.TabIndex = 32;
|
this.formatComboBox.TabIndex = 32;
|
||||||
this.formatComboBox.SelectedIndexChanged += new System.EventHandler(this.formatComboBox_SelectedIndexChanged);
|
this.formatComboBox.SelectedIndexChanged += new System.EventHandler(this.formatComboBox_SelectedIndexChanged);
|
||||||
@ -367,6 +388,7 @@ namespace FirstPlugin
|
|||||||
// listViewCustom1
|
// listViewCustom1
|
||||||
//
|
//
|
||||||
this.listViewCustom1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
this.listViewCustom1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
|
this.listViewCustom1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
this.listViewCustom1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
this.listViewCustom1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
this.Name,
|
this.Name,
|
||||||
this.Format});
|
this.Format});
|
||||||
@ -416,7 +438,6 @@ namespace FirstPlugin
|
|||||||
//
|
//
|
||||||
// pictureBox1
|
// pictureBox1
|
||||||
//
|
//
|
||||||
this.pictureBox1.BackColor = System.Drawing.Color.Empty;
|
|
||||||
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
|
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
|
||||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
|
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.pictureBox1.Location = new System.Drawing.Point(237, 0);
|
this.pictureBox1.Location = new System.Drawing.Point(237, 0);
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user