mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 14:00:21 +00:00
Fix compile issues and update to latest
This commit is contained in:
parent
9dcf9eb15f
commit
d30f94eb9a
13 changed files with 149 additions and 67 deletions
|
@ -1416,7 +1416,7 @@ namespace Bfres.Structs
|
|||
shape.CreateNewBoundingBoxes();
|
||||
shape.CreateBoneList(obj, this);
|
||||
shape.CreateIndexList(obj, this);
|
||||
shape.ApplyImportSettings(csvsettings);
|
||||
shape.ApplyImportSettings(csvsettings, GetMaterial(shape.MaterialIndex));
|
||||
shape.SaveShape();
|
||||
shape.SaveVertexBuffer();
|
||||
shape.BFRESRender = BFRESRender;
|
||||
|
@ -1561,7 +1561,7 @@ namespace Bfres.Structs
|
|||
shape.CreateNewBoundingBoxes();
|
||||
shape.CreateBoneList(obj, this);
|
||||
shape.CreateIndexList(obj, this);
|
||||
shape.ApplyImportSettings(settings);
|
||||
shape.ApplyImportSettings(settings, GetMaterial(shape.MaterialIndex));
|
||||
shape.SaveShape();
|
||||
shape.SaveVertexBuffer();
|
||||
shape.BFRESRender = BFRESRender;
|
||||
|
@ -1579,6 +1579,10 @@ namespace Bfres.Structs
|
|||
}
|
||||
BFRESRender.UpdateVertexData();
|
||||
}
|
||||
public FMAT GetMaterial(int index)
|
||||
{
|
||||
return materials.Values.ElementAt(index);
|
||||
}
|
||||
public void AddMaterials(string FileName, bool Replace = true)
|
||||
{
|
||||
string ext = System.IO.Path.GetExtension(FileName);
|
||||
|
@ -1712,8 +1716,6 @@ namespace Bfres.Structs
|
|||
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Text = dialog.textBox1.Text;
|
||||
|
||||
((FMDL)Parent.Parent).materials.Remove(Text);
|
||||
Text = dialog.textBox1.Text;
|
||||
((FMDL)Parent.Parent).materials.Add(Text, this);
|
||||
|
@ -2123,7 +2125,7 @@ namespace Bfres.Structs
|
|||
Parent.Nodes.Remove(this);
|
||||
}
|
||||
}
|
||||
public void ApplyImportSettings(BfresModelImportSettings settings)
|
||||
public void ApplyImportSettings(BfresModelImportSettings settings, FMAT mat)
|
||||
{
|
||||
if (settings.FlipUVsVertical)
|
||||
{
|
||||
|
@ -2155,6 +2157,40 @@ namespace Bfres.Structs
|
|||
MessageBox.Show($"Failed to generate tangents for mesh {Text}");
|
||||
}
|
||||
}
|
||||
if (settings.SetDefaultParamData)
|
||||
{
|
||||
foreach (var param in mat.matparam.Values)
|
||||
{
|
||||
switch (param.Name)
|
||||
{
|
||||
case "const_color0":
|
||||
case "const_color1":
|
||||
case "const_color2":
|
||||
case "const_color3":
|
||||
case "base_color_mul_color":
|
||||
case "uniform0_mul_color":
|
||||
case "uniform1_mul_color":
|
||||
case "uniform2_mul_color":
|
||||
case "uniform3_mul_color":
|
||||
case "uniform4_mul_color":
|
||||
case "proc_texture_2d_mul_color":
|
||||
case "proc_texture_3d_mul_color":
|
||||
case "displacement1_color":
|
||||
case "ripple_emission_color":
|
||||
case "hack_color":
|
||||
case "stain_color":
|
||||
case "displacement_color":
|
||||
param.ValueFloat = new float[] {1,1,1,1 };
|
||||
break;
|
||||
case "gsys_bake_st0":
|
||||
param.ValueFloat = new float[] { 1, 1, 0, 0 };
|
||||
break;
|
||||
case "gsys_bake_st1":
|
||||
param.ValueFloat = new float[] { 1, 1, 0, 0 };
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TransformPosition(Vector3 Position, Vector3 Rotation, Vector3 Scale)
|
||||
{
|
||||
|
|
|
@ -81,11 +81,14 @@ namespace FirstPlugin
|
|||
#region structs
|
||||
public void LoadViewport()
|
||||
{
|
||||
if (!EditorIsViewportActive(FirstPlugin.DockedViewport))
|
||||
if (!Runtime.DisableViewport)
|
||||
{
|
||||
Viewport.Instance.gL_ControlModern1.MainDrawable = this;
|
||||
FirstPlugin.DockedViewport.Text = resFile.Name + ".bfres";
|
||||
FirstPlugin.DockedViewport = Viewport.Instance;
|
||||
if (!EditorIsViewportActive(FirstPlugin.DockedViewport))
|
||||
{
|
||||
Viewport.Instance.gL_ControlModern1.MainDrawable = this;
|
||||
FirstPlugin.DockedViewport.Text = resFile.Name + ".bfres";
|
||||
FirstPlugin.DockedViewport = Viewport.Instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool EditorIsViewportActive(DockContent dock)
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
this.chkBoxFlipUvsY = new System.Windows.Forms.CheckBox();
|
||||
this.chkBoxImportBones = new System.Windows.Forms.CheckBox();
|
||||
this.panel8 = new System.Windows.Forms.Panel();
|
||||
this.chkBoxRotNegative90Y = new System.Windows.Forms.CheckBox();
|
||||
this.useMaterialLabel = new System.Windows.Forms.Label();
|
||||
this.textBoxMaterialPath = new System.Windows.Forms.TextBox();
|
||||
this.chkBoxEnableWeightIndices = new System.Windows.Forms.CheckBox();
|
||||
|
@ -83,7 +84,7 @@
|
|||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.tabPageAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.chkBoxRotNegative90Y = new System.Windows.Forms.CheckBox();
|
||||
this.chkBoxParamDefaults = new System.Windows.Forms.CheckBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
|
@ -383,7 +384,7 @@
|
|||
// chkBoxFlipUvsY
|
||||
//
|
||||
this.chkBoxFlipUvsY.AutoSize = true;
|
||||
this.chkBoxFlipUvsY.Location = new System.Drawing.Point(3, 21);
|
||||
this.chkBoxFlipUvsY.Location = new System.Drawing.Point(3, 39);
|
||||
this.chkBoxFlipUvsY.Name = "chkBoxFlipUvsY";
|
||||
this.chkBoxFlipUvsY.Size = new System.Drawing.Size(65, 17);
|
||||
this.chkBoxFlipUvsY.TabIndex = 4;
|
||||
|
@ -394,7 +395,7 @@
|
|||
// chkBoxImportBones
|
||||
//
|
||||
this.chkBoxImportBones.AutoSize = true;
|
||||
this.chkBoxImportBones.Location = new System.Drawing.Point(3, 44);
|
||||
this.chkBoxImportBones.Location = new System.Drawing.Point(3, 62);
|
||||
this.chkBoxImportBones.Name = "chkBoxImportBones";
|
||||
this.chkBoxImportBones.Size = new System.Drawing.Size(88, 17);
|
||||
this.chkBoxImportBones.TabIndex = 10;
|
||||
|
@ -405,6 +406,7 @@
|
|||
//
|
||||
// panel8
|
||||
//
|
||||
this.panel8.Controls.Add(this.chkBoxParamDefaults);
|
||||
this.panel8.Controls.Add(this.chkBoxRotNegative90Y);
|
||||
this.panel8.Controls.Add(this.useMaterialLabel);
|
||||
this.panel8.Controls.Add(this.textBoxMaterialPath);
|
||||
|
@ -428,6 +430,17 @@
|
|||
this.panel8.Size = new System.Drawing.Size(498, 322);
|
||||
this.panel8.TabIndex = 11;
|
||||
//
|
||||
// chkBoxRotNegative90Y
|
||||
//
|
||||
this.chkBoxRotNegative90Y.AutoSize = true;
|
||||
this.chkBoxRotNegative90Y.Location = new System.Drawing.Point(3, 108);
|
||||
this.chkBoxRotNegative90Y.Name = "chkBoxRotNegative90Y";
|
||||
this.chkBoxRotNegative90Y.Size = new System.Drawing.Size(117, 17);
|
||||
this.chkBoxRotNegative90Y.TabIndex = 29;
|
||||
this.chkBoxRotNegative90Y.Text = "Rotate -90 degrees";
|
||||
this.chkBoxRotNegative90Y.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.chkBoxRotNegative90Y.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// useMaterialLabel
|
||||
//
|
||||
this.useMaterialLabel.AutoSize = true;
|
||||
|
@ -452,7 +465,7 @@
|
|||
// chkBoxEnableWeightIndices
|
||||
//
|
||||
this.chkBoxEnableWeightIndices.AutoSize = true;
|
||||
this.chkBoxEnableWeightIndices.Location = new System.Drawing.Point(238, 159);
|
||||
this.chkBoxEnableWeightIndices.Location = new System.Drawing.Point(240, 154);
|
||||
this.chkBoxEnableWeightIndices.Name = "chkBoxEnableWeightIndices";
|
||||
this.chkBoxEnableWeightIndices.Size = new System.Drawing.Size(140, 17);
|
||||
this.chkBoxEnableWeightIndices.TabIndex = 25;
|
||||
|
@ -462,7 +475,7 @@
|
|||
// chkBoxEnableBitans
|
||||
//
|
||||
this.chkBoxEnableBitans.AutoSize = true;
|
||||
this.chkBoxEnableBitans.Location = new System.Drawing.Point(238, 136);
|
||||
this.chkBoxEnableBitans.Location = new System.Drawing.Point(240, 131);
|
||||
this.chkBoxEnableBitans.Name = "chkBoxEnableBitans";
|
||||
this.chkBoxEnableBitans.Size = new System.Drawing.Size(112, 17);
|
||||
this.chkBoxEnableBitans.TabIndex = 24;
|
||||
|
@ -472,7 +485,7 @@
|
|||
// chkBoxEnableTans
|
||||
//
|
||||
this.chkBoxEnableTans.AutoSize = true;
|
||||
this.chkBoxEnableTans.Location = new System.Drawing.Point(238, 113);
|
||||
this.chkBoxEnableTans.Location = new System.Drawing.Point(240, 108);
|
||||
this.chkBoxEnableTans.Name = "chkBoxEnableTans";
|
||||
this.chkBoxEnableTans.Size = new System.Drawing.Size(107, 17);
|
||||
this.chkBoxEnableTans.TabIndex = 23;
|
||||
|
@ -483,7 +496,7 @@
|
|||
// chkBoxEnableVertColors
|
||||
//
|
||||
this.chkBoxEnableVertColors.AutoSize = true;
|
||||
this.chkBoxEnableVertColors.Location = new System.Drawing.Point(238, 90);
|
||||
this.chkBoxEnableVertColors.Location = new System.Drawing.Point(240, 85);
|
||||
this.chkBoxEnableVertColors.Name = "chkBoxEnableVertColors";
|
||||
this.chkBoxEnableVertColors.Size = new System.Drawing.Size(124, 17);
|
||||
this.chkBoxEnableVertColors.TabIndex = 22;
|
||||
|
@ -494,7 +507,7 @@
|
|||
// chkBoxEnableUVs
|
||||
//
|
||||
this.chkBoxEnableUVs.AutoSize = true;
|
||||
this.chkBoxEnableUVs.Location = new System.Drawing.Point(238, 67);
|
||||
this.chkBoxEnableUVs.Location = new System.Drawing.Point(240, 62);
|
||||
this.chkBoxEnableUVs.Name = "chkBoxEnableUVs";
|
||||
this.chkBoxEnableUVs.Size = new System.Drawing.Size(82, 17);
|
||||
this.chkBoxEnableUVs.TabIndex = 21;
|
||||
|
@ -505,7 +518,7 @@
|
|||
// chkBoxEnableNormals
|
||||
//
|
||||
this.chkBoxEnableNormals.AutoSize = true;
|
||||
this.chkBoxEnableNormals.Location = new System.Drawing.Point(238, 44);
|
||||
this.chkBoxEnableNormals.Location = new System.Drawing.Point(240, 39);
|
||||
this.chkBoxEnableNormals.Name = "chkBoxEnableNormals";
|
||||
this.chkBoxEnableNormals.Size = new System.Drawing.Size(100, 17);
|
||||
this.chkBoxEnableNormals.TabIndex = 20;
|
||||
|
@ -517,7 +530,7 @@
|
|||
//
|
||||
this.chkBoxEnablePositions.AutoSize = true;
|
||||
this.chkBoxEnablePositions.Enabled = false;
|
||||
this.chkBoxEnablePositions.Location = new System.Drawing.Point(238, 21);
|
||||
this.chkBoxEnablePositions.Location = new System.Drawing.Point(240, 16);
|
||||
this.chkBoxEnablePositions.Name = "chkBoxEnablePositions";
|
||||
this.chkBoxEnablePositions.Size = new System.Drawing.Size(104, 17);
|
||||
this.chkBoxEnablePositions.TabIndex = 19;
|
||||
|
@ -528,7 +541,7 @@
|
|||
// chkBoxRecalcNormals
|
||||
//
|
||||
this.chkBoxRecalcNormals.AutoSize = true;
|
||||
this.chkBoxRecalcNormals.Location = new System.Drawing.Point(3, 136);
|
||||
this.chkBoxRecalcNormals.Location = new System.Drawing.Point(3, 154);
|
||||
this.chkBoxRecalcNormals.Name = "chkBoxRecalcNormals";
|
||||
this.chkBoxRecalcNormals.Size = new System.Drawing.Size(124, 17);
|
||||
this.chkBoxRecalcNormals.TabIndex = 18;
|
||||
|
@ -553,7 +566,7 @@
|
|||
// chkBoxTransformMatrix
|
||||
//
|
||||
this.chkBoxTransformMatrix.AutoSize = true;
|
||||
this.chkBoxTransformMatrix.Location = new System.Drawing.Point(3, 113);
|
||||
this.chkBoxTransformMatrix.Location = new System.Drawing.Point(3, 131);
|
||||
this.chkBoxTransformMatrix.Name = "chkBoxTransformMatrix";
|
||||
this.chkBoxTransformMatrix.Size = new System.Drawing.Size(104, 17);
|
||||
this.chkBoxTransformMatrix.TabIndex = 14;
|
||||
|
@ -565,7 +578,7 @@
|
|||
// chkBoxRot90Y
|
||||
//
|
||||
this.chkBoxRot90Y.AutoSize = true;
|
||||
this.chkBoxRot90Y.Location = new System.Drawing.Point(3, 67);
|
||||
this.chkBoxRot90Y.Location = new System.Drawing.Point(3, 85);
|
||||
this.chkBoxRot90Y.Name = "chkBoxRot90Y";
|
||||
this.chkBoxRot90Y.Size = new System.Drawing.Size(114, 17);
|
||||
this.chkBoxRot90Y.TabIndex = 13;
|
||||
|
@ -577,7 +590,7 @@
|
|||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.White;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(3, 162);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(3, 180);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(17, 17);
|
||||
this.pictureBox1.TabIndex = 12;
|
||||
|
@ -586,7 +599,7 @@
|
|||
// checkBox9
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.Location = new System.Drawing.Point(25, 163);
|
||||
this.checkBox9.Location = new System.Drawing.Point(25, 181);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(130, 17);
|
||||
this.checkBox9.TabIndex = 11;
|
||||
|
@ -672,16 +685,16 @@
|
|||
this.tabPageAdvanced.TabIndex = 0;
|
||||
this.tabPageAdvanced.Text = "Advanced Settings";
|
||||
//
|
||||
// chkBoxRotNegative90Y
|
||||
// chkBoxParamDefaults
|
||||
//
|
||||
this.chkBoxRotNegative90Y.AutoSize = true;
|
||||
this.chkBoxRotNegative90Y.Location = new System.Drawing.Point(3, 90);
|
||||
this.chkBoxRotNegative90Y.Name = "chkBoxRotNegative90Y";
|
||||
this.chkBoxRotNegative90Y.Size = new System.Drawing.Size(117, 17);
|
||||
this.chkBoxRotNegative90Y.TabIndex = 29;
|
||||
this.chkBoxRotNegative90Y.Text = "Rotate -90 degrees";
|
||||
this.chkBoxRotNegative90Y.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.chkBoxRotNegative90Y.UseVisualStyleBackColor = true;
|
||||
this.chkBoxParamDefaults.AutoSize = true;
|
||||
this.chkBoxParamDefaults.Location = new System.Drawing.Point(3, 16);
|
||||
this.chkBoxParamDefaults.Name = "chkBoxParamDefaults";
|
||||
this.chkBoxParamDefaults.Size = new System.Drawing.Size(117, 17);
|
||||
this.chkBoxParamDefaults.TabIndex = 30;
|
||||
this.chkBoxParamDefaults.Text = "Set Param Defaults";
|
||||
this.chkBoxParamDefaults.UseVisualStyleBackColor = true;
|
||||
this.chkBoxParamDefaults.CheckedChanged += new System.EventHandler(this.chkBoxSettings_CheckedChanged);
|
||||
//
|
||||
// BfresModelImportSettings
|
||||
//
|
||||
|
@ -779,5 +792,6 @@
|
|||
private System.Windows.Forms.Label useMaterialLabel;
|
||||
private System.Windows.Forms.TextBox textBoxMaterialPath;
|
||||
private System.Windows.Forms.CheckBox chkBoxRotNegative90Y;
|
||||
private System.Windows.Forms.CheckBox chkBoxParamDefaults;
|
||||
}
|
||||
}
|
|
@ -43,6 +43,7 @@ namespace FirstPlugin
|
|||
public bool Rotate90DegreesNegativeX;
|
||||
public bool RecalculateNormals;
|
||||
public string ExternalMaterialPath;
|
||||
public bool SetDefaultParamData;
|
||||
|
||||
public void DisableMaterialEdits()
|
||||
{
|
||||
|
@ -60,6 +61,8 @@ namespace FirstPlugin
|
|||
chkBoxEnableBitans.Checked = obj.HasUv0;
|
||||
chkBoxEnableWeightIndices.Checked = obj.HasWeights;
|
||||
chkBoxEnableVertColors.Checked = obj.HasVertColors;
|
||||
chkBoxParamDefaults.Checked = true;
|
||||
chkBoxTransformMatrix.Checked = true;
|
||||
|
||||
if (!obj.HasPos)
|
||||
DisableAttribute(chkBoxEnablePositions, comboBoxFormatPositions);
|
||||
|
@ -257,6 +260,7 @@ namespace FirstPlugin
|
|||
Rotate90DegreesY = chkBoxRot90Y.Checked;
|
||||
Rotate90DegreesNegativeY = chkBoxRotNegative90Y.Checked;
|
||||
RecalculateNormals = chkBoxRecalcNormals.Checked;
|
||||
SetDefaultParamData = chkBoxParamDefaults.Checked;
|
||||
}
|
||||
private AttribFormat SetAttribFormat(string Format)
|
||||
{
|
||||
|
|
|
@ -89,12 +89,9 @@ namespace FirstPlugin
|
|||
case "DX10":
|
||||
IsDX10 = true;
|
||||
break;
|
||||
case "":
|
||||
return SurfaceFormat.R8_G8_B8_A8_SRGB;
|
||||
default:
|
||||
throw new Exception($"Format {fourCC} not supported!");
|
||||
return SurfaceFormat.R8_G8_B8_A8_SRGB;
|
||||
}
|
||||
|
||||
if (IsDX10)
|
||||
{
|
||||
switch (dds.DX10header.DXGI_Format)
|
||||
|
|
|
@ -81,11 +81,19 @@ namespace FirstPlugin
|
|||
public void Load()
|
||||
{
|
||||
MainF = MainForm;
|
||||
DockedViewport = DockedEditor;
|
||||
DockedEditor = Viewport.Instance;
|
||||
|
||||
|
||||
Config.StartupFromFile("Lib/Plugins/config.xml");
|
||||
if (!Runtime.DisableViewport)
|
||||
{
|
||||
DockedViewport = DockedEditor;
|
||||
DockedEditor = Viewport.Instance;
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginRuntime.FSHPDockState = DockState.Document;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public void Unload()
|
||||
{
|
||||
|
|
|
@ -46,8 +46,7 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="BezelEngineArchive_Lib">
|
||||
<HintPath>Externals\BezelEngineArchive_Lib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\BezelEngineArchive_Lib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ByamlExt">
|
||||
<HintPath>..\Switch_Toolbox\Lib\ByamlExt.dll</HintPath>
|
||||
|
@ -58,7 +57,6 @@
|
|||
</Reference>
|
||||
<Reference Include="EditorCoreCommon">
|
||||
<HintPath>..\Switch_Toolbox\Lib\EditorCoreCommon.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="KCLExt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -66,8 +64,7 @@
|
|||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="NAudio">
|
||||
<HintPath>Externals\NAudio.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\NAudio.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenTK">
|
||||
<HintPath>..\..\..\..\Documents\Visual Studio 2017\Projects\WindowsFormsApp2\WindowsFormsApp2\Lib\OpenTK.dll</HintPath>
|
||||
|
@ -84,8 +81,7 @@
|
|||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="SARCExt">
|
||||
<HintPath>Externals\SARCExt.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\SARCExt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SFGraphics">
|
||||
<HintPath>..\..\..\..\Documents\Visual Studio 2017\Projects\WindowsFormsApp2\WindowsFormsApp2\Lib\SFGraphics.dll</HintPath>
|
||||
|
@ -96,26 +92,19 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.BinaryData">
|
||||
<HintPath>..\..\..\..\Documents\Visual Studio 2017\Projects\WindowsFormsApp2\WindowsFormsApp2\Lib\Syroot.BinaryData.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\Syroot.BinaryData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.Maths">
|
||||
<HintPath>..\..\..\..\Documents\Visual Studio 2017\Projects\WindowsFormsApp2\WindowsFormsApp2\Lib\Syroot.Maths.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\Syroot.Maths.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.NintenTools.Bfres">
|
||||
<HintPath>..\Switch_Toolbox\Lib\Syroot.NintenTools.Bfres.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.NintenTools.NSW.Bfres, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Externals\Syroot.NintenTools.NSW.Bfres.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="Syroot.NintenTools.NSW.Bfres">
|
||||
<HintPath>..\Switch_Toolbox\Lib\Syroot.NintenTools.NSW.Bfres.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.NintenTools.NSW.Bntx, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\Documents\GitHub\Nintendo_Switch_BFRES_Library\src - Copy (2)\Syroot.NintenTools.Bntx\bin\Release\net45\Syroot.NintenTools.NSW.Bntx.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="Syroot.NintenTools.NSW.Bntx">
|
||||
<HintPath>..\Switch_Toolbox\Lib\Syroot.NintenTools.NSW.Bntx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
@ -134,8 +123,7 @@
|
|||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="VGAudio">
|
||||
<HintPath>Externals\VGAudio.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\VGAudio.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="VisualStudioTabControl">
|
||||
<HintPath>..\..\..\..\Documents\GitHub\Nintendo_Switch_BFRES_Library\src - Copy (3)\VisualStudioTabControl.dll</HintPath>
|
||||
|
@ -147,8 +135,7 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ZstdNet">
|
||||
<HintPath>Externals\ZstdNet.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\Switch_Toolbox\Lib\ZstdNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -44,6 +44,9 @@ namespace Switch_Toolbox
|
|||
case "OpenStartupWindow":
|
||||
bool.TryParse(node.InnerText, out Runtime.OpenStartupWindow);
|
||||
break;
|
||||
case "DisableViewport":
|
||||
bool.TryParse(node.InnerText, out Runtime.DisableViewport);
|
||||
break;
|
||||
case "RenderModels":
|
||||
bool.TryParse(node.InnerText, out Runtime.RenderModels);
|
||||
break;
|
||||
|
@ -86,7 +89,7 @@ namespace Switch_Toolbox
|
|||
private static XmlDocument CreateXmlFromSettings()
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
XmlNode mainNode = doc.CreateElement("FORGECONFIG");
|
||||
XmlNode mainNode = doc.CreateElement("TOOLCONFIG");
|
||||
doc.AppendChild(mainNode);
|
||||
|
||||
AppendMainFormSettings(doc, mainNode);
|
||||
|
@ -101,6 +104,7 @@ namespace Switch_Toolbox
|
|||
XmlNode mainSettingsNode = doc.CreateElement("MAINFORM");
|
||||
parentNode.AppendChild(mainSettingsNode);
|
||||
mainSettingsNode.AppendChild(createNode(doc, "OpenStartupWindow", Runtime.OpenStartupWindow.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "DisableViewport", Runtime.DisableViewport.ToString()));
|
||||
}
|
||||
private static void AppendOCompressionFilelistSettings(XmlDocument doc, XmlNode parentNode)
|
||||
{
|
||||
|
|
15
Switch_Toolbox/GUI/Settings.Designer.cs
generated
15
Switch_Toolbox/GUI/Settings.Designer.cs
generated
|
@ -54,6 +54,7 @@
|
|||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.yazoCompressionLevelUD = new System.Windows.Forms.NumericUpDown();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.disableViewportCHKBX = new System.Windows.Forms.CheckBox();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.previewScaleUD)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.camFarNumUD)).BeginInit();
|
||||
|
@ -323,6 +324,7 @@
|
|||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.disableViewportCHKBX);
|
||||
this.panel1.Controls.Add(this.GLSLVerLabel);
|
||||
this.panel1.Controls.Add(this.openGLVerLabel);
|
||||
this.panel1.Location = new System.Drawing.Point(12, 13);
|
||||
|
@ -402,6 +404,18 @@
|
|||
this.panel3.Size = new System.Drawing.Size(313, 138);
|
||||
this.panel3.TabIndex = 18;
|
||||
//
|
||||
// disableViewportCHKBX
|
||||
//
|
||||
this.disableViewportCHKBX.AutoSize = true;
|
||||
this.disableViewportCHKBX.ForeColor = System.Drawing.Color.White;
|
||||
this.disableViewportCHKBX.Location = new System.Drawing.Point(0, 67);
|
||||
this.disableViewportCHKBX.Name = "disableViewportCHKBX";
|
||||
this.disableViewportCHKBX.Size = new System.Drawing.Size(105, 17);
|
||||
this.disableViewportCHKBX.TabIndex = 16;
|
||||
this.disableViewportCHKBX.Text = "Disable Viewport";
|
||||
this.disableViewportCHKBX.UseVisualStyleBackColor = true;
|
||||
this.disableViewportCHKBX.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged_2);
|
||||
//
|
||||
// Settings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -458,5 +472,6 @@
|
|||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.NumericUpDown yazoCompressionLevelUD;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.CheckBox disableViewportCHKBX;
|
||||
}
|
||||
}
|
|
@ -44,6 +44,7 @@ namespace Switch_Toolbox
|
|||
camFarNumUD.Value = (decimal)Runtime.CameraFar;
|
||||
previewScaleUD.Value = (decimal)Runtime.previewScale;
|
||||
yazoCompressionLevelUD.Value = Runtime.Yaz0CompressionLevel;
|
||||
disableViewportCHKBX.Checked = Runtime.DisableViewport;
|
||||
|
||||
GLSLVerLabel.Text = $"Open GL Version: {Runtime.GLSLVersion}";
|
||||
openGLVerLabel.Text = $"GLSL Version: {Runtime.openGLVersion}";
|
||||
|
@ -133,5 +134,10 @@ namespace Switch_Toolbox
|
|||
{
|
||||
Runtime.Yaz0CompressionLevel = (int)yazoCompressionLevelUD.Value;
|
||||
}
|
||||
|
||||
private void checkBox1_CheckedChanged_2(object sender, EventArgs e)
|
||||
{
|
||||
Runtime.DisableViewport = disableViewportCHKBX.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
BIN
Switch_Toolbox/Lib/LZ4pn.dll
Normal file
BIN
Switch_Toolbox/Lib/LZ4pn.dll
Normal file
Binary file not shown.
|
@ -39,8 +39,13 @@ namespace Switch_Toolbox
|
|||
ShaderTools.executableDir = executableDir;
|
||||
|
||||
Config.StartupFromFile(MainForm.executableDir + "\\config.xml");
|
||||
|
||||
dockContent = new DockContentST();
|
||||
dockContent = Viewport.Instance;
|
||||
if (!Runtime.DisableViewport)
|
||||
{
|
||||
dockContent = Viewport.Instance;
|
||||
}
|
||||
|
||||
|
||||
GenericPluginLoader.LoadPlugin();
|
||||
|
||||
|
@ -129,7 +134,9 @@ namespace Switch_Toolbox
|
|||
fileRecent.ForeColor = Color.White;
|
||||
recentToolStripMenuItem.DropDownItems.Add(fileRecent); //add the menu to "recent" menu
|
||||
}
|
||||
dockContent.Show(dockPanel1, DockState.Document);
|
||||
if (!Runtime.DisableViewport)
|
||||
dockContent.Show(dockPanel1, DockState.Document);
|
||||
|
||||
|
||||
if (OpenTK.Graphics.GraphicsContext.CurrentContext != null)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace Switch_Toolbox.Library
|
|||
public static bool RenderModelWireframe = false;
|
||||
public static ViewportShading viewportShading;
|
||||
public static bool IsDebugMode = false; //Enables experimental features and other things to debug.
|
||||
public static bool DisableViewport = false;
|
||||
|
||||
public static bool enableVSync = false;
|
||||
public static float floorSize = 30f;
|
||||
|
|
Loading…
Reference in a new issue