mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-16 09:38:05 +00:00
Another viewport fix
This commit is contained in:
parent
7f272c37b9
commit
38e4cbad6a
7 changed files with 21 additions and 21 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -399,6 +399,24 @@ namespace FirstPlugin
|
|||
return;
|
||||
}
|
||||
|
||||
var toolstrips = new List<ToolStripMenuItem>();
|
||||
var menu = new ToolStripMenuItem("Animation Loader", null, AnimLoader);
|
||||
|
||||
toolstrips.Add(menu);
|
||||
|
||||
if (drawables.Count <= 0)
|
||||
{
|
||||
//Add drawables
|
||||
drawables.Add(BFRESRender);
|
||||
|
||||
for (int m = 0; m < BFRESRender.models.Count; m++)
|
||||
drawables.Add(BFRESRender.models[m].Skeleton);
|
||||
}
|
||||
|
||||
if (Runtime.UseOpenGL)
|
||||
bfresEditor.LoadViewport(drawables, toolstrips);
|
||||
|
||||
|
||||
bool IsSimpleEditor = PluginRuntime.UseSimpleBfresEditor;
|
||||
|
||||
if (IsSimpleEditor)
|
||||
|
@ -487,27 +505,7 @@ namespace FirstPlugin
|
|||
}
|
||||
else
|
||||
{
|
||||
var toolstrips = new List<ToolStripMenuItem>();
|
||||
var menu = new ToolStripMenuItem("Animation Loader", null, AnimLoader);
|
||||
|
||||
toolstrips.Add(menu);
|
||||
|
||||
bool IsLoaded = drawables.Count != 0;
|
||||
|
||||
bfresEditor.IsLoaded = IsLoaded;
|
||||
|
||||
if (drawables.Count <= 0)
|
||||
{
|
||||
//Add drawables
|
||||
drawables.Add(BFRESRender);
|
||||
|
||||
for (int m = 0; m < BFRESRender.models.Count; m++)
|
||||
drawables.Add(BFRESRender.models[m].Skeleton);
|
||||
}
|
||||
|
||||
if (Runtime.UseOpenGL)
|
||||
bfresEditor.LoadViewport(drawables, toolstrips);
|
||||
|
||||
|
||||
if (SelectedSection is BFRES)
|
||||
{
|
||||
STPropertyGrid editor = (STPropertyGrid)bfresEditor.GetActiveEditor(typeof(STPropertyGrid));
|
||||
|
|
|
@ -213,6 +213,8 @@ namespace FirstPlugin.Forms
|
|||
if (IsLoaded || Drawables == null || !Runtime.UseOpenGL || !Runtime.DisplayViewport)
|
||||
return;
|
||||
|
||||
Console.WriteLine("drawables count " + Drawables.Count);
|
||||
|
||||
foreach (var draw in Drawables)
|
||||
{
|
||||
if (!viewport.scene.staticObjects.Contains(draw) &&
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue