Fix sarc's with folders saving wrong
This commit is contained in:
parent
5e4313c54f
commit
c75c171792
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,8 +14,8 @@ namespace FirstPlugin
|
|||||||
public class SARC : TreeNodeFile, IFileFormat
|
public class SARC : TreeNodeFile, IFileFormat
|
||||||
{
|
{
|
||||||
public bool CanSave { get; set; }
|
public bool CanSave { get; set; }
|
||||||
public string[] Description { get; set; } = new string[] { "SARC", "SARC", "SARC", "SARC", "SARC" };
|
public string[] Description { get; set; } = new string[] { "SARC", "SARC", "SARC", "SARC", "SARC", "SARC" };
|
||||||
public string[] Extension { get; set; } = new string[] { "*.pack", "*.sarc", "*.bgenv", "*.sblarc", "*.sbactorpack" };
|
public string[] Extension { get; set; } = new string[] { "*.pack", "*.sarc", "*.bgenv", "*.sblarc", "*.sbactorpack", ".arc" };
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
public string FilePath { get; set; }
|
public string FilePath { get; set; }
|
||||||
public IFileInfo IFileInfo { get; set; }
|
public IFileInfo IFileInfo { get; set; }
|
||||||
@ -195,11 +195,15 @@ namespace FirstPlugin
|
|||||||
{
|
{
|
||||||
string dir = Path.GetDirectoryName(sarc.FullName);
|
string dir = Path.GetDirectoryName(sarc.FullName);
|
||||||
|
|
||||||
|
Console.WriteLine("CurrentFullName " + sarc.FullName);
|
||||||
|
|
||||||
if (dir == string.Empty)
|
if (dir == string.Empty)
|
||||||
sarc.FullName = sarc.Text;
|
sarc.FullName = sarc.Text;
|
||||||
else
|
else
|
||||||
sarc.FullName = Path.Combine(dir, sarc.Text);
|
sarc.FullName = Path.Combine(dir, sarc.Text);
|
||||||
|
|
||||||
|
sarc.FullName = sarc.FullName.Replace(@"\", "/");
|
||||||
|
|
||||||
sarcData.Files.Add(sarc.FullName, sarc.Data);
|
sarcData.Files.Add(sarc.FullName, sarc.Data);
|
||||||
}
|
}
|
||||||
public static void ReplaceNode(TreeNode node, TreeNode replaceNode, TreeNode NewNode)
|
public static void ReplaceNode(TreeNode node, TreeNode replaceNode, TreeNode NewNode)
|
||||||
|
@ -909,6 +909,14 @@ namespace Bfres.Structs
|
|||||||
else
|
else
|
||||||
return Vector3.TransformNormal(position, trans);
|
return Vector3.TransformNormal(position, trans);
|
||||||
}
|
}
|
||||||
|
public static Vector3 transform(Vector3 input, Matrix4 matrix)
|
||||||
|
{
|
||||||
|
Vector3 output = new Vector3();
|
||||||
|
output.X = input.X * matrix.M11 + input.Y * matrix.M21 + input.Z * matrix.M31 + matrix.M41;
|
||||||
|
output.Y = input.X * matrix.M12 + input.Y * matrix.M22 + input.Z * matrix.M32 + matrix.M42;
|
||||||
|
output.Z = input.X * matrix.M13 + input.Y * matrix.M23 + input.Z * matrix.M33 + matrix.M43;
|
||||||
|
return output;
|
||||||
|
}
|
||||||
public void SaveVertexBuffer()
|
public void SaveVertexBuffer()
|
||||||
{
|
{
|
||||||
if (IsWiiU)
|
if (IsWiiU)
|
||||||
|
@ -186,7 +186,6 @@ namespace FirstPlugin
|
|||||||
else
|
else
|
||||||
GL.Color4(Color.OrangeRed);
|
GL.Color4(Color.OrangeRed);
|
||||||
|
|
||||||
|
|
||||||
foreach (FSHP.BoundingBox box in m.boundingBoxes)
|
foreach (FSHP.BoundingBox box in m.boundingBoxes)
|
||||||
{
|
{
|
||||||
RenderTools.DrawRectangularPrism(box.Center, box.Extend.X, box.Extend.Y, box.Extend.Z, true);
|
RenderTools.DrawRectangularPrism(box.Center, box.Extend.X, box.Extend.Y, box.Extend.Z, true);
|
||||||
@ -602,7 +601,13 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
if (m.Checked && mdl.Skeleton.bones[m.BoneIndex].Visible)
|
if (m.Checked && mdl.Skeleton.bones[m.BoneIndex].Visible)
|
||||||
{
|
{
|
||||||
if ((m.IsSelected))
|
shader.SetVector3("materialSelectColor", new Vector3(0));
|
||||||
|
if (m.GetMaterial().IsSelected)
|
||||||
|
{
|
||||||
|
shader.SetVector3("materialSelectColor", ColorUtility.ToVector3(Color.FromArgb(0,163,204)));
|
||||||
|
DrawModelSelection(m, shader);
|
||||||
|
}
|
||||||
|
else if ((m.IsSelected))
|
||||||
{
|
{
|
||||||
DrawModelSelection(m, shader);
|
DrawModelSelection(m, shader);
|
||||||
}
|
}
|
||||||
@ -814,7 +819,6 @@ namespace FirstPlugin
|
|||||||
shader.SetVector3("emission_color", new Vector3(1, 1, 1));
|
shader.SetVector3("emission_color", new Vector3(1, 1, 1));
|
||||||
shader.SetVector3("specular_color", new Vector3(1, 1, 1));
|
shader.SetVector3("specular_color", new Vector3(1, 1, 1));
|
||||||
|
|
||||||
|
|
||||||
shader.SetFloat("fuv1_mtx", 0);
|
shader.SetFloat("fuv1_mtx", 0);
|
||||||
|
|
||||||
//SRT
|
//SRT
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -129,6 +129,8 @@ namespace Switch_Toolbox.Library.Forms
|
|||||||
return true;
|
return true;
|
||||||
if (obj is STBone)
|
if (obj is STBone)
|
||||||
return true;
|
return true;
|
||||||
|
if (obj is STGenericMaterial)
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,8 @@ uniform vec4 pickingColor;
|
|||||||
|
|
||||||
uniform int isTransparent;
|
uniform int isTransparent;
|
||||||
|
|
||||||
|
uniform vec3 materialSelectColor;
|
||||||
|
|
||||||
// Shader Params
|
// Shader Params
|
||||||
uniform float normal_map_weight;
|
uniform float normal_map_weight;
|
||||||
uniform float ao_density;
|
uniform float ao_density;
|
||||||
@ -260,6 +262,8 @@ void main()
|
|||||||
|
|
||||||
fragColor *= min(vec4(albedo_tex_color, 1), vec4(1));
|
fragColor *= min(vec4(albedo_tex_color, 1), vec4(1));
|
||||||
|
|
||||||
|
fragColor.rgb += materialSelectColor * 0.5f;
|
||||||
|
|
||||||
// Toggles rendering of individual color channels for all render modes.
|
// Toggles rendering of individual color channels for all render modes.
|
||||||
fragColor.rgb *= vec3(renderR, renderG, renderB);
|
fragColor.rgb *= vec3(renderR, renderG, renderB);
|
||||||
if (renderR == 1 && renderG == 0 && renderB == 0)
|
if (renderR == 1 && renderG == 0 && renderB == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user