This commit is contained in:
KillzXGaming 2019-08-25 20:49:24 -04:00
commit 71a7d06ad0
54 changed files with 31 additions and 14494 deletions

7
.gitignore vendored
View file

@ -1,13 +1,12 @@
.vs/Switch_Toolbox/v15/Server/sqlite3/db.lock
.vs/
bin/
obj/
*NodeEditorWinforms-master
*GL_EditorFramework-master
*SuperBMD-master
*SuperBMD-link
*Assimp
*.resources
Debug/
Release/
BrawlboxHelper/BrawlHelperTest2.cs
BrawlboxHelper/BrawlHelperTest2.zip
Switch_Toolbox_StreamOverhaul.zip

Binary file not shown.

Binary file not shown.

View file

@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Toolbox\bin\Debug\Lib\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Syroot.NintenTools.NSW.Bfres;
@ -77,7 +77,7 @@ namespace Bfres.Structs
Nodes.Add(new FSKL.fsklNode());
}
public ToolStripItem[] GetContextMenuItems()
public override ToolStripItem[] GetContextMenuItems()
{
List<ToolStripItem> Items = new List<ToolStripItem>();
Items.AddRange(base.GetContextMenuItems());
@ -697,33 +697,30 @@ namespace Bfres.Structs
csvsettings.SetModelAttributes(csvModel.objects[0]);
if (csvsettings.ShowDialog() == DialogResult.OK)
{
if (csvsettings.LimitSkinCount) {
if (csvsettings.LimitSkinCount ||
csvsettings.MapOriginalMaterials ||
csvsettings.UseOriginalAttributes) {
for (int i = 0; i < csvModel.objects.Count; i++)
{
List<FSHP> Matches = shapes.Where(p => String.Equals(p.Text,
csvModel.objects[i].ObjectName, StringComparison.CurrentCulture)).ToList();
//Only one match should be found as shapes can't have duped names
FSHP match = shapes.Where(p => string.Equals(p.Text,
csvModel.objects[i].ObjectName, StringComparison.CurrentCulture)).FirstOrDefault();
if (Matches != null && Matches.Count > 0)
if (csvsettings.LimitSkinCount)
{
//Match the skin count setting if names match
//Only one match should be found as shapes can't have duped names
csvModel.objects[i].VertexSkinCount = ((FSHP)Matches[0]).VertexSkinCount;
if (csvsettings.MapOriginalMaterials)
csvModel.objects[i].MaterialIndex = ((FSHP)Matches[0]).MaterialIndex;
if (csvsettings.LimitSkinCount)
csvModel.objects[i].VertexSkinCount = ((FSHP)Matches[0]).VertexSkinCount;
if (csvsettings.UseOriginalAttributes)
{
AttributeMatcher.Add(csvModel.objects[i].ObjectName, Matches[0].vertexAttributes);
}
}
else
{
//Else just match the first object
csvModel.objects[i].VertexSkinCount = shapes[0].VertexSkinCount;
csvModel.objects[i].VertexSkinCount = (match ?? shapes.First()).VertexSkinCount;
}
if (csvsettings.MapOriginalMaterials && match != null)
{
csvModel.objects[i].MaterialIndex = match.MaterialIndex;
}
if (csvsettings.UseOriginalAttributes && match != null)
{
AttributeMatcher.Add(csvModel.objects[i].ObjectName, match.vertexAttributes);
}
}
}
@ -761,7 +758,7 @@ namespace Bfres.Structs
shape.VertexBufferIndex = shapes.Count;
shape.vertices = obj.vertices;
shape.MaterialIndex = 0;
shape.MaterialIndex = obj.MaterialIndex;
if (AttributeMatcher.ContainsKey(obj.ObjectName))
shape.vertexAttributes = csvsettings.CreateNewAttributes(AttributeMatcher[obj.ObjectName]);

View file

@ -1192,7 +1192,6 @@ namespace Bfres.Structs
public int[] display;
public int DisplayId;
public int VertexBufferIndex;
public int TargetAttribCount;
public List<float> boundingRadius = new List<float>();
@ -1202,7 +1201,6 @@ namespace Bfres.Structs
public Vector3 Center;
public Vector3 Extend;
}
public int DisplayLODIndex = 0;
public List<VertexAttribute> vertexAttributes = new List<VertexAttribute>();
public class VertexAttribute

View file

@ -7,6 +7,7 @@ using Toolbox.Library;
using Toolbox.Library.Rendering;
using System.Windows.Forms;
using OpenTK;
using System.Linq;
namespace FirstPlugin
{
@ -87,7 +88,6 @@ namespace FirstPlugin
Vertex vtx = new Vertex();
STGenericObject.LOD_Mesh lod = new STGenericObject.LOD_Mesh();
int Index = 0;
int ww = 0;
while (true)
{
line = csv.ReadLine();
@ -277,6 +277,7 @@ namespace FirstPlugin
foreach (float f in obj.weightsT[v])
obj.vertices[v].boneWeights.Add(f);
}
obj.VertexSkinCount = (byte)obj.vertices.Max(v => v.boneNames.Count);
int vID = 0;
foreach (Vertex v in obj.vertices)

View file

@ -60,7 +60,7 @@ namespace FirstPlugin
{
get
{
return chkMapOriginalMaterials.Checked && chkBoxImportMat.Checked;
return chkMapOriginalMaterials.Checked && !chkBoxImportMat.Checked;
}
}

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -57,7 +57,7 @@ namespace Toolbox.Library.NodeWrappers
CanDelete = false;
}
public ToolStripItem[] GetContextMenuItems()
public virtual ToolStripItem[] GetContextMenuItems()
{
if (IsFolder)
{

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="LZ4pn" publicKeyToken="62e1b5ec1eec9bdd" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.10.93" newVersion="1.0.10.93" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="K4os.Hash.xxHash" publicKeyToken="32cd54395057cec3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.5.0" newVersion="1.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="LZ4pn" publicKeyToken="62e1b5ec1eec9bdd" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.10.93" newVersion="1.0.10.93" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="K4os.Hash.xxHash" publicKeyToken="32cd54395057cec3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.5.0" newVersion="1.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View file

@ -20,7 +20,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>.\</OutputPath>
<OutputPath>..\Toolbox\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
</PropertyGroup>
</Project>

View file

@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Toolbox\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View file

@ -1 +0,0 @@
747948e0929dd8935549f97d0e91eb2d59336ea8

View file

@ -1,38 +0,0 @@
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Debug\Updater.exe.config
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Debug\Updater.exe
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Debug\Updater.pdb
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Debug\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Debug\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Debug\Updater.exe
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Debug\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Debug\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Debug\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Debug\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Debug\Octokit.dll
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Debug\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Debug\Updater.csproj.CopyComplete
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Debug\Octokit.dll
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Debug\Updater.csproj.CopyComplete
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Updater.exe.manifest
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Updater.application
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Debug\Octokit.dll
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.TrustInfo.xml
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.exe.manifest
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.application
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.csproj.CopyComplete
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.exe
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.pdb
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Debug\Updater.csprojAssemblyReference.cache

Binary file not shown.

Binary file not shown.

View file

@ -1,46 +0,0 @@
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Release\Updater.exe.config
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Release\Updater.exe
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\bin\Release\Updater.pdb
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Release\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Release\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Release\Updater.exe
C:\Users\Nathan\source\repos\Switch_Toolbox\Updater\obj\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Release\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\bin\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Release\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox\Updater\obj\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\bin\Release\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\bin\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\bin\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\obj\Release\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\obj\Release\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\obj\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox - Copy\Updater\obj\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Release\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\bin\Release\Octokit.dll
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Release\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Release\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Release\Updater.csproj.CopyComplete
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\Switch_Toolbox\Switch-Toolbox-38ceb8d7163902ecb569774ab4db327a194d6f99\Updater\obj\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Release\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\bin\Release\Octokit.dll
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Toolbox\bin\Release\Updater.exe.config
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Toolbox\bin\Release\Updater.exe.manifest
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Toolbox\bin\Release\Updater.application
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Toolbox\bin\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Toolbox\bin\Release\Updater.pdb
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.csprojAssemblyReference.cache
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.csproj.CoreCompileInputs.cache
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.TrustInfo.xml
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.exe.manifest
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.application
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.csproj.CopyComplete
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.exe
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Updater\obj\Release\Updater.pdb

Binary file not shown.

Binary file not shown.