From 2a29b8e8078d5f8ceac2e7200ec2631388fba305 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 14 Sep 2024 23:25:59 +0200 Subject: [PATCH] Fix regression in function surfaces --- .../Assets/AnimationGraphFunctionWindow.cs | 1 + .../Windows/Assets/MaterialFunctionWindow.cs | 1 + .../Assets/ParticleEmitterFunctionWindow.cs | 1 + .../Assets/VisjectFunctionSurfaceWindow.cs | 23 ++++++++++++------- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Source/Editor/Windows/Assets/AnimationGraphFunctionWindow.cs b/Source/Editor/Windows/Assets/AnimationGraphFunctionWindow.cs index 36acb0a57..5693e7b3b 100644 --- a/Source/Editor/Windows/Assets/AnimationGraphFunctionWindow.cs +++ b/Source/Editor/Windows/Assets/AnimationGraphFunctionWindow.cs @@ -32,6 +32,7 @@ namespace FlaxEditor.Windows.Assets _surface.ContextChanged += OnSurfaceContextChanged; // Toolstrip + SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton); _toolstrip.AddSeparator(); _toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/animation/anim-graph/index.html")).LinkTooltip("See documentation to learn more"); diff --git a/Source/Editor/Windows/Assets/MaterialFunctionWindow.cs b/Source/Editor/Windows/Assets/MaterialFunctionWindow.cs index 076d2a863..fcafeadbc 100644 --- a/Source/Editor/Windows/Assets/MaterialFunctionWindow.cs +++ b/Source/Editor/Windows/Assets/MaterialFunctionWindow.cs @@ -28,6 +28,7 @@ namespace FlaxEditor.Windows.Assets }; // Toolstrip + SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton); _toolstrip.AddSeparator(); _toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/graphics/materials/index.html")).LinkTooltip("See documentation to learn more"); } diff --git a/Source/Editor/Windows/Assets/ParticleEmitterFunctionWindow.cs b/Source/Editor/Windows/Assets/ParticleEmitterFunctionWindow.cs index e3993d445..c7869ff2c 100644 --- a/Source/Editor/Windows/Assets/ParticleEmitterFunctionWindow.cs +++ b/Source/Editor/Windows/Assets/ParticleEmitterFunctionWindow.cs @@ -28,6 +28,7 @@ namespace FlaxEditor.Windows.Assets }; // Toolstrip + SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton); _toolstrip.AddSeparator(); _toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/particles/index.html")).LinkTooltip("See documentation to learn more"); } diff --git a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs index 24b3e3f9b..edfe16f86 100644 --- a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs +++ b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs @@ -27,9 +27,21 @@ namespace FlaxEditor.Windows.Assets /// protected readonly Panel _panel; - private readonly ToolStripButton _saveButton; - private readonly ToolStripButton _undoButton; - private readonly ToolStripButton _redoButton; + /// + /// Save button. + /// + protected ToolStripButton _saveButton; + + /// + /// Undo button. + /// + protected ToolStripButton _undoButton; + + /// + /// Redo button. + /// + protected ToolStripButton _redoButton; + private bool _showWholeGraphOnLoad = true; /// @@ -61,17 +73,12 @@ namespace FlaxEditor.Windows.Assets protected VisjectFunctionSurfaceWindow(Editor editor, AssetItem item) : base(editor, item) { - var inputOptions = Editor.Options.Options.Input; - // Undo _undo = new Undo(); _undo.UndoDone += OnUndoRedo; _undo.RedoDone += OnUndoRedo; _undo.ActionDone += OnUndoRedo; - // Toolstrip - SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton); - // Panel _panel = new Panel(ScrollBars.None) {