diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 7edc33fd..c80a2f43 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs b/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs index 564b56b2..47b00b04 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs @@ -56,7 +56,7 @@ namespace FirstPlugin.Forms return null; var editor = LibraryGUI.Instance.GetObjectEditor(); - return editor.GetViewport(); + return editor.GetViewport(); } set { @@ -69,13 +69,13 @@ namespace FirstPlugin.Forms public BfresEditor(bool HasModels) { - InitializeComponent(); + InitializeComponent(); STConsole stConsole = STConsole.Instance; stConsole.BorderStyle = BorderStyle.None; stConsole.Dock = DockStyle.Fill; tabPage4.Controls.Add(stConsole); - + animationPanel = new AnimationPanel(); animationPanel.CurrentAnimation = null; animationPanel.Dock = DockStyle.Fill; @@ -157,11 +157,11 @@ namespace FirstPlugin.Forms public void AddDrawable(AbstractGlDrawable draw) { - if (!Runtime.UseViewport) - return; - Drawables.Add(draw); + if (!Runtime.UseViewport || !Runtime.DisplayViewport) + return; + if (!viewport.scene.staticObjects.Contains(draw) && !viewport.scene.objects.Contains(draw)) { @@ -171,10 +171,11 @@ namespace FirstPlugin.Forms public void RemoveDrawable(AbstractGlDrawable draw) { - if (!Runtime.UseViewport) + Drawables.Remove(draw); + + if (!Runtime.UseViewport || !Runtime.DisplayViewport) return; - Drawables.Remove(draw); viewport.RemoveDrawable(draw); } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 4cbe6efa..fd6805c2 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ