Make exporting texture channel components for dae optional.

This commit is contained in:
KillzXGaming 2020-05-05 17:23:11 -04:00
parent 2464d6f5ad
commit 113573b408
3 changed files with 24 additions and 1 deletions

View file

@ -25,6 +25,7 @@ namespace Toolbox.Library
public bool UseVertexColors = true;
public bool FlipTexCoordsVertical = true;
public bool OnlyExportRiggedBones = false;
public bool UseTextureChannelComponents = true;
public bool TransformColorUVs = false;
@ -111,7 +112,8 @@ namespace Toolbox.Library
var bitmap = Textures[i].GetBitmap();
if (bitmap != null)
{
bitmap = Textures[i].GetComponentBitmap(bitmap);
if (settings.UseTextureChannelComponents)
bitmap = Textures[i].GetComponentBitmap(bitmap);
string textureName = Textures[i].Text;
if (textureName.RemoveIllegaleFileNameCharacters() != textureName)
{

View file

@ -36,11 +36,13 @@
this.chkVertexColors = new Toolbox.Library.Forms.STCheckBox();
this.chkExportRiggedBonesOnly = new Toolbox.Library.Forms.STCheckBox();
this.chkApplyUVTransforms = new Toolbox.Library.Forms.STCheckBox();
this.chkTextureChannelComps = new Toolbox.Library.Forms.STCheckBox();
this.contentContainer.SuspendLayout();
this.SuspendLayout();
//
// contentContainer
//
this.contentContainer.Controls.Add(this.chkTextureChannelComps);
this.contentContainer.Controls.Add(this.chkApplyUVTransforms);
this.contentContainer.Controls.Add(this.chkExportRiggedBonesOnly);
this.contentContainer.Controls.Add(this.chkVertexColors);
@ -59,6 +61,7 @@
this.contentContainer.Controls.SetChildIndex(this.chkVertexColors, 0);
this.contentContainer.Controls.SetChildIndex(this.chkExportRiggedBonesOnly, 0);
this.contentContainer.Controls.SetChildIndex(this.chkApplyUVTransforms, 0);
this.contentContainer.Controls.SetChildIndex(this.chkTextureChannelComps, 0);
//
// exportTexturesChkBox
//
@ -153,6 +156,19 @@
this.chkApplyUVTransforms.UseVisualStyleBackColor = true;
this.chkApplyUVTransforms.CheckedChanged += new System.EventHandler(this.chkApplyUVTransforms_CheckedChanged);
//
// chkTextureChannelComps
//
this.chkTextureChannelComps.AutoSize = true;
this.chkTextureChannelComps.Checked = true;
this.chkTextureChannelComps.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkTextureChannelComps.Location = new System.Drawing.Point(153, 47);
this.chkTextureChannelComps.Name = "chkTextureChannelComps";
this.chkTextureChannelComps.Size = new System.Drawing.Size(161, 17);
this.chkTextureChannelComps.TabIndex = 19;
this.chkTextureChannelComps.Text = "Use Texture Channel Swaps";
this.chkTextureChannelComps.UseVisualStyleBackColor = true;
this.chkTextureChannelComps.CheckedChanged += new System.EventHandler(this.chkTextureChannelComps_CheckedChanged);
//
// ExportModelSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -176,5 +192,6 @@
private STCheckBox chkVertexColors;
private STCheckBox chkExportRiggedBonesOnly;
private STCheckBox chkApplyUVTransforms;
private STCheckBox chkTextureChannelComps;
}
}

View file

@ -50,5 +50,9 @@ namespace Toolbox.Library.Forms
private void chkApplyUVTransforms_CheckedChanged(object sender, EventArgs e) {
Settings.TransformColorUVs = chkApplyUVTransforms.Checked;
}
private void chkTextureChannelComps_CheckedChanged(object sender, EventArgs e) {
Settings.UseTextureChannelComponents = chkApplyUVTransforms.Checked;
}
}
}