public void OnAttach(SBViewportPanel viewportPanel) { viewportPanel.TabPanel.AddTab("Textures", this); Import.Enabled = (TextureBank != null); }
public void OnRemove(SBViewportPanel viewportPanel) { TextureBank = null; PropertyGrid.SelectedObject = null; }
public void OnRemove(SBViewportPanel viewportPanel) { }
public MainForm() { InitializeComponent(); ApplicationSettings.Init(); ApplicationSettings.SkinControl(this); // Editors that are forms ApplicationSettingsEditor = new SBRenderSettingsEditor(); MaterialEditor = new GenericMaterialEditor(); projectTree = new SBProjectTree(); projectTree.Dock = DockStyle.Fill; LeftPane = new SBPopoutPanel(PopoutSide.Left, ">", "<"); LeftPane.Dock = DockStyle.Left; LeftPane.Contents.Add(projectTree); BottomPane = new SBPopoutPanel(PopoutSide.Bottom, "Open Console", "Close Console"); BottomPane.Dock = DockStyle.Bottom; BottomPane.Contents.Add(SBConsole.Console); MenuBar = new SBMenuBar(); { var ts = new SBToolStripMenuItem("File"); { var open = new SBToolStripMenuItem("Open"); { var folder = new SBToolStripMenuItem("Folder"); folder.Click += projectTree.OpenFolder; folder.ShortcutKeys = Keys.O | Keys.Control | Keys.Shift | Keys.Alt; open.DropDownItems.Add(folder); var scene = new SBToolStripMenuItem("Scene"); scene.Click += OpenFile; scene.ShortcutKeys = Keys.O | Keys.Control; open.DropDownItems.Add(scene); } ts.DropDownItems.Add(open); } { var open = new SBToolStripMenuItem("Import"); { var scene = new SBToolStripMenuItem("Model"); scene.Click += ImportToScene; open.DropDownItems.Add(scene); var animimport = new SBToolStripMenuItem("Animation Into Scene"); animimport.Click += ImportAnimationToScene; open.DropDownItems.Add(animimport); var skeletonimport = new SBToolStripMenuItem("Skeleton To Model"); skeletonimport.Click += ImportSkeletonToScene; open.DropDownItems.Add(skeletonimport); } ts.DropDownItems.Add(open); } { var open = new SBToolStripMenuItem("Export"); { var folder = new SBToolStripMenuItem("Scene to File(s)"); folder.Click += SaveScene; open.DropDownItems.Add(folder); var animexport = new SBToolStripMenuItem("Animation to File"); animexport.Click += ExportAnimationToFile; open.DropDownItems.Add(animexport); var skeletonexport = new SBToolStripMenuItem("Skeleton to File"); skeletonexport.Click += ExportSkeletonToFile; open.DropDownItems.Add(skeletonexport); } ts.DropDownItems.Add(open); } { var closeWkspc = new SBToolStripMenuItem("Clear Workspace"); closeWkspc.Click += CloseWorkspace; ts.DropDownItems.Add(closeWkspc); } MenuBar.Items.Add(ts); var view = new SBToolStripMenuItem("View"); { var rsettings = new SBToolStripMenuItem("Application Settings"); rsettings.Click += OpenRenderSettings; view.DropDownItems.Add(rsettings); var meditor = new SBToolStripMenuItem("Material Editor"); meditor.Click += OpenMaterialEditor; view.DropDownItems.Add(meditor); } MenuBar.Items.Add(view); var viewport = new SBToolStripMenuItem("Camera"); { var resetCamera = new SBToolStripMenuItem("Reset Camera Position"); resetCamera.Click += Viewport_ResetCameraPosition; viewport.DropDownItems.Add(resetCamera); var rsettings = new SBToolStripMenuItem("Render Viewport to File"); rsettings.Click += ExportRenderToFile; viewport.DropDownItems.Add(rsettings); } MenuBar.Items.Add(viewport); } MenuBar.Dock = DockStyle.Top; viewportPanel = new SBViewportPanel(); viewportPanel.Dock = DockStyle.Fill; Controls.Add(viewportPanel); Controls.Add(BottomPane); Controls.Add(LeftPane); Controls.Add(MenuBar); FormClosing += MainForm_FormClosing; InitializeImportTypes(); if (ApplicationSettings.LastOpenedPath != "") { projectTree.SetRoot(ApplicationSettings.LastOpenedPath); } OpenTKResources.Init(); }
public void OnAttach(SBViewportPanel viewportPanel) { viewportPanel.TabPanel.AddTab("DOBJs", this); }
public void OnRemove(SBViewportPanel viewportPanel) { viewportPanel.EnableAnimationBar = false; }
public void OnAttach(SBViewportPanel viewportPanel) { viewportPanel.EnableAnimationBar = true; viewportPanel.FrameCount = (int)animation.FrameCount; }
public void OnAttach(SBViewportPanel viewportPanel) { viewportPanel.TabPanel.AddTab("Level Data", this); }
public void OnRemove(SBViewportPanel viewportPanel) { scene = null; materialBlend.Value = 0; materialMode.SelectedValue = UltimateMaterialTransitionMode.Ditto; }