1
0
mirror of synced 2025-02-25 22:38:07 +01:00

Limt skin count by default to prevent any possible issues

This commit is contained in:
KillzXGaming 2019-06-23 11:04:34 -04:00
parent cbef8ab438
commit 31e5f42373
9 changed files with 18 additions and 6 deletions

Binary file not shown.

View File

@ -617,8 +617,6 @@ namespace FirstPlugin
{
if (ftexCont.ResourceNodes.ContainsKey(activeTex))
{
Console.WriteLine("BINDING tex.animatedTexName " + activeTex + " " + tex.Type);
BindFTEX(ftexCont, tex, shader, activeTex);
return tex.textureUnit + 1;
}
@ -629,8 +627,6 @@ namespace FirstPlugin
{
if (ftexContainer.ResourceNodes.ContainsKey(activeTex))
{
Console.WriteLine("BINDING tex.animatedTexName " + activeTex + " " + tex.Type);
BindFTEX(ftexContainer, tex, shader, activeTex);
return tex.textureUnit + 1;
}

View File

@ -18,6 +18,7 @@ namespace FirstPlugin
InitializeComponent();
CanResize = false;
ogSkinCountChkBox.Checked = true;
tabControl1.myBackColor = FormThemes.BaseTheme.FormBackColor;

View File

@ -14,6 +14,8 @@ namespace Switch_Toolbox.Library
{
public class AssimpData
{
private float UnitScale = 1;
public bool UseTransformMatrix = true;
public bool RotateSkeleton = false;
public float RotateSkeletonAmount = 90;
@ -67,11 +69,15 @@ namespace Switch_Toolbox.Library
Flags |= PostProcessSteps.CalculateTangentSpace;
Flags |= PostProcessSteps.GenerateNormals;*/
scene = Importer.ImportFile(FileName, settings.GetFlags());
if (Utils.GetExtension(FileName) == ".dae")
GetRealNodeNames(FileName);
STConsole.WriteLine($"UnitScale {UnitScale}");
LoadScene();
return true;
@ -108,11 +114,18 @@ namespace Switch_Toolbox.Library
Name = att.InnerText;
}
Console.WriteLine($"BONE ID {ID} Name {Name}");
if (!DaeHelper.IDMapToName.ContainsKey(ID))
DaeHelper.IDMapToName.Add(ID, Name);
}
XmlNodeList elemListScale = doc.GetElementsByTagName("unit");
for (int i = 0; i < elemListScale.Count; i++)
{
foreach (XmlAttribute att in elemListScale[i].Attributes)
{
if (att.Name == "meter")
float.TryParse(att.InnerText, out UnitScale);
}
}
}
public void processNode()
@ -546,6 +559,7 @@ namespace Switch_Toolbox.Library
obj.boneList = GetBoneList(msh);
obj.VertexSkinCount = (byte)GetVertexSkinCount(msh);
STGenericObject.LOD_Mesh lod = new STGenericObject.LOD_Mesh();
lod.faces = GetFaces(msh);
lod.IndexFormat = STIndexFormat.UInt16;

View File

@ -33,6 +33,7 @@ namespace Switch_Toolbox.Library.Forms
SkinLimitMax = (uint)numericUpDown1.Value;
var Flags = PostProcessSteps.None;
Flags |= PostProcessSteps.GlobalScale;
if (generateNormalsChk.Checked)
Flags |= PostProcessSteps.GenerateNormals;