1
0
mirror of synced 2024-11-12 10:10:50 +01:00

Another viewport fix

This commit is contained in:
KillzXGaming 2019-04-25 21:25:55 -04:00
parent 7f272c37b9
commit 38e4cbad6a
7 changed files with 21 additions and 21 deletions

Binary file not shown.

View File

@ -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));

View File

@ -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) &&