mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-15 11:04:16 -04:00
Add option to manually bind UV map types
This commit is contained in:
@ -37,18 +37,19 @@ namespace AssetStudioGUI
|
||||
private AssetItem lastPreviewItem;
|
||||
private DirectBitmap imageTexture;
|
||||
private string tempClipboard;
|
||||
private bool isDarkMode;
|
||||
|
||||
#region FMODControl
|
||||
private FMOD.System system;
|
||||
private FMOD.Sound sound;
|
||||
private FMOD.Channel channel;
|
||||
private FMOD.SoundGroup masterSoundGroup;
|
||||
private FMOD.MODE loopMode = FMOD.MODE.LOOP_OFF;
|
||||
private byte[] soundBuff;
|
||||
private uint FMODlenms;
|
||||
private uint FMODloopstartms;
|
||||
private uint FMODloopendms;
|
||||
private float FMODVolume = 0.8f;
|
||||
private bool isDarkMode;
|
||||
#endregion
|
||||
|
||||
#region SpriteControl
|
||||
private SpriteMaskMode spriteMaskVisibleMode = SpriteMaskMode.On;
|
||||
@ -146,6 +147,10 @@ namespace AssetStudioGUI
|
||||
autoPlayAudioAssetsToolStripMenuItem.Checked = Properties.Settings.Default.autoplayAudio;
|
||||
FMODinit();
|
||||
listSearchFilterMode.SelectedIndex = 0;
|
||||
if (string.IsNullOrEmpty(Properties.Settings.Default.fbxSettings))
|
||||
{
|
||||
FBXinitOptions();
|
||||
}
|
||||
|
||||
logger = new GUILogger(StatusStripUpdate);
|
||||
Logger.Default = logger;
|
||||
@ -2582,6 +2587,12 @@ namespace AssetStudioGUI
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void FBXinitOptions()
|
||||
{
|
||||
Properties.Settings.Default.fbxSettings = new Fbx.Settings().ToBase64();
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
#region FMOD
|
||||
private void FMODinit()
|
||||
{
|
||||
|
158
AssetStudioGUI/ExportOptions.Designer.cs
generated
158
AssetStudioGUI/ExportOptions.Designer.cs
generated
@ -60,6 +60,9 @@
|
||||
this.l2dMotionExportMethodLabel = new System.Windows.Forms.Label();
|
||||
this.l2dForceBezierCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.uvBindingsLabel = new System.Windows.Forms.Label();
|
||||
this.uvIndicesCheckedListBox = new System.Windows.Forms.CheckedListBox();
|
||||
this.uvTypesListBox = new System.Windows.Forms.ListBox();
|
||||
this.exportAllUvsAsDiffuseMaps = new System.Windows.Forms.CheckBox();
|
||||
this.exportBlendShape = new System.Windows.Forms.CheckBox();
|
||||
this.exportAnimations = new System.Windows.Forms.CheckBox();
|
||||
@ -78,6 +81,7 @@
|
||||
this.exportAllNodes = new System.Windows.Forms.CheckBox();
|
||||
this.eulerFilter = new System.Windows.Forms.CheckBox();
|
||||
this.optionTooltip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.fbxResetButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.parallelExportUpDown)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
@ -92,7 +96,7 @@
|
||||
// OKbutton
|
||||
//
|
||||
this.OKbutton.BackColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.OKbutton.Location = new System.Drawing.Point(396, 430);
|
||||
this.OKbutton.Location = new System.Drawing.Point(460, 430);
|
||||
this.OKbutton.Name = "OKbutton";
|
||||
this.OKbutton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKbutton.TabIndex = 4;
|
||||
@ -104,7 +108,7 @@
|
||||
//
|
||||
this.Cancel.BackColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Location = new System.Drawing.Point(477, 430);
|
||||
this.Cancel.Location = new System.Drawing.Point(541, 430);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 5;
|
||||
@ -463,6 +467,10 @@
|
||||
//
|
||||
this.groupBox2.AutoSize = true;
|
||||
this.groupBox2.BackColor = System.Drawing.SystemColors.Menu;
|
||||
this.groupBox2.Controls.Add(this.fbxResetButton);
|
||||
this.groupBox2.Controls.Add(this.uvBindingsLabel);
|
||||
this.groupBox2.Controls.Add(this.uvIndicesCheckedListBox);
|
||||
this.groupBox2.Controls.Add(this.uvTypesListBox);
|
||||
this.groupBox2.Controls.Add(this.exportAllUvsAsDiffuseMaps);
|
||||
this.groupBox2.Controls.Add(this.exportBlendShape);
|
||||
this.groupBox2.Controls.Add(this.exportAnimations);
|
||||
@ -482,33 +490,84 @@
|
||||
this.groupBox2.Controls.Add(this.eulerFilter);
|
||||
this.groupBox2.Location = new System.Drawing.Point(328, 13);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(224, 411);
|
||||
this.groupBox2.Size = new System.Drawing.Size(289, 411);
|
||||
this.groupBox2.TabIndex = 3;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Fbx";
|
||||
//
|
||||
// uvBindingsLabel
|
||||
//
|
||||
this.uvBindingsLabel.AutoSize = true;
|
||||
this.uvBindingsLabel.Location = new System.Drawing.Point(6, 173);
|
||||
this.uvBindingsLabel.Name = "uvBindingsLabel";
|
||||
this.uvBindingsLabel.Size = new System.Drawing.Size(87, 13);
|
||||
this.uvBindingsLabel.TabIndex = 17;
|
||||
this.uvBindingsLabel.Text = "UV type bindings";
|
||||
//
|
||||
// uvIndicesCheckedListBox
|
||||
//
|
||||
this.uvIndicesCheckedListBox.FormattingEnabled = true;
|
||||
this.uvIndicesCheckedListBox.IntegralHeight = false;
|
||||
this.uvIndicesCheckedListBox.Items.AddRange(new object[] {
|
||||
"UV0",
|
||||
"UV1",
|
||||
"UV2",
|
||||
"UV3",
|
||||
"UV4",
|
||||
"UV5",
|
||||
"UV6",
|
||||
"UV7"});
|
||||
this.uvIndicesCheckedListBox.Location = new System.Drawing.Point(11, 192);
|
||||
this.uvIndicesCheckedListBox.Name = "uvIndicesCheckedListBox";
|
||||
this.uvIndicesCheckedListBox.ScrollAlwaysVisible = true;
|
||||
this.uvIndicesCheckedListBox.Size = new System.Drawing.Size(125, 95);
|
||||
this.uvIndicesCheckedListBox.TabIndex = 18;
|
||||
this.uvIndicesCheckedListBox.SelectedIndexChanged += new System.EventHandler(this.uvIndicesCheckedListBox_SelectedIndexChanged);
|
||||
//
|
||||
// uvTypesListBox
|
||||
//
|
||||
this.uvTypesListBox.FormattingEnabled = true;
|
||||
this.uvTypesListBox.IntegralHeight = false;
|
||||
this.uvTypesListBox.Items.AddRange(new object[] {
|
||||
"Diffuse",
|
||||
"NormalMap",
|
||||
"Displacement",
|
||||
"Specular",
|
||||
"Bump",
|
||||
"Emissive",
|
||||
"Ambient",
|
||||
"Shininess",
|
||||
"Reflection",
|
||||
"Transparency"});
|
||||
this.uvTypesListBox.Location = new System.Drawing.Point(150, 192);
|
||||
this.uvTypesListBox.Name = "uvTypesListBox";
|
||||
this.uvTypesListBox.ScrollAlwaysVisible = true;
|
||||
this.uvTypesListBox.Size = new System.Drawing.Size(125, 95);
|
||||
this.uvTypesListBox.TabIndex = 19;
|
||||
this.uvTypesListBox.SelectedIndexChanged += new System.EventHandler(this.uvTypesListBox_SelectedIndexChanged);
|
||||
//
|
||||
// exportAllUvsAsDiffuseMaps
|
||||
//
|
||||
this.exportAllUvsAsDiffuseMaps.AccessibleDescription = "";
|
||||
this.exportAllUvsAsDiffuseMaps.AutoSize = true;
|
||||
this.exportAllUvsAsDiffuseMaps.Location = new System.Drawing.Point(6, 185);
|
||||
this.exportAllUvsAsDiffuseMaps.Location = new System.Drawing.Point(6, 292);
|
||||
this.exportAllUvsAsDiffuseMaps.Name = "exportAllUvsAsDiffuseMaps";
|
||||
this.exportAllUvsAsDiffuseMaps.Size = new System.Drawing.Size(168, 17);
|
||||
this.exportAllUvsAsDiffuseMaps.TabIndex = 9;
|
||||
this.exportAllUvsAsDiffuseMaps.TabIndex = 20;
|
||||
this.exportAllUvsAsDiffuseMaps.Text = "Export all UVs as diffuse maps";
|
||||
this.optionTooltip.SetToolTip(this.exportAllUvsAsDiffuseMaps, "Unchecked: UV1 exported as normal map. Check this if your export is missing a UV " +
|
||||
"map.");
|
||||
this.optionTooltip.SetToolTip(this.exportAllUvsAsDiffuseMaps, "Check this if some UV maps are missing after export (e.g. in Blender)");
|
||||
this.exportAllUvsAsDiffuseMaps.UseVisualStyleBackColor = true;
|
||||
this.exportAllUvsAsDiffuseMaps.CheckedChanged += new System.EventHandler(this.exportAllUvsAsDiffuseMaps_CheckedChanged);
|
||||
//
|
||||
// exportBlendShape
|
||||
//
|
||||
this.exportBlendShape.AutoSize = true;
|
||||
this.exportBlendShape.Checked = true;
|
||||
this.exportBlendShape.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.exportBlendShape.Location = new System.Drawing.Point(6, 138);
|
||||
this.exportBlendShape.Location = new System.Drawing.Point(6, 114);
|
||||
this.exportBlendShape.Name = "exportBlendShape";
|
||||
this.exportBlendShape.Size = new System.Drawing.Size(114, 17);
|
||||
this.exportBlendShape.TabIndex = 7;
|
||||
this.exportBlendShape.TabIndex = 5;
|
||||
this.exportBlendShape.Text = "Export blendshape";
|
||||
this.exportBlendShape.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -517,10 +576,10 @@
|
||||
this.exportAnimations.AutoSize = true;
|
||||
this.exportAnimations.Checked = true;
|
||||
this.exportAnimations.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.exportAnimations.Location = new System.Drawing.Point(6, 114);
|
||||
this.exportAnimations.Location = new System.Drawing.Point(6, 91);
|
||||
this.exportAnimations.Name = "exportAnimations";
|
||||
this.exportAnimations.Size = new System.Drawing.Size(109, 17);
|
||||
this.exportAnimations.TabIndex = 6;
|
||||
this.exportAnimations.TabIndex = 4;
|
||||
this.exportAnimations.Text = "Export animations";
|
||||
this.exportAnimations.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -532,11 +591,10 @@
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.scaleFactor.Location = new System.Drawing.Point(83, 243);
|
||||
this.scaleFactor.Location = new System.Drawing.Point(233, 73);
|
||||
this.scaleFactor.Name = "scaleFactor";
|
||||
this.scaleFactor.Size = new System.Drawing.Size(60, 20);
|
||||
this.scaleFactor.TabIndex = 13;
|
||||
this.scaleFactor.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.scaleFactor.Size = new System.Drawing.Size(50, 20);
|
||||
this.scaleFactor.TabIndex = 12;
|
||||
this.scaleFactor.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
@ -546,10 +604,10 @@
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(6, 245);
|
||||
this.label5.Location = new System.Drawing.Point(163, 75);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(64, 13);
|
||||
this.label5.TabIndex = 12;
|
||||
this.label5.TabIndex = 11;
|
||||
this.label5.Text = "ScaleFactor";
|
||||
//
|
||||
// fbxFormat
|
||||
@ -559,18 +617,18 @@
|
||||
this.fbxFormat.Items.AddRange(new object[] {
|
||||
"Binary",
|
||||
"Ascii"});
|
||||
this.fbxFormat.Location = new System.Drawing.Point(77, 275);
|
||||
this.fbxFormat.Location = new System.Drawing.Point(222, 103);
|
||||
this.fbxFormat.Name = "fbxFormat";
|
||||
this.fbxFormat.Size = new System.Drawing.Size(61, 21);
|
||||
this.fbxFormat.TabIndex = 15;
|
||||
this.fbxFormat.TabIndex = 14;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(6, 280);
|
||||
this.label4.Location = new System.Drawing.Point(156, 106);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(59, 13);
|
||||
this.label4.TabIndex = 14;
|
||||
this.label4.TabIndex = 13;
|
||||
this.label4.Text = "FBXFormat";
|
||||
//
|
||||
// fbxVersion
|
||||
@ -584,26 +642,26 @@
|
||||
"7.3",
|
||||
"7.4",
|
||||
"7.5"});
|
||||
this.fbxVersion.Location = new System.Drawing.Point(77, 308);
|
||||
this.fbxVersion.Location = new System.Drawing.Point(236, 135);
|
||||
this.fbxVersion.Name = "fbxVersion";
|
||||
this.fbxVersion.Size = new System.Drawing.Size(47, 21);
|
||||
this.fbxVersion.TabIndex = 17;
|
||||
this.fbxVersion.TabIndex = 16;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 311);
|
||||
this.label3.Location = new System.Drawing.Point(168, 138);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(62, 13);
|
||||
this.label3.TabIndex = 16;
|
||||
this.label3.TabIndex = 15;
|
||||
this.label3.Text = "FBXVersion";
|
||||
//
|
||||
// boneSize
|
||||
//
|
||||
this.boneSize.Location = new System.Drawing.Point(65, 213);
|
||||
this.boneSize.Location = new System.Drawing.Point(233, 47);
|
||||
this.boneSize.Name = "boneSize";
|
||||
this.boneSize.Size = new System.Drawing.Size(46, 20);
|
||||
this.boneSize.TabIndex = 11;
|
||||
this.boneSize.Size = new System.Drawing.Size(50, 20);
|
||||
this.boneSize.TabIndex = 10;
|
||||
this.boneSize.Value = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
@ -613,10 +671,10 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 216);
|
||||
this.label2.Location = new System.Drawing.Point(175, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(52, 13);
|
||||
this.label2.TabIndex = 10;
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "BoneSize";
|
||||
//
|
||||
// exportSkins
|
||||
@ -624,20 +682,20 @@
|
||||
this.exportSkins.AutoSize = true;
|
||||
this.exportSkins.Checked = true;
|
||||
this.exportSkins.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.exportSkins.Location = new System.Drawing.Point(6, 90);
|
||||
this.exportSkins.Location = new System.Drawing.Point(6, 68);
|
||||
this.exportSkins.Name = "exportSkins";
|
||||
this.exportSkins.Size = new System.Drawing.Size(83, 17);
|
||||
this.exportSkins.TabIndex = 5;
|
||||
this.exportSkins.TabIndex = 3;
|
||||
this.exportSkins.Text = "Export skins";
|
||||
this.exportSkins.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(26, 42);
|
||||
this.label1.Location = new System.Drawing.Point(155, 23);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(72, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "FilterPrecision";
|
||||
//
|
||||
// filterPrecision
|
||||
@ -648,10 +706,10 @@
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.filterPrecision.Location = new System.Drawing.Point(127, 40);
|
||||
this.filterPrecision.Location = new System.Drawing.Point(233, 21);
|
||||
this.filterPrecision.Name = "filterPrecision";
|
||||
this.filterPrecision.Size = new System.Drawing.Size(51, 20);
|
||||
this.filterPrecision.TabIndex = 3;
|
||||
this.filterPrecision.Size = new System.Drawing.Size(50, 20);
|
||||
this.filterPrecision.TabIndex = 8;
|
||||
this.filterPrecision.Value = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
@ -661,10 +719,10 @@
|
||||
// castToBone
|
||||
//
|
||||
this.castToBone.AutoSize = true;
|
||||
this.castToBone.Location = new System.Drawing.Point(6, 161);
|
||||
this.castToBone.Location = new System.Drawing.Point(6, 137);
|
||||
this.castToBone.Name = "castToBone";
|
||||
this.castToBone.Size = new System.Drawing.Size(131, 17);
|
||||
this.castToBone.TabIndex = 8;
|
||||
this.castToBone.TabIndex = 6;
|
||||
this.castToBone.Text = "All nodes cast to bone";
|
||||
this.castToBone.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -673,10 +731,10 @@
|
||||
this.exportAllNodes.AutoSize = true;
|
||||
this.exportAllNodes.Checked = true;
|
||||
this.exportAllNodes.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.exportAllNodes.Location = new System.Drawing.Point(6, 66);
|
||||
this.exportAllNodes.Location = new System.Drawing.Point(6, 45);
|
||||
this.exportAllNodes.Name = "exportAllNodes";
|
||||
this.exportAllNodes.Size = new System.Drawing.Size(101, 17);
|
||||
this.exportAllNodes.TabIndex = 4;
|
||||
this.exportAllNodes.TabIndex = 2;
|
||||
this.exportAllNodes.Text = "Export all nodes";
|
||||
this.exportAllNodes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -692,6 +750,17 @@
|
||||
this.eulerFilter.Text = "EulerFilter";
|
||||
this.eulerFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// fbxResetButton
|
||||
//
|
||||
this.fbxResetButton.BackColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.fbxResetButton.Location = new System.Drawing.Point(208, 368);
|
||||
this.fbxResetButton.Name = "fbxResetButton";
|
||||
this.fbxResetButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.fbxResetButton.TabIndex = 21;
|
||||
this.fbxResetButton.Text = "Reset";
|
||||
this.fbxResetButton.UseVisualStyleBackColor = false;
|
||||
this.fbxResetButton.Click += new System.EventHandler(this.resetButton_Click);
|
||||
//
|
||||
// ExportOptions
|
||||
//
|
||||
this.AcceptButton = this.OKbutton;
|
||||
@ -699,7 +768,7 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Menu;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(564, 461);
|
||||
this.ClientSize = new System.Drawing.Size(628, 461);
|
||||
this.Controls.Add(this.l2dGroupBox);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
@ -712,7 +781,6 @@
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Export options";
|
||||
this.TopMost = true;
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.parallelExportUpDown)).EndInit();
|
||||
@ -782,5 +850,9 @@
|
||||
private System.Windows.Forms.Label l2dModelGroupLabel;
|
||||
private System.Windows.Forms.ComboBox l2dModelGroupComboBox;
|
||||
private System.Windows.Forms.CheckBox l2dAssetSearchByFilenameCheckBox;
|
||||
private System.Windows.Forms.CheckedListBox uvIndicesCheckedListBox;
|
||||
private System.Windows.Forms.ListBox uvTypesListBox;
|
||||
private System.Windows.Forms.Label uvBindingsLabel;
|
||||
private System.Windows.Forms.Button fbxResetButton;
|
||||
}
|
||||
}
|
@ -7,6 +7,8 @@ namespace AssetStudioGUI
|
||||
{
|
||||
public partial class ExportOptions : Form
|
||||
{
|
||||
private static Fbx.Settings fbxSettings;
|
||||
|
||||
public ExportOptions()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -25,23 +27,15 @@ namespace AssetStudioGUI
|
||||
parallelExportUpDown.Value = taskCount <= 0 ? maxParallelTasks : Math.Min(taskCount, maxParallelTasks);
|
||||
parallelExportMaxLabel.Text += maxParallelTasks;
|
||||
parallelExportCheckBox.Checked = Properties.Settings.Default.parallelExport;
|
||||
eulerFilter.Checked = Properties.Settings.Default.eulerFilter;
|
||||
filterPrecision.Value = Properties.Settings.Default.filterPrecision;
|
||||
exportAllNodes.Checked = Properties.Settings.Default.exportAllNodes;
|
||||
exportSkins.Checked = Properties.Settings.Default.exportSkins;
|
||||
exportAnimations.Checked = Properties.Settings.Default.exportAnimations;
|
||||
exportBlendShape.Checked = Properties.Settings.Default.exportBlendShape;
|
||||
castToBone.Checked = Properties.Settings.Default.castToBone;
|
||||
exportAllUvsAsDiffuseMaps.Checked = Properties.Settings.Default.exportAllUvsAsDiffuseMaps;
|
||||
boneSize.Value = Properties.Settings.Default.boneSize;
|
||||
scaleFactor.Value = Properties.Settings.Default.scaleFactor;
|
||||
fbxVersion.SelectedIndex = Properties.Settings.Default.fbxVersion;
|
||||
fbxFormat.SelectedIndex = Properties.Settings.Default.fbxFormat;
|
||||
|
||||
l2dModelGroupComboBox.SelectedIndex = (int)Properties.Settings.Default.l2dModelGroupOption;
|
||||
l2dAssetSearchByFilenameCheckBox.Checked = Properties.Settings.Default.l2dAssetSearchByFilename;
|
||||
var defaultMotionMode = Properties.Settings.Default.l2dMotionMode.ToString();
|
||||
((RadioButton)l2dMotionExportMethodPanel.Controls.Cast<Control>().First(x => x.AccessibleName == defaultMotionMode)).Checked = true;
|
||||
l2dForceBezierCheckBox.Checked = Properties.Settings.Default.l2dForceBezier;
|
||||
|
||||
fbxSettings = Fbx.Settings.FromBase64(Properties.Settings.Default.fbxSettings);
|
||||
SetFromFbxSettings();
|
||||
}
|
||||
|
||||
private void OKbutton_Click(object sender, EventArgs e)
|
||||
@ -57,23 +51,34 @@ namespace AssetStudioGUI
|
||||
Properties.Settings.Default.openAfterExport = openAfterExport.Checked;
|
||||
Properties.Settings.Default.parallelExport = parallelExportCheckBox.Checked;
|
||||
Properties.Settings.Default.parallelExportCount = (int)parallelExportUpDown.Value;
|
||||
Properties.Settings.Default.eulerFilter = eulerFilter.Checked;
|
||||
Properties.Settings.Default.filterPrecision = filterPrecision.Value;
|
||||
Properties.Settings.Default.exportAllNodes = exportAllNodes.Checked;
|
||||
Properties.Settings.Default.exportSkins = exportSkins.Checked;
|
||||
Properties.Settings.Default.exportAnimations = exportAnimations.Checked;
|
||||
Properties.Settings.Default.exportBlendShape = exportBlendShape.Checked;
|
||||
Properties.Settings.Default.castToBone = castToBone.Checked;
|
||||
Properties.Settings.Default.exportAllUvsAsDiffuseMaps = exportAllUvsAsDiffuseMaps.Checked;
|
||||
Properties.Settings.Default.boneSize = boneSize.Value;
|
||||
Properties.Settings.Default.scaleFactor = scaleFactor.Value;
|
||||
Properties.Settings.Default.fbxVersion = fbxVersion.SelectedIndex;
|
||||
Properties.Settings.Default.fbxFormat = fbxFormat.SelectedIndex;
|
||||
|
||||
Properties.Settings.Default.l2dModelGroupOption = (CubismLive2DExtractor.Live2DModelGroupOption)l2dModelGroupComboBox.SelectedIndex;
|
||||
Properties.Settings.Default.l2dAssetSearchByFilename = l2dAssetSearchByFilenameCheckBox.Checked;
|
||||
var checkedMotionMode = (RadioButton)l2dMotionExportMethodPanel.Controls.Cast<Control>().First(x => ((RadioButton)x).Checked);
|
||||
Properties.Settings.Default.l2dMotionMode = (CubismLive2DExtractor.Live2DMotionMode)Enum.Parse(typeof(CubismLive2DExtractor.Live2DMotionMode), checkedMotionMode.AccessibleName);
|
||||
Properties.Settings.Default.l2dForceBezier = l2dForceBezierCheckBox.Checked;
|
||||
|
||||
fbxSettings.EulerFilter = eulerFilter.Checked;
|
||||
fbxSettings.FilterPrecision = (float)filterPrecision.Value;
|
||||
fbxSettings.ExportAllNodes = exportAllNodes.Checked;
|
||||
fbxSettings.ExportSkins = exportSkins.Checked;
|
||||
fbxSettings.ExportAnimations = exportAnimations.Checked;
|
||||
fbxSettings.ExportBlendShape = exportBlendShape.Checked;
|
||||
fbxSettings.CastToBone = castToBone.Checked;
|
||||
fbxSettings.ExportAllUvsAsDiffuseMaps = exportAllUvsAsDiffuseMaps.Checked;
|
||||
fbxSettings.BoneSize = (int)boneSize.Value;
|
||||
fbxSettings.ScaleFactor = (float)scaleFactor.Value;
|
||||
fbxSettings.FbxVersionIndex = fbxVersion.SelectedIndex;
|
||||
fbxSettings.FbxFormat = fbxFormat.SelectedIndex;
|
||||
for (var i = 0; i < uvIndicesCheckedListBox.Items.Count; i++)
|
||||
{
|
||||
var isChecked = uvIndicesCheckedListBox.GetItemChecked(i);
|
||||
var type = fbxSettings.UvBindings[i];
|
||||
if ((isChecked && type < 0) || (!isChecked && type > 0))
|
||||
fbxSettings.UvBindings[i] *= -1;
|
||||
}
|
||||
Properties.Settings.Default.fbxSettings = fbxSettings.ToBase64();
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
@ -89,5 +94,58 @@ namespace AssetStudioGUI
|
||||
{
|
||||
parallelExportUpDown.Enabled = parallelExportCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void uvIndicesCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (exportAllUvsAsDiffuseMaps.Checked)
|
||||
return;
|
||||
|
||||
if (fbxSettings.UvBindings.TryGetValue(uvIndicesCheckedListBox.SelectedIndex, out var uvType))
|
||||
{
|
||||
uvTypesListBox.SelectedIndex = (int)MathF.Abs(uvType) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void uvTypesListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var selectedUv = uvIndicesCheckedListBox.SelectedIndex;
|
||||
fbxSettings.UvBindings[selectedUv] = uvTypesListBox.SelectedIndex + 1;
|
||||
}
|
||||
|
||||
private void exportAllUvsAsDiffuseMaps_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
uvTypesListBox.Enabled = !exportAllUvsAsDiffuseMaps.Checked;
|
||||
uvIndicesCheckedListBox.Enabled = !exportAllUvsAsDiffuseMaps.Checked;
|
||||
}
|
||||
|
||||
private void SetFromFbxSettings()
|
||||
{
|
||||
eulerFilter.Checked = fbxSettings.EulerFilter;
|
||||
filterPrecision.Value = (decimal)fbxSettings.FilterPrecision;
|
||||
exportAllNodes.Checked = fbxSettings.ExportAllNodes;
|
||||
exportSkins.Checked = fbxSettings.ExportSkins;
|
||||
exportAnimations.Checked = fbxSettings.ExportAnimations;
|
||||
exportBlendShape.Checked = fbxSettings.ExportBlendShape;
|
||||
castToBone.Checked = fbxSettings.CastToBone;
|
||||
exportAllUvsAsDiffuseMaps.Checked = fbxSettings.ExportAllUvsAsDiffuseMaps;
|
||||
boneSize.Value = (decimal)fbxSettings.BoneSize;
|
||||
scaleFactor.Value = (decimal)fbxSettings.ScaleFactor;
|
||||
fbxVersion.SelectedIndex = fbxSettings.FbxVersionIndex;
|
||||
fbxFormat.SelectedIndex = fbxSettings.FbxFormat;
|
||||
for (var i = 0; i < uvIndicesCheckedListBox.Items.Count; i++)
|
||||
{
|
||||
var isChecked = fbxSettings.UvBindings[i] > 0;
|
||||
uvIndicesCheckedListBox.SetItemChecked(i, isChecked);
|
||||
}
|
||||
uvTypesListBox.Enabled = !exportAllUvsAsDiffuseMaps.Checked;
|
||||
uvIndicesCheckedListBox.Enabled = !exportAllUvsAsDiffuseMaps.Checked;
|
||||
}
|
||||
|
||||
private void resetButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
fbxSettings.Init();
|
||||
SetFromFbxSettings();
|
||||
uvIndicesCheckedListBox_SelectedIndexChanged(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,20 +279,8 @@ namespace AssetStudioGUI
|
||||
|
||||
private static void ExportFbx(IImported convert, string exportPath)
|
||||
{
|
||||
var eulerFilter = Properties.Settings.Default.eulerFilter;
|
||||
var filterPrecision = (float)Properties.Settings.Default.filterPrecision;
|
||||
var exportAllNodes = Properties.Settings.Default.exportAllNodes;
|
||||
var exportSkins = Properties.Settings.Default.exportSkins;
|
||||
var exportAnimations = Properties.Settings.Default.exportAnimations;
|
||||
var exportBlendShape = Properties.Settings.Default.exportBlendShape;
|
||||
var castToBone = Properties.Settings.Default.castToBone;
|
||||
var boneSize = (int)Properties.Settings.Default.boneSize;
|
||||
var exportAllUvsAsDiffuseMaps = Properties.Settings.Default.exportAllUvsAsDiffuseMaps;
|
||||
var scaleFactor = (float)Properties.Settings.Default.scaleFactor;
|
||||
var fbxVersion = Properties.Settings.Default.fbxVersion;
|
||||
var fbxFormat = Properties.Settings.Default.fbxFormat;
|
||||
ModelExporter.ExportFbx(exportPath, convert, eulerFilter, filterPrecision,
|
||||
exportAllNodes, exportSkins, exportAnimations, exportBlendShape, castToBone, boneSize, exportAllUvsAsDiffuseMaps, scaleFactor, fbxVersion, fbxFormat == 1);
|
||||
var fbxSettings = Fbx.Settings.FromBase64(Properties.Settings.Default.fbxSettings);
|
||||
ModelExporter.ExportFbx(exportPath, convert, fbxSettings);
|
||||
}
|
||||
|
||||
public static bool ExportDumpFile(AssetItem item, string exportPath)
|
||||
|
156
AssetStudioGUI/Properties/Settings.Designer.cs
generated
156
AssetStudioGUI/Properties/Settings.Designer.cs
generated
@ -119,138 +119,6 @@ namespace AssetStudioGUI.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool eulerFilter {
|
||||
get {
|
||||
return ((bool)(this["eulerFilter"]));
|
||||
}
|
||||
set {
|
||||
this["eulerFilter"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0.25")]
|
||||
public decimal filterPrecision {
|
||||
get {
|
||||
return ((decimal)(this["filterPrecision"]));
|
||||
}
|
||||
set {
|
||||
this["filterPrecision"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool exportAllNodes {
|
||||
get {
|
||||
return ((bool)(this["exportAllNodes"]));
|
||||
}
|
||||
set {
|
||||
this["exportAllNodes"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool exportSkins {
|
||||
get {
|
||||
return ((bool)(this["exportSkins"]));
|
||||
}
|
||||
set {
|
||||
this["exportSkins"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool exportAnimations {
|
||||
get {
|
||||
return ((bool)(this["exportAnimations"]));
|
||||
}
|
||||
set {
|
||||
this["exportAnimations"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public decimal boneSize {
|
||||
get {
|
||||
return ((decimal)(this["boneSize"]));
|
||||
}
|
||||
set {
|
||||
this["boneSize"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("3")]
|
||||
public int fbxVersion {
|
||||
get {
|
||||
return ((int)(this["fbxVersion"]));
|
||||
}
|
||||
set {
|
||||
this["fbxVersion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int fbxFormat {
|
||||
get {
|
||||
return ((int)(this["fbxFormat"]));
|
||||
}
|
||||
set {
|
||||
this["fbxFormat"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public decimal scaleFactor {
|
||||
get {
|
||||
return ((decimal)(this["scaleFactor"]));
|
||||
}
|
||||
set {
|
||||
this["scaleFactor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool exportBlendShape {
|
||||
get {
|
||||
return ((bool)(this["exportBlendShape"]));
|
||||
}
|
||||
set {
|
||||
this["exportBlendShape"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool castToBone {
|
||||
get {
|
||||
return ((bool)(this["castToBone"]));
|
||||
}
|
||||
set {
|
||||
this["castToBone"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
@ -263,18 +131,6 @@ namespace AssetStudioGUI.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool exportAllUvsAsDiffuseMaps {
|
||||
get {
|
||||
return ((bool)(this["exportAllUvsAsDiffuseMaps"]));
|
||||
}
|
||||
set {
|
||||
this["exportAllUvsAsDiffuseMaps"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
@ -454,5 +310,17 @@ namespace AssetStudioGUI.Properties {
|
||||
this["autoplayAudio"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string fbxSettings {
|
||||
get {
|
||||
return ((string)(this["fbxSettings"]));
|
||||
}
|
||||
set {
|
||||
this["fbxSettings"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,45 +26,9 @@
|
||||
<Setting Name="convertType" Type="AssetStudio.ImageFormat" Scope="User">
|
||||
<Value Profile="(Default)">Png</Value>
|
||||
</Setting>
|
||||
<Setting Name="eulerFilter" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="filterPrecision" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">0.25</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportAllNodes" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportSkins" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportAnimations" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="boneSize" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
<Setting Name="fbxVersion" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">3</Value>
|
||||
</Setting>
|
||||
<Setting Name="fbxFormat" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="scaleFactor" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportBlendShape" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="castToBone" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="restoreExtensionName" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportAllUvsAsDiffuseMaps" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="exportSpriteWithMask" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
@ -110,5 +74,8 @@
|
||||
<Setting Name="autoplayAudio" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="fbxSettings" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
Reference in New Issue
Block a user