Fix skeleton not hiding when drawables switched
This commit is contained in:
parent
9308bfd565
commit
95a50d03ec
Binary file not shown.
@ -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++)
|
||||
|
@ -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();
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user