mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Add option to filter Live2D textures
This commit is contained in:
+20
@@ -80,6 +80,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.l2dFilterTexturesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.optionsTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTabPage = new System.Windows.Forms.TabPage();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -399,6 +400,7 @@
|
||||
this.optionTooltip.SetToolTip(this.l2dAssetSearchByFilenameCheckBox, "Preferred option if all l2d assets of a single model are stored in a single file " +
|
||||
"or containers are obfuscated");
|
||||
this.l2dAssetSearchByFilenameCheckBox.UseVisualStyleBackColor = true;
|
||||
this.l2dAssetSearchByFilenameCheckBox.CheckedChanged += new System.EventHandler(this.l2dAssetSearchByFilenameCheckBox_CheckedChanged);
|
||||
//
|
||||
// l2dModelGroupComboBox
|
||||
//
|
||||
@@ -765,6 +767,22 @@
|
||||
this.eulerFilter.Text = "EulerFilter";
|
||||
this.eulerFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// l2dFilterTexturesCheckBox
|
||||
//
|
||||
this.l2dFilterTexturesCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.l2dFilterTexturesCheckBox.AutoSize = true;
|
||||
this.l2dFilterTexturesCheckBox.Checked = true;
|
||||
this.l2dFilterTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.l2dFilterTexturesCheckBox.Location = new System.Drawing.Point(7, 166);
|
||||
this.l2dFilterTexturesCheckBox.Name = "l2dFilterTexturesCheckBox";
|
||||
this.l2dFilterTexturesCheckBox.Size = new System.Drawing.Size(146, 19);
|
||||
this.l2dFilterTexturesCheckBox.TabIndex = 6;
|
||||
this.l2dFilterTexturesCheckBox.Text = "Filter textures by name";
|
||||
this.optionTooltip.SetToolTip(this.l2dFilterTexturesCheckBox, "If specified, Studio will only export model textures with \"texture\" in their name" +
|
||||
"s");
|
||||
this.l2dFilterTexturesCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// optionsTabControl
|
||||
//
|
||||
this.optionsTabControl.Controls.Add(this.generalTabPage);
|
||||
@@ -881,6 +899,7 @@
|
||||
// live2DTabPage
|
||||
//
|
||||
this.live2DTabPage.BackColor = System.Drawing.SystemColors.Menu;
|
||||
this.live2DTabPage.Controls.Add(this.l2dFilterTexturesCheckBox);
|
||||
this.live2DTabPage.Controls.Add(this.l2dAssetSearchByFilenameCheckBox);
|
||||
this.live2DTabPage.Controls.Add(this.l2dModelGroupLabel);
|
||||
this.live2DTabPage.Controls.Add(this.l2dModelGroupComboBox);
|
||||
@@ -1013,5 +1032,6 @@
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.CheckBox keepSpriteSizeCheckBox;
|
||||
private System.Windows.Forms.CheckBox dumpMaterialsCheckBox;
|
||||
private System.Windows.Forms.CheckBox l2dFilterTexturesCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -33,10 +33,12 @@ namespace AssetStudioGUI
|
||||
rawByteArrayFromMono.Checked = Properties.Settings.Default.rawByteArrayFromMono;
|
||||
|
||||
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;
|
||||
l2dAssetSearchByFilenameCheckBox.Checked = Properties.Settings.Default.l2dAssetSearchByFilename;
|
||||
l2dFilterTexturesCheckBox.Checked = Properties.Settings.Default.l2dFilterTextures;
|
||||
l2dFilterTexturesCheckBox.Enabled = l2dAssetSearchByFilenameCheckBox.Checked;
|
||||
|
||||
SetFromFbxSettings(Exporter.FbxSettings);
|
||||
}
|
||||
@@ -59,10 +61,11 @@ namespace AssetStudioGUI
|
||||
Properties.Settings.Default.rawByteArrayFromMono = rawByteArrayFromMono.Checked;
|
||||
|
||||
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;
|
||||
Properties.Settings.Default.l2dAssetSearchByFilename = l2dAssetSearchByFilenameCheckBox.Checked;
|
||||
Properties.Settings.Default.l2dFilterTextures = l2dFilterTexturesCheckBox.Checked;
|
||||
|
||||
Exporter.FbxSettings.EulerFilter = eulerFilter.Checked;
|
||||
Exporter.FbxSettings.FilterPrecision = (float)filterPrecision.Value;
|
||||
@@ -157,6 +160,11 @@ namespace AssetStudioGUI
|
||||
uvIndicesCheckedListBox_SelectedIndexChanged(sender, e);
|
||||
}
|
||||
|
||||
private void l2dAssetSearchByFilenameCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
l2dFilterTexturesCheckBox.Enabled = l2dAssetSearchByFilenameCheckBox.Checked;
|
||||
}
|
||||
|
||||
//highDpi workaround (net472/.net-win7)
|
||||
private void ExportOptions_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
+13
-1
@@ -12,7 +12,7 @@ namespace AssetStudioGUI.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "18.5.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "18.7.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -394,5 +394,17 @@ namespace AssetStudioGUI.Properties {
|
||||
this["keepSpriteSize"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool l2dFilterTextures {
|
||||
get {
|
||||
return ((bool)(this["l2dFilterTextures"]));
|
||||
}
|
||||
set {
|
||||
this["l2dFilterTextures"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,5 +95,8 @@
|
||||
<Setting Name="keepSpriteSize" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="l2dFilterTextures" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -1168,6 +1168,7 @@ namespace AssetStudioGUI
|
||||
MotionMode = Properties.Settings.Default.l2dMotionMode,
|
||||
ForceBezier = Properties.Settings.Default.l2dForceBezier,
|
||||
SearchByFilename = Properties.Settings.Default.l2dAssetSearchByFilename,
|
||||
FilterTextures = Properties.Settings.Default.l2dFilterTextures,
|
||||
};
|
||||
if (selClipMotions != null)
|
||||
extractorOptions.MotionMode = Live2DMotionMode.AnimationClipV2;
|
||||
|
||||
Reference in New Issue
Block a user