More AAMP stuff. Add more import settings for dae/fbx.
This commit is contained in:
parent
277c3171c1
commit
6303769adb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -30,7 +30,6 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@ -48,7 +47,6 @@
|
||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stContextMenuStrip1 = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components);
|
||||
this.contentContainer.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -70,7 +68,6 @@
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
@ -78,15 +75,6 @@
|
||||
this.treeView1.TabIndex = 0;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripSeparator1,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripSeparator2});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(119, 38);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
@ -237,7 +225,6 @@
|
||||
this.Text = "AampEditor";
|
||||
this.Controls.SetChildIndex(this.contentContainer, 0);
|
||||
this.contentContainer.ResumeLayout(false);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
@ -252,7 +239,6 @@
|
||||
|
||||
public System.Windows.Forms.TreeView treeView1;
|
||||
public Switch_Toolbox.Library.Forms.ListViewCustom listViewCustom1;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
|
@ -50,6 +50,57 @@ namespace FirstPlugin.Forms
|
||||
stButton2.Visible = false;
|
||||
stPanel1.Dock = DockStyle.Fill;
|
||||
}
|
||||
|
||||
STContextMenuStrip contextMenuStrip1 = new STContextMenuStrip();
|
||||
contextMenuStrip1.Items.Add(new ToolStripMenuItem("Save", null, saveAsToolStripMenuItem_Click, Keys.Control | Keys.I));
|
||||
contextMenuStrip1.Items.Add(new ToolStripSeparator());
|
||||
contextMenuStrip1.Items.Add(new ToolStripMenuItem("Export as Yaml", null, ToYamlAction, Keys.Control | Keys.A));
|
||||
contextMenuStrip1.Items.Add(new ToolStripMenuItem("Open as Yaml", null, OpenYamlEditorAction, Keys.Control | Keys.A));
|
||||
|
||||
this.treeView1.ContextMenuStrip = contextMenuStrip1;
|
||||
|
||||
}
|
||||
|
||||
private void OpenYamlEditorAction(object sender, EventArgs e)
|
||||
{
|
||||
string yaml = "";
|
||||
|
||||
if (AampFile.aampFileV1 != null)
|
||||
yaml = YamlConverter.ToYaml(AampFile.aampFileV1);
|
||||
else
|
||||
yaml = YamlConverter.ToYaml(AampFile.aampFileV2);
|
||||
|
||||
STForm form = new STForm();
|
||||
form.Text = "YAML Text Editor";
|
||||
var panel = new STPanel() { Dock = DockStyle.Fill, };
|
||||
form.AddControl(panel);
|
||||
var editor = new TextEditor() { Dock = DockStyle.Fill, };
|
||||
editor.FillEditor(yaml);
|
||||
editor.IsYAML = true;
|
||||
panel.Controls.Add(editor);
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ToYamlAction(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog();
|
||||
sfd.Filter = "YAML|*.yaml;";
|
||||
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string yaml = "";
|
||||
|
||||
if (AampFile.aampFileV1 != null)
|
||||
yaml = YamlConverter.ToYaml(AampFile.aampFileV1);
|
||||
else
|
||||
yaml = YamlConverter.ToYaml(AampFile.aampFileV2);
|
||||
|
||||
File.WriteAllText(sfd.FileName, yaml);
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyNode_Click(object sender, EventArgs e)
|
||||
|
@ -112,8 +112,7 @@ namespace FirstPlugin.Forms
|
||||
case ParamType.String32:
|
||||
case ParamType.String256:
|
||||
case ParamType.StringRef:
|
||||
string enocdedString = Encoding.UTF8.GetString((byte[])entry.Value);
|
||||
ValueText = $"{enocdedString}";
|
||||
ValueText = $"{(string)entry.Value}";
|
||||
break;
|
||||
case ParamType.Vector2F:
|
||||
var vec2 = (Vector2F)entry.Value;
|
||||
|
@ -113,8 +113,7 @@ namespace FirstPlugin.Forms
|
||||
case ParamType.String32:
|
||||
case ParamType.String256:
|
||||
case ParamType.StringRef:
|
||||
string enocdedString = Encoding.UTF8.GetString((byte[])entry.Value);
|
||||
ValueText = $"{enocdedString}";
|
||||
ValueText = $"{(string)entry.Value}";
|
||||
break;
|
||||
case ParamType.Vector2F:
|
||||
var vec2 = (Vector2F)entry.Value;
|
||||
|
247
Switch_FileFormatsMain/GUI/AAMP/YamlConverter.cs
Normal file
247
Switch_FileFormatsMain/GUI/AAMP/YamlConverter.cs
Normal file
@ -0,0 +1,247 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aampv1 = AampV1Library;
|
||||
using Aampv2 = AampV2Library;
|
||||
using System.IO;
|
||||
using Syroot.Maths;
|
||||
|
||||
namespace FirstPlugin
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string Indent(this string value, int size)
|
||||
{
|
||||
var strArray = value.Split('\n');
|
||||
var sb = new StringBuilder();
|
||||
foreach (var s in strArray)
|
||||
sb.Append(new string(' ', size)).Append(s);
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class YamlConverter
|
||||
{
|
||||
#region V1 AAMP
|
||||
|
||||
public static string ToYaml(Aampv1.AampFile aampFile)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
using (TextWriter writer = new StringWriter(sb))
|
||||
{
|
||||
writer.WriteLine("!aamp");
|
||||
writer.WriteLine($"version: {aampFile.Version}");
|
||||
writer.WriteLine("!io");
|
||||
writer.WriteLine($"version: 0");
|
||||
writer.WriteLine($"type: {aampFile.EffectType}");
|
||||
WriteParamList(writer, aampFile.RootNode, 0);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static void WriteParamList(TextWriter writer, Aampv1.ParamList paramList, int IndentAmount)
|
||||
{
|
||||
writer.WriteLine($"{paramList.HashString}: !list".Indent(IndentAmount));
|
||||
|
||||
if (paramList.paramObjects.Length <= 0)
|
||||
writer.WriteLine("objects: {}".Indent(IndentAmount + 2));
|
||||
else
|
||||
writer.WriteLine("objects: ".Indent(IndentAmount + 2));
|
||||
|
||||
foreach (var paramObj in paramList.paramObjects)
|
||||
{
|
||||
WriteParamObject(writer, paramObj, IndentAmount + 4);
|
||||
}
|
||||
|
||||
if (paramList.childParams.Length <= 0)
|
||||
writer.WriteLine("lists: {}".Indent(IndentAmount + 2));
|
||||
else
|
||||
writer.WriteLine("lists: ".Indent(IndentAmount + 2));
|
||||
|
||||
foreach (var child in paramList.childParams)
|
||||
{
|
||||
WriteParamList(writer, child, IndentAmount + 4);
|
||||
}
|
||||
}
|
||||
|
||||
private static void WriteParamObject(TextWriter writer, Aampv1.ParamObject paramObj, int IndentAmount)
|
||||
{
|
||||
writer.WriteLine($"{paramObj.HashString} : !obj".Indent(IndentAmount));
|
||||
foreach (var entry in paramObj.paramEntries)
|
||||
{
|
||||
writer.Write($"{WriteParamData(entry)}\n".Indent(IndentAmount + 2));
|
||||
}
|
||||
}
|
||||
|
||||
private static string WriteParamData(Aampv1.ParamEntry entry)
|
||||
{
|
||||
switch (entry.ParamType)
|
||||
{
|
||||
case Aampv1.ParamType.Boolean: return $"{entry.HashString}: {(bool)entry.Value}";
|
||||
case Aampv1.ParamType.BufferBinary: return $"{entry.HashString}: !BufferBinary [ {WriteBytes((byte[])entry.Value)} ]";
|
||||
case Aampv1.ParamType.BufferFloat: return $"{entry.HashString}: !BufferFloat [ {WriteFloats((float[])entry.Value)} ]";
|
||||
case Aampv1.ParamType.BufferInt: return $"{entry.HashString}: !BufferInt [ {WriteInts((int[])entry.Value)} ]";
|
||||
case Aampv1.ParamType.BufferUint: return $"{entry.HashString}: !BufferUint [ {WriteUints((uint[])entry.Value)} ]";
|
||||
case Aampv1.ParamType.Color4F: return $"{entry.HashString}: {WriteColor4F((Vector4F)entry.Value)}";
|
||||
case Aampv1.ParamType.Vector2F: return $"{entry.HashString}: {WriteVec2F((Vector2F)entry.Value)}";
|
||||
case Aampv1.ParamType.Vector3F: return $"{entry.HashString}: {WriteVec3F((Vector3F)entry.Value)}";
|
||||
case Aampv1.ParamType.Vector4F: return $"{entry.HashString}: {WriteVec4F((Vector4F)entry.Value)}";
|
||||
case Aampv1.ParamType.Uint: return $"{entry.HashString}: {(uint)entry.Value}";
|
||||
case Aampv1.ParamType.Int: return $"{entry.HashString}: {(int)entry.Value}";
|
||||
case Aampv1.ParamType.Float: return $"{entry.HashString}: {(float)entry.Value}";
|
||||
case Aampv1.ParamType.String256: return $"{entry.HashString}: !str256 {(string)entry.Value}";
|
||||
case Aampv1.ParamType.String32: return $"{entry.HashString}: !str32 {(string)entry.Value}";
|
||||
case Aampv1.ParamType.String64: return $"{entry.HashString}: !str64 {(string)entry.Value}";
|
||||
case Aampv1.ParamType.StringRef: return $"{entry.HashString}: !strRef {(string)entry.Value}";
|
||||
case Aampv1.ParamType.Curve1: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 1)}";
|
||||
case Aampv1.ParamType.Curve2: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 2)}";
|
||||
case Aampv1.ParamType.Curve3: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 3)}";
|
||||
case Aampv1.ParamType.Curve4: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 4)}";
|
||||
default:
|
||||
throw new Exception("Unsupported type! " + entry.ParamType);
|
||||
}
|
||||
}
|
||||
|
||||
private static string WriteCurve(Aampv1.Curve[] curves, int Num)
|
||||
{
|
||||
string curveStr = "";
|
||||
foreach (var curve in curves)
|
||||
curveStr += $"!curve{Num}[{WriteUints(curve.valueUints)}] [{WriteFloats(curve.valueFloats)}] \n";
|
||||
|
||||
return curveStr;
|
||||
}
|
||||
|
||||
public static void ToAamp(Aampv1.AampFile aampFile)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 AAMP
|
||||
|
||||
public static string ToYaml(Aampv2.AampFile aampFile)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
using (TextWriter writer = new StringWriter(sb))
|
||||
{
|
||||
writer.WriteLine("!aamp");
|
||||
writer.WriteLine($"version: {aampFile.Version}");
|
||||
writer.WriteLine("!io");
|
||||
writer.WriteLine($"version: {aampFile.ParameterIOVersion}");
|
||||
writer.WriteLine($"type: {aampFile.ParameterIOType}");
|
||||
WriteParamList(writer, aampFile.RootNode, 0);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static void WriteParamList(TextWriter writer, Aampv2.ParamList paramList, int IndentAmount)
|
||||
{
|
||||
writer.WriteLine($"{paramList.HashString}: !list".Indent(IndentAmount));
|
||||
|
||||
if (paramList.paramObjects.Length <= 0)
|
||||
writer.WriteLine("objects: {}".Indent(IndentAmount + 2));
|
||||
else
|
||||
writer.WriteLine("objects: ".Indent(IndentAmount + 2));
|
||||
|
||||
foreach (var paramObj in paramList.paramObjects)
|
||||
{
|
||||
WriteParamObject(writer, paramObj, IndentAmount + 4);
|
||||
}
|
||||
|
||||
if (paramList.childParams.Length <= 0)
|
||||
writer.WriteLine("lists: {}".Indent(IndentAmount + 2));
|
||||
else
|
||||
writer.WriteLine("lists: ".Indent(IndentAmount + 2));
|
||||
|
||||
foreach (var child in paramList.childParams)
|
||||
{
|
||||
WriteParamList(writer, child, IndentAmount + 4);
|
||||
}
|
||||
}
|
||||
|
||||
private static void WriteParamObject(TextWriter writer, Aampv2.ParamObject paramObj, int IndentAmount)
|
||||
{
|
||||
writer.WriteLine($"{paramObj.HashString} : !obj".Indent(IndentAmount));
|
||||
foreach (var entry in paramObj.paramEntries)
|
||||
{
|
||||
writer.WriteLine($"{WriteParamData(entry)}".Indent(IndentAmount + 2));
|
||||
}
|
||||
}
|
||||
|
||||
private static string WriteParamData(Aampv2.ParamEntry entry)
|
||||
{
|
||||
switch (entry.ParamType)
|
||||
{
|
||||
case Aampv2.ParamType.Boolean: return $"{entry.HashString}: {(bool)entry.Value}";
|
||||
case Aampv2.ParamType.BufferBinary: return $"{entry.HashString}: !BufferBinary [ {WriteBytes((byte[])entry.Value)} ]";
|
||||
case Aampv2.ParamType.BufferFloat: return $"{entry.HashString}: !BufferFloat [ {WriteFloats((float[])entry.Value)} ]";
|
||||
case Aampv2.ParamType.BufferInt: return $"{entry.HashString}: !BufferInt [ {WriteInts((int[])entry.Value)} ]";
|
||||
case Aampv2.ParamType.BufferUint: return $"{entry.HashString}: !BufferUint [ {WriteUints((uint[])entry.Value)} ]";
|
||||
case Aampv2.ParamType.Color4F: return $"{entry.HashString}: {WriteColor4F((Vector4F)entry.Value)}";
|
||||
case Aampv2.ParamType.Vector2F: return $"{entry.HashString}: {WriteVec2F((Vector2F)entry.Value)}";
|
||||
case Aampv2.ParamType.Vector3F: return $"{entry.HashString}: {WriteVec3F((Vector3F)entry.Value)}";
|
||||
case Aampv2.ParamType.Vector4F: return $"{entry.HashString}: {WriteVec4F((Vector4F)entry.Value)}";
|
||||
case Aampv2.ParamType.Uint: return $"{entry.HashString}: {(uint)entry.Value}";
|
||||
case Aampv2.ParamType.Int: return $"{entry.HashString}: {(int)entry.Value}";
|
||||
case Aampv2.ParamType.Float: return $"{entry.HashString}: {(float)entry.Value}";
|
||||
case Aampv2.ParamType.String256: return $"{entry.HashString}: !str256 {(string)entry.Value}";
|
||||
case Aampv2.ParamType.String32: return $"{entry.HashString}: !str32 {(string)entry.Value}";
|
||||
case Aampv2.ParamType.String64: return $"{entry.HashString}: !str64 {(string)entry.Value}";
|
||||
case Aampv2.ParamType.StringRef: return $"{entry.HashString}: !strRef {(string)entry.Value}";
|
||||
case Aampv2.ParamType.Curve1: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 1)}";
|
||||
case Aampv2.ParamType.Curve2: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 2)}";
|
||||
case Aampv2.ParamType.Curve3: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 3)}";
|
||||
case Aampv2.ParamType.Curve4: return $"{entry.HashString}: {WriteCurve((Aampv2.Curve[])entry.Value, 4)}";
|
||||
default:
|
||||
throw new Exception("Unsupported type! " + entry.ParamType);
|
||||
}
|
||||
}
|
||||
|
||||
private static string WriteCurve(Aampv2.Curve[] curves, int Num)
|
||||
{
|
||||
string curveStr = "";
|
||||
foreach (var curve in curves)
|
||||
curveStr += $"!curve{Num}[{WriteUints(curve.valueUints)}] [{WriteFloats(curve.valueFloats)}] \n";
|
||||
|
||||
return curveStr;
|
||||
}
|
||||
|
||||
public static Aampv2.AampFile ToAamp(string FileName)
|
||||
{
|
||||
var aampFile = new Aampv2.AampFile();
|
||||
|
||||
return aampFile;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private static string WriteUints(uint[] arr) {
|
||||
return String.Join(",", arr.Select(p => p.ToString()).ToArray());
|
||||
}
|
||||
|
||||
private static string WriteFloats(float[] arr) {
|
||||
return String.Join(",", arr.Select(p => p.ToString()).ToArray());
|
||||
}
|
||||
|
||||
private static string WriteInts(int[] arr) {
|
||||
return String.Join(",", arr.Select(p => p.ToString()).ToArray());
|
||||
}
|
||||
|
||||
private static string WriteBytes(byte[] arr) {
|
||||
return String.Join(",", arr.Select(p => p.ToString()).ToArray());
|
||||
}
|
||||
|
||||
private static string WriteVec2F(Vector2F vec2) { return $"!vec2[{vec2.X}, {vec2.Y}]"; }
|
||||
private static string WriteVec3F(Vector3F vec3) { return $"!vec3[{vec3.X}, {vec3.Y}, {vec3.Z}]"; }
|
||||
private static string WriteVec4F(Vector4F vec4) { return $"!vec4[{vec4.X}, {vec4.Y}, {vec4.Z}, {vec4.W}]"; }
|
||||
private static string WriteColor4F(Vector4F vec4) { return $"!color[{vec4.X}, {vec4.Y}, {vec4.Z}, {vec4.W}]"; }
|
||||
|
||||
}
|
||||
}
|
@ -245,6 +245,7 @@
|
||||
<Compile Include="GUI\AAMP\AampEditor.Designer.cs">
|
||||
<DependentUpon>AampEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GUI\AAMP\YamlConverter.cs" />
|
||||
<Compile Include="GUI\BFRES\BoneVisualAnims\BoneVisualAnimEditor.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
55dfac041bb7373c020e8d6709d320d4fe229f93
|
||||
d219efb401d2997f5445fb7466548421188b3edf
|
||||
|
Binary file not shown.
@ -8,6 +8,7 @@ using OpenTK;
|
||||
using Switch_Toolbox.Library.Rendering;
|
||||
using System.Windows.Forms;
|
||||
using Switch_Toolbox.Library.Animations;
|
||||
using Switch_Toolbox.Library.Forms;
|
||||
|
||||
namespace Switch_Toolbox.Library
|
||||
{
|
||||
@ -36,20 +37,26 @@ namespace Switch_Toolbox.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
AssimpContext Importer = new AssimpContext();
|
||||
var settings = new Assimp_Settings();
|
||||
if (settings.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
UseTransformMatrix = settings.UseNodeTransform;
|
||||
|
||||
STConsole.WriteLine($"Loading File {FileName}", Color.FromArgb(0, 255, 0));
|
||||
AssimpContext Importer = new AssimpContext();
|
||||
|
||||
var Flags = PostProcessSteps.Triangulate;
|
||||
Flags |= PostProcessSteps.JoinIdenticalVertices;
|
||||
Flags |= PostProcessSteps.FlipUVs;
|
||||
Flags |= PostProcessSteps.LimitBoneWeights;
|
||||
Flags |= PostProcessSteps.CalculateTangentSpace;
|
||||
Flags |= PostProcessSteps.GenerateNormals;
|
||||
STConsole.WriteLine($"Loading File {FileName}", Color.FromArgb(0, 255, 0));
|
||||
|
||||
scene = Importer.ImportFile(FileName, Flags);
|
||||
/* var Flags = PostProcessSteps.Triangulate;
|
||||
Flags |= PostProcessSteps.JoinIdenticalVertices;
|
||||
Flags |= PostProcessSteps.FlipUVs;
|
||||
Flags |= PostProcessSteps.LimitBoneWeights;
|
||||
Flags |= PostProcessSteps.CalculateTangentSpace;
|
||||
Flags |= PostProcessSteps.GenerateNormals;*/
|
||||
|
||||
LoadScene();
|
||||
scene = Importer.ImportFile(FileName, settings.GetFlags());
|
||||
|
||||
LoadScene();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -11,6 +11,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Switch_Toolbox.Library.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FlatTabControl
|
||||
{
|
||||
@ -66,12 +67,22 @@ namespace FlatTabControl
|
||||
updownImage.MakeTransparent(Color.White);
|
||||
leftRightImages.Images.AddStrip(updownImage);
|
||||
}
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
FindUpDown();
|
||||
UpdateUpDown();
|
||||
|
||||
base.OnSizeChanged(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
@ -97,7 +108,7 @@ namespace FlatTabControl
|
||||
if (!Visible)
|
||||
return;
|
||||
|
||||
Rectangle TabControlArea = this.ClientRectangle;
|
||||
Rectangle TabControlArea = this.ClientRectangle;
|
||||
Rectangle TabArea = this.DisplayRectangle;
|
||||
|
||||
//----------------------------
|
||||
@ -105,6 +116,8 @@ namespace FlatTabControl
|
||||
Brush br = new SolidBrush(mBackColor); //(SystemColors.Control); UPDATED
|
||||
g.FillRectangle(br, TabControlArea);
|
||||
br.Dispose();
|
||||
|
||||
|
||||
//----------------------------
|
||||
|
||||
//----------------------------
|
||||
@ -115,12 +128,11 @@ namespace FlatTabControl
|
||||
TabArea.Inflate(nDelta, nDelta);
|
||||
g.DrawRectangle(border, TabArea);
|
||||
border.Dispose();
|
||||
//----------------------------
|
||||
//----------------------------
|
||||
|
||||
|
||||
//----------------------------
|
||||
// clip region for drawing tabs
|
||||
Region rsaved = g.Clip;
|
||||
//----------------------------
|
||||
// clip region for drawing tabs
|
||||
Region rsaved = g.Clip;
|
||||
Rectangle rreg;
|
||||
|
||||
int nWidth = TabArea.Width + nMargin;
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Switch_Toolbox.Library.GUI
|
||||
namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
partial class Assimp_Settings
|
||||
{
|
||||
@ -28,176 +28,250 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.checkBox1 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox2 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox3 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox4 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox5 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox6 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.generateNormalsChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.smoothNormalsChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.generateTansBitansChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.flipUVsChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.limtBoneWeightChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.checkBox7 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox8 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox9 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.checkBox10 = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.preTransformVerticesChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.triangulateChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.joinDupedVertsSk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.leftHandedChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.useNodeTransform = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.stButton2 = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.contentContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkBox1
|
||||
// contentContainer
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox1.Location = new System.Drawing.Point(14, 16);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(196, 17);
|
||||
this.checkBox1.TabIndex = 0;
|
||||
this.checkBox1.Text = "Generate Normals (if none are used)";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.contentContainer.Controls.Add(this.stButton2);
|
||||
this.contentContainer.Controls.Add(this.stButton1);
|
||||
this.contentContainer.Controls.Add(this.useNodeTransform);
|
||||
this.contentContainer.Controls.Add(this.leftHandedChk);
|
||||
this.contentContainer.Controls.Add(this.joinDupedVertsSk);
|
||||
this.contentContainer.Controls.Add(this.triangulateChk);
|
||||
this.contentContainer.Controls.Add(this.preTransformVerticesChk);
|
||||
this.contentContainer.Controls.Add(this.numericUpDown1);
|
||||
this.contentContainer.Controls.Add(this.limtBoneWeightChk);
|
||||
this.contentContainer.Controls.Add(this.flipUVsChk);
|
||||
this.contentContainer.Controls.Add(this.generateTansBitansChk);
|
||||
this.contentContainer.Controls.Add(this.smoothNormalsChk);
|
||||
this.contentContainer.Controls.Add(this.generateNormalsChk);
|
||||
this.contentContainer.Size = new System.Drawing.Size(290, 293);
|
||||
this.contentContainer.Controls.SetChildIndex(this.generateNormalsChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.smoothNormalsChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.generateTansBitansChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.flipUVsChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.limtBoneWeightChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.numericUpDown1, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.preTransformVerticesChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.triangulateChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.joinDupedVertsSk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.leftHandedChk, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.useNodeTransform, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stButton1, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stButton2, 0);
|
||||
//
|
||||
// checkBox2
|
||||
// generateNormalsChk
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox2.Location = new System.Drawing.Point(14, 39);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(103, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.Text = "Smooth Normals";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.generateNormalsChk.AutoSize = true;
|
||||
this.generateNormalsChk.Checked = true;
|
||||
this.generateNormalsChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.generateNormalsChk.ForeColor = System.Drawing.Color.White;
|
||||
this.generateNormalsChk.Location = new System.Drawing.Point(9, 59);
|
||||
this.generateNormalsChk.Name = "generateNormalsChk";
|
||||
this.generateNormalsChk.Size = new System.Drawing.Size(196, 17);
|
||||
this.generateNormalsChk.TabIndex = 0;
|
||||
this.generateNormalsChk.Text = "Generate Normals (if none are used)";
|
||||
this.generateNormalsChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox3
|
||||
// smoothNormalsChk
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox3.Location = new System.Drawing.Point(14, 62);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(173, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.Text = "Generate Tangents/Bitangents";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.smoothNormalsChk.AutoSize = true;
|
||||
this.smoothNormalsChk.ForeColor = System.Drawing.Color.White;
|
||||
this.smoothNormalsChk.Location = new System.Drawing.Point(9, 82);
|
||||
this.smoothNormalsChk.Name = "smoothNormalsChk";
|
||||
this.smoothNormalsChk.Size = new System.Drawing.Size(103, 17);
|
||||
this.smoothNormalsChk.TabIndex = 1;
|
||||
this.smoothNormalsChk.Text = "Smooth Normals";
|
||||
this.smoothNormalsChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox4
|
||||
// generateTansBitansChk
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox4.Location = new System.Drawing.Point(14, 85);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(65, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.Text = "Flip UVs";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
this.generateTansBitansChk.AutoSize = true;
|
||||
this.generateTansBitansChk.Checked = true;
|
||||
this.generateTansBitansChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.generateTansBitansChk.ForeColor = System.Drawing.Color.White;
|
||||
this.generateTansBitansChk.Location = new System.Drawing.Point(9, 105);
|
||||
this.generateTansBitansChk.Name = "generateTansBitansChk";
|
||||
this.generateTansBitansChk.Size = new System.Drawing.Size(173, 17);
|
||||
this.generateTansBitansChk.TabIndex = 2;
|
||||
this.generateTansBitansChk.Text = "Generate Tangents/Bitangents";
|
||||
this.generateTansBitansChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox5
|
||||
// flipUVsChk
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox5.Location = new System.Drawing.Point(14, 108);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(65, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.Text = "Flip UVs";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
this.flipUVsChk.AutoSize = true;
|
||||
this.flipUVsChk.Checked = true;
|
||||
this.flipUVsChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.flipUVsChk.ForeColor = System.Drawing.Color.White;
|
||||
this.flipUVsChk.Location = new System.Drawing.Point(9, 128);
|
||||
this.flipUVsChk.Name = "flipUVsChk";
|
||||
this.flipUVsChk.Size = new System.Drawing.Size(65, 17);
|
||||
this.flipUVsChk.TabIndex = 3;
|
||||
this.flipUVsChk.Text = "Flip UVs";
|
||||
this.flipUVsChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox6
|
||||
// limtBoneWeightChk
|
||||
//
|
||||
this.checkBox6.AutoSize = true;
|
||||
this.checkBox6.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox6.Location = new System.Drawing.Point(14, 131);
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.Size = new System.Drawing.Size(113, 17);
|
||||
this.checkBox6.TabIndex = 5;
|
||||
this.checkBox6.Text = "Limit bone weights";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
this.limtBoneWeightChk.AutoSize = true;
|
||||
this.limtBoneWeightChk.Checked = true;
|
||||
this.limtBoneWeightChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.limtBoneWeightChk.ForeColor = System.Drawing.Color.White;
|
||||
this.limtBoneWeightChk.Location = new System.Drawing.Point(9, 151);
|
||||
this.limtBoneWeightChk.Name = "limtBoneWeightChk";
|
||||
this.limtBoneWeightChk.Size = new System.Drawing.Size(113, 17);
|
||||
this.limtBoneWeightChk.TabIndex = 5;
|
||||
this.limtBoneWeightChk.Text = "Limit bone weights";
|
||||
this.limtBoneWeightChk.UseVisualStyleBackColor = true;
|
||||
this.limtBoneWeightChk.CheckedChanged += new System.EventHandler(this.limtBoneWeightChk_CheckedChanged);
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.numericUpDown1.Enabled = false;
|
||||
this.numericUpDown1.ForeColor = System.Drawing.Color.White;
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(137, 130);
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(132, 150);
|
||||
this.numericUpDown1.Maximum = new decimal(new int[] {
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(120, 16);
|
||||
this.numericUpDown1.TabIndex = 6;
|
||||
this.numericUpDown1.Value = new decimal(new int[] {
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// checkBox7
|
||||
// preTransformVerticesChk
|
||||
//
|
||||
this.checkBox7.AutoSize = true;
|
||||
this.checkBox7.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox7.Location = new System.Drawing.Point(14, 154);
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.Size = new System.Drawing.Size(130, 17);
|
||||
this.checkBox7.TabIndex = 7;
|
||||
this.checkBox7.Text = "PreTransform Vertices";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
this.preTransformVerticesChk.AutoSize = true;
|
||||
this.preTransformVerticesChk.ForeColor = System.Drawing.Color.White;
|
||||
this.preTransformVerticesChk.Location = new System.Drawing.Point(9, 174);
|
||||
this.preTransformVerticesChk.Name = "preTransformVerticesChk";
|
||||
this.preTransformVerticesChk.Size = new System.Drawing.Size(130, 17);
|
||||
this.preTransformVerticesChk.TabIndex = 7;
|
||||
this.preTransformVerticesChk.Text = "PreTransform Vertices";
|
||||
this.preTransformVerticesChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox8
|
||||
// triangulateChk
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox8.Location = new System.Drawing.Point(14, 177);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(79, 17);
|
||||
this.checkBox8.TabIndex = 8;
|
||||
this.checkBox8.Text = "Triangulate";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.triangulateChk.AutoSize = true;
|
||||
this.triangulateChk.Checked = true;
|
||||
this.triangulateChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.triangulateChk.ForeColor = System.Drawing.Color.White;
|
||||
this.triangulateChk.Location = new System.Drawing.Point(9, 197);
|
||||
this.triangulateChk.Name = "triangulateChk";
|
||||
this.triangulateChk.Size = new System.Drawing.Size(79, 17);
|
||||
this.triangulateChk.TabIndex = 8;
|
||||
this.triangulateChk.Text = "Triangulate";
|
||||
this.triangulateChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox9
|
||||
// joinDupedVertsSk
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox9.Location = new System.Drawing.Point(14, 200);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(121, 17);
|
||||
this.checkBox9.TabIndex = 9;
|
||||
this.checkBox9.Text = "Join Duped Vertices";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
this.joinDupedVertsSk.AutoSize = true;
|
||||
this.joinDupedVertsSk.Checked = true;
|
||||
this.joinDupedVertsSk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.joinDupedVertsSk.ForeColor = System.Drawing.Color.White;
|
||||
this.joinDupedVertsSk.Location = new System.Drawing.Point(9, 220);
|
||||
this.joinDupedVertsSk.Name = "joinDupedVertsSk";
|
||||
this.joinDupedVertsSk.Size = new System.Drawing.Size(121, 17);
|
||||
this.joinDupedVertsSk.TabIndex = 9;
|
||||
this.joinDupedVertsSk.Text = "Join Duped Vertices";
|
||||
this.joinDupedVertsSk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox10
|
||||
// leftHandedChk
|
||||
//
|
||||
this.checkBox10.AutoSize = true;
|
||||
this.checkBox10.ForeColor = System.Drawing.Color.White;
|
||||
this.checkBox10.Location = new System.Drawing.Point(14, 223);
|
||||
this.checkBox10.Name = "checkBox10";
|
||||
this.checkBox10.Size = new System.Drawing.Size(109, 17);
|
||||
this.checkBox10.TabIndex = 10;
|
||||
this.checkBox10.Text = "Make left handed";
|
||||
this.checkBox10.UseVisualStyleBackColor = true;
|
||||
this.leftHandedChk.AutoSize = true;
|
||||
this.leftHandedChk.ForeColor = System.Drawing.Color.White;
|
||||
this.leftHandedChk.Location = new System.Drawing.Point(9, 243);
|
||||
this.leftHandedChk.Name = "leftHandedChk";
|
||||
this.leftHandedChk.Size = new System.Drawing.Size(109, 17);
|
||||
this.leftHandedChk.TabIndex = 10;
|
||||
this.leftHandedChk.Text = "Make left handed";
|
||||
this.leftHandedChk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// useNodeTransform
|
||||
//
|
||||
this.useNodeTransform.AutoSize = true;
|
||||
this.useNodeTransform.Checked = true;
|
||||
this.useNodeTransform.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.useNodeTransform.ForeColor = System.Drawing.Color.White;
|
||||
this.useNodeTransform.Location = new System.Drawing.Point(9, 31);
|
||||
this.useNodeTransform.Name = "useNodeTransform";
|
||||
this.useNodeTransform.Size = new System.Drawing.Size(124, 17);
|
||||
this.useNodeTransform.TabIndex = 11;
|
||||
this.useNodeTransform.Text = "Use Node Transform";
|
||||
this.useNodeTransform.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// stButton1
|
||||
//
|
||||
this.stButton1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.stButton1.Location = new System.Drawing.Point(207, 267);
|
||||
this.stButton1.Name = "stButton1";
|
||||
this.stButton1.Size = new System.Drawing.Size(75, 23);
|
||||
this.stButton1.TabIndex = 12;
|
||||
this.stButton1.Text = "Cancel";
|
||||
this.stButton1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// stButton2
|
||||
//
|
||||
this.stButton2.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.stButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.stButton2.Location = new System.Drawing.Point(126, 267);
|
||||
this.stButton2.Name = "stButton2";
|
||||
this.stButton2.Size = new System.Drawing.Size(75, 23);
|
||||
this.stButton2.TabIndex = 13;
|
||||
this.stButton2.Text = "Ok";
|
||||
this.stButton2.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// Assimp_Settings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.Controls.Add(this.checkBox10);
|
||||
this.Controls.Add(this.checkBox9);
|
||||
this.Controls.Add(this.checkBox8);
|
||||
this.Controls.Add(this.checkBox7);
|
||||
this.Controls.Add(this.numericUpDown1);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.ClientSize = new System.Drawing.Size(297, 298);
|
||||
this.Name = "Assimp_Settings";
|
||||
this.Size = new System.Drawing.Size(297, 422);
|
||||
this.Text = "Import Settings";
|
||||
this.contentContainer.ResumeLayout(false);
|
||||
this.contentContainer.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox1;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox2;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox3;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox4;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox5;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox6;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox generateNormalsChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox smoothNormalsChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox generateTansBitansChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox flipUVsChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox limtBoneWeightChk;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox7;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox8;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox9;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox checkBox10;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox preTransformVerticesChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox triangulateChk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox joinDupedVertsSk;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox leftHandedChk;
|
||||
private STCheckBox useNodeTransform;
|
||||
private STButton stButton2;
|
||||
private STButton stButton1;
|
||||
}
|
||||
}
|
||||
|
@ -7,14 +7,52 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Assimp;
|
||||
|
||||
namespace Switch_Toolbox.Library.GUI
|
||||
namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
public partial class Assimp_Settings : UserControl
|
||||
public partial class Assimp_Settings : STForm
|
||||
{
|
||||
public uint SkinLimitMax = 4;
|
||||
public bool UseNodeTransform = true;
|
||||
|
||||
public Assimp_Settings()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public PostProcessSteps GetFlags()
|
||||
{
|
||||
UseNodeTransform = useNodeTransform.Checked;
|
||||
|
||||
SkinLimitMax = (uint)numericUpDown1.Value;
|
||||
|
||||
var Flags = PostProcessSteps.None;
|
||||
|
||||
if (generateNormalsChk.Checked)
|
||||
Flags |= PostProcessSteps.GenerateNormals;
|
||||
if (smoothNormalsChk.Checked)
|
||||
Flags |= PostProcessSteps.GenerateSmoothNormals;
|
||||
if (generateTansBitansChk.Checked)
|
||||
Flags |= PostProcessSteps.CalculateTangentSpace;
|
||||
if (flipUVsChk.Checked)
|
||||
Flags |= PostProcessSteps.FlipUVs;
|
||||
if (limtBoneWeightChk.Checked)
|
||||
Flags |= PostProcessSteps.LimitBoneWeights;
|
||||
if (joinDupedVertsSk.Checked)
|
||||
Flags |= PostProcessSteps.JoinIdenticalVertices;
|
||||
if (preTransformVerticesChk.Checked)
|
||||
Flags |= PostProcessSteps.PreTransformVertices;
|
||||
if (leftHandedChk.Checked)
|
||||
Flags |= PostProcessSteps.MakeLeftHanded;
|
||||
if (triangulateChk.Checked)
|
||||
Flags |= PostProcessSteps.Triangulate;
|
||||
|
||||
return Flags;
|
||||
}
|
||||
|
||||
private void limtBoneWeightChk_CheckedChanged(object sender, EventArgs e) {
|
||||
numericUpDown1.Enabled = limtBoneWeightChk.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,12 @@ namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
FindReplace findReplaceDialog;
|
||||
|
||||
private void ResetTypes()
|
||||
{
|
||||
IsYAML = false;
|
||||
IsXML = false;
|
||||
}
|
||||
|
||||
private bool isXML;
|
||||
public bool IsXML
|
||||
{
|
||||
@ -45,6 +51,40 @@ namespace Switch_Toolbox.Library.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private bool isYAML;
|
||||
public bool IsYAML
|
||||
{
|
||||
get
|
||||
{
|
||||
return IsYAML;
|
||||
}
|
||||
set
|
||||
{
|
||||
isYAML = value;
|
||||
|
||||
if (isYAML == true)
|
||||
{
|
||||
scintilla1.Lexer = (Lexer)48;
|
||||
|
||||
scintilla1.Styles[Style.Xml.XmlStart].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.XmlEnd].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.Default].ForeColor = Color.FromArgb(214, 157, 133);
|
||||
scintilla1.Styles[Style.Xml.Comment].ForeColor = Color.FromArgb(87, 166, 74);
|
||||
scintilla1.Styles[Style.Xml.Number].ForeColor = Color.FromArgb(214, 157, 133);
|
||||
|
||||
|
||||
scintilla1.Styles[Style.Xml.DoubleString].ForeColor = Color.FromArgb(180, 180, 180);
|
||||
scintilla1.Styles[Style.Xml.SingleString].ForeColor = Color.FromArgb(180, 180, 180);
|
||||
scintilla1.Styles[Style.Xml.Tag].ForeColor = Color.FromArgb(214, 157, 133);
|
||||
scintilla1.Styles[Style.Xml.TagEnd].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.TagUnknown].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.Attribute].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.AttributeUnknown].ForeColor = Color.FromArgb(86, 156, 214);
|
||||
scintilla1.Styles[Style.Xml.CData].ForeColor = Color.FromArgb(214, 157, 133);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Color IntToColor(int rgb)
|
||||
{
|
||||
return Color.FromArgb(255, (byte)(rgb >> 16), (byte)(rgb >> 8), (byte)rgb);
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8874
Toolbox/Lib/ScintillaNET.xml
Normal file
8874
Toolbox/Lib/ScintillaNET.xml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user