1
0
mirror of synced 2025-01-19 09:17:30 +01:00

Fix skeleton not hiding when drawables switched

This commit is contained in:
KillzXGaming 2019-08-02 17:39:00 -04:00
parent 9308bfd565
commit 95a50d03ec
5 changed files with 10 additions and 4 deletions

Binary file not shown.

View File

@ -522,9 +522,9 @@ namespace Toolbox.Library
for (int a = 0; a < DrawableContainers[i].Drawables.Count; a++)
{
if (i == index)
DrawableContainers[i].Drawables[a].Visible = true;
SetDrawableVisibilty(DrawableContainers[i].Drawables[a], true);
else
DrawableContainers[i].Drawables[a].Visible = false;
SetDrawableVisibilty(DrawableContainers[i].Drawables[a], false);
}
}
}
@ -532,6 +532,14 @@ namespace Toolbox.Library
UpdateViewport();
}
private void SetDrawableVisibilty(AbstractGlDrawable drawable, bool show)
{
if (drawable is EditableObject)
((EditableObject)drawable).Visible = show;
else
((AbstractGlDrawable)drawable).Visible = show;
}
private void DrawAllActive()
{
for (int i = 0; i < DrawableContainers.Count; i++)

View File

@ -188,8 +188,6 @@ namespace Toolbox.Library
if (!Runtime.OpenTKInitialized || !Runtime.renderBones || !Visible)
return;
Console.WriteLine($"SKEL Visible " + Visible);
SF.Shader shader = OpenTKSharedResources.shaders["BONE"];
shader.UseProgram();