A few fixes to archives
This commit is contained in:
parent
28cc63a95c
commit
f6fdae96f6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -191,46 +191,46 @@ namespace Switch_Toolbox.Library
|
||||
{
|
||||
string line = dae.ReadLine();
|
||||
|
||||
/* if (line == " <library_visual_scenes>")
|
||||
{
|
||||
AddControllerLibrary(outScene, test);
|
||||
test.WriteLine(line);
|
||||
test.Flush();
|
||||
}*/
|
||||
if (line.Contains("<node"))
|
||||
if (line == " <library_visual_scenes>")
|
||||
{
|
||||
AddControllerLibrary(outScene, test);
|
||||
test.WriteLine(line);
|
||||
test.Flush();
|
||||
|
||||
/* string[] testLn = line.Split('\"');
|
||||
string name = testLn[3];
|
||||
|
||||
string jointLine = line.Replace(">", $" sid=\"{ name }\" type=\"JOINT\">");
|
||||
test.WriteLine(jointLine);
|
||||
test.Flush();*/
|
||||
}
|
||||
/* else if (line.Contains("</visual_scene>"))
|
||||
else if (line.Contains("<node"))
|
||||
{
|
||||
// test.WriteLine(line);
|
||||
// test.Flush();
|
||||
|
||||
string[] testLn = line.Split('\"');
|
||||
string name = testLn[3];
|
||||
|
||||
string jointLine = line.Replace(">", $" sid=\"{ name }\" type=\"JOINT\">");
|
||||
test.WriteLine(jointLine);
|
||||
test.Flush();
|
||||
}
|
||||
else if (line.Contains("</visual_scene>"))
|
||||
{
|
||||
foreach (Mesh mesh in outScene.Meshes)
|
||||
{
|
||||
foreach (Mesh mesh in outScene.Meshes)
|
||||
{
|
||||
test.WriteLine($" <node id=\"{ mesh.Name }\" name=\"{ mesh.Name }\" type=\"NODE\">");
|
||||
test.WriteLine($" <node id=\"{ mesh.Name }\" name=\"{ mesh.Name }\" type=\"NODE\">");
|
||||
|
||||
test.WriteLine($" <instance_controller url=\"#{ mesh.Name }-skin\">");
|
||||
test.WriteLine(" <skeleton>#skeleton_root</skeleton>");
|
||||
test.WriteLine(" <bind_material>");
|
||||
test.WriteLine(" <technique_common>");
|
||||
test.WriteLine($" <instance_material symbol=\"theresonlyone\" target=\"#m{ mesh.MaterialIndex }mat\" />");
|
||||
test.WriteLine(" </technique_common>");
|
||||
test.WriteLine(" </bind_material>");
|
||||
test.WriteLine(" </instance_controller>");
|
||||
test.WriteLine($" <instance_controller url=\"#{ mesh.Name }-skin\">");
|
||||
test.WriteLine(" <skeleton>#skeleton_root</skeleton>");
|
||||
test.WriteLine(" <bind_material>");
|
||||
test.WriteLine(" <technique_common>");
|
||||
test.WriteLine($" <instance_material symbol=\"theresonlyone\" target=\"#m{ mesh.MaterialIndex }mat\" />");
|
||||
test.WriteLine(" </technique_common>");
|
||||
test.WriteLine(" </bind_material>");
|
||||
test.WriteLine(" </instance_controller>");
|
||||
|
||||
test.WriteLine(" </node>");
|
||||
test.Flush();
|
||||
}
|
||||
|
||||
test.WriteLine(line);
|
||||
test.WriteLine(" </node>");
|
||||
test.Flush();
|
||||
}*/
|
||||
}
|
||||
|
||||
test.WriteLine(line);
|
||||
test.Flush();
|
||||
}
|
||||
else if (line.Contains("<geometry"))
|
||||
{
|
||||
string RealMeshName = Model.Nodes[0].Nodes[geomIndex].Text;
|
||||
|
@ -127,6 +127,8 @@ namespace Switch_Toolbox.Library.Forms
|
||||
|
||||
if (treeViewCustom1.Nodes[0] is IFileFormat)
|
||||
return (IFileFormat)treeViewCustom1.Nodes[0];
|
||||
if (treeViewCustom1.Nodes[0] is ArchiveBase)
|
||||
return (IFileFormat)((ArchiveBase)treeViewCustom1.Nodes[0]).ArchiveFile;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -523,6 +523,9 @@ namespace Switch_Toolbox.Library
|
||||
int index = node.Nodes.IndexOf(replaceNode);
|
||||
node.Nodes.RemoveAt(index);
|
||||
node.Nodes.Insert(index, NewNode);
|
||||
|
||||
NewNode.ImageKey = replaceNode.ImageKey;
|
||||
NewNode.SelectedImageKey = replaceNode.SelectedImageKey;
|
||||
}
|
||||
|
||||
private void RenameAction(object sender, EventArgs args)
|
||||
|
@ -48,10 +48,10 @@ namespace Switch_Toolbox.Library.Rendering
|
||||
GL.Enable(EnableCap.DepthTest);
|
||||
GL.DepthFunc(DepthFunction.Lequal);
|
||||
|
||||
GL.Enable(EnableCap.LineSmooth);
|
||||
// GL.Enable(EnableCap.LineSmooth);
|
||||
|
||||
GL.Enable(EnableCap.StencilTest);
|
||||
GL.StencilOp(StencilOp.Keep, StencilOp.Keep, StencilOp.Replace);
|
||||
// GL.Enable(EnableCap.StencilTest);
|
||||
// GL.StencilOp(StencilOp.Keep, StencilOp.Keep, StencilOp.Replace);
|
||||
|
||||
|
||||
control.CurrentShader = defaultShaderProgram;
|
||||
@ -71,6 +71,7 @@ namespace Switch_Toolbox.Library.Rendering
|
||||
if (RenderTools.diffusePbr != null)
|
||||
{
|
||||
GL.ActiveTexture(TextureUnit.Texture0);
|
||||
|
||||
RenderTools.diffusePbr.Bind();
|
||||
}
|
||||
}
|
||||
|
@ -400,9 +400,17 @@ namespace Toolbox
|
||||
{
|
||||
foreach (var node in editor.GetNodes())
|
||||
{
|
||||
if (node is IFileFormat)
|
||||
IFileFormat format = null;
|
||||
if (node is ArchiveBase)
|
||||
{
|
||||
format = (IFileFormat)((ArchiveBase)node).ArchiveFile;
|
||||
}
|
||||
else if (node is IFileFormat)
|
||||
{
|
||||
format = ((IFileFormat)node);
|
||||
}
|
||||
if (format != null)
|
||||
{
|
||||
var format = ((IFileFormat)node);
|
||||
|
||||
if (!format.CanSave)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user