From d88306fc1cf4e66a83714120bb98646b3b224742 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 4 Oct 2021 12:23:54 +0200 Subject: [PATCH] Hide various Editor types from Visual Scripting --- Source/Editor/Content/IFileEntryAction.cs | 3 +++ .../CustomEditors/Elements/Container/TreeNodeElement.cs | 2 ++ Source/Editor/CustomEditors/Elements/IFloatValueEditor.cs | 1 + Source/Editor/CustomEditors/Elements/IIntegerValueEditor.cs | 3 +++ Source/Editor/GUI/IKeyframesEditor.cs | 1 + Source/Editor/GUI/Timeline/Tracks/ObjectTrack.cs | 1 + Source/Editor/Surface/Archetypes/Animation.StateMachine.cs | 4 ++-- Source/Editor/Surface/Archetypes/Material.cs | 4 ++-- Source/Editor/Surface/Archetypes/Particles.cs | 4 ++-- Source/Editor/Windows/Assets/MaterialWindow.cs | 2 +- Source/Editor/Windows/OutputLogWindow.cs | 2 +- 11 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Source/Editor/Content/IFileEntryAction.cs b/Source/Editor/Content/IFileEntryAction.cs index 42d0ab482..43c41f47b 100644 --- a/Source/Editor/Content/IFileEntryAction.cs +++ b/Source/Editor/Content/IFileEntryAction.cs @@ -1,10 +1,13 @@ // Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. +using FlaxEngine; + namespace FlaxEditor.Content { /// /// File entry action (import or create). /// + [HideInEditor] public interface IFileEntryAction { /// diff --git a/Source/Editor/CustomEditors/Elements/Container/TreeNodeElement.cs b/Source/Editor/CustomEditors/Elements/Container/TreeNodeElement.cs index 03268345d..71b4732b3 100644 --- a/Source/Editor/CustomEditors/Elements/Container/TreeNodeElement.cs +++ b/Source/Editor/CustomEditors/Elements/Container/TreeNodeElement.cs @@ -1,6 +1,7 @@ // Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. using FlaxEditor.GUI.Tree; +using FlaxEngine; using FlaxEngine.GUI; namespace FlaxEditor.CustomEditors.Elements @@ -8,6 +9,7 @@ namespace FlaxEditor.CustomEditors.Elements /// /// Tree nodes elements. /// + [HideInEditor] public interface ITreeElement { /// diff --git a/Source/Editor/CustomEditors/Elements/IFloatValueEditor.cs b/Source/Editor/CustomEditors/Elements/IFloatValueEditor.cs index 59c0b7a8c..9c314b88e 100644 --- a/Source/Editor/CustomEditors/Elements/IFloatValueEditor.cs +++ b/Source/Editor/CustomEditors/Elements/IFloatValueEditor.cs @@ -7,6 +7,7 @@ namespace FlaxEditor.CustomEditors.Elements /// /// The floating point value editor element. /// + [HideInEditor] public interface IFloatValueEditor { /// diff --git a/Source/Editor/CustomEditors/Elements/IIntegerValueEditor.cs b/Source/Editor/CustomEditors/Elements/IIntegerValueEditor.cs index d8f03aafe..60d8885f9 100644 --- a/Source/Editor/CustomEditors/Elements/IIntegerValueEditor.cs +++ b/Source/Editor/CustomEditors/Elements/IIntegerValueEditor.cs @@ -1,10 +1,13 @@ // Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. +using FlaxEngine; + namespace FlaxEditor.CustomEditors.Elements { /// /// The integer value editor element. /// + [HideInEditor] public interface IIntegerValueEditor { /// diff --git a/Source/Editor/GUI/IKeyframesEditor.cs b/Source/Editor/GUI/IKeyframesEditor.cs index 7e659ff4c..b9c14bbd8 100644 --- a/Source/Editor/GUI/IKeyframesEditor.cs +++ b/Source/Editor/GUI/IKeyframesEditor.cs @@ -10,6 +10,7 @@ namespace FlaxEditor.GUI /// /// Interface for keyframes/curves editors. /// + [HideInEditor] public interface IKeyframesEditor { /// diff --git a/Source/Editor/GUI/Timeline/Tracks/ObjectTrack.cs b/Source/Editor/GUI/Timeline/Tracks/ObjectTrack.cs index 17eac5a70..53a78ea64 100644 --- a/Source/Editor/GUI/Timeline/Tracks/ObjectTrack.cs +++ b/Source/Editor/GUI/Timeline/Tracks/ObjectTrack.cs @@ -16,6 +16,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks /// /// The base interface for . /// + [HideInEditor] public interface IObjectTrack { /// diff --git a/Source/Editor/Surface/Archetypes/Animation.StateMachine.cs b/Source/Editor/Surface/Archetypes/Animation.StateMachine.cs index 606412610..0b2c6b01d 100644 --- a/Source/Editor/Surface/Archetypes/Animation.StateMachine.cs +++ b/Source/Editor/Surface/Archetypes/Animation.StateMachine.cs @@ -487,7 +487,7 @@ namespace FlaxEditor.Surface.Archetypes /// internal class StateMachineState : SurfaceNode, ISurfaceContext, IConnectionInstigator { - public class AddRemoveTransitionAction : IUndoAction + internal class AddRemoveTransitionAction : IUndoAction { private readonly bool _isAdd; private VisjectSurface _surface; @@ -1400,7 +1400,7 @@ namespace FlaxEditor.Surface.Archetypes /// It does not store GC objects references to make it more lightweight. Transition rule bytes data is stores in a separate way. /// [StructLayout(LayoutKind.Sequential, Pack = 1, Size = 32)] - public struct Data + internal struct Data { /// /// The transition flag types. diff --git a/Source/Editor/Surface/Archetypes/Material.cs b/Source/Editor/Surface/Archetypes/Material.cs index 38ce19df6..991f7e9d9 100644 --- a/Source/Editor/Surface/Archetypes/Material.cs +++ b/Source/Editor/Surface/Archetypes/Material.cs @@ -18,12 +18,12 @@ namespace FlaxEditor.Surface.Archetypes /// Customized for main material node. /// /// - public class SurfaceNodeMaterial : SurfaceNode + internal class SurfaceNodeMaterial : SurfaceNode { /// /// Material node input boxes (each enum item value maps to box ID). /// - public enum MaterialNodeBoxes + internal enum MaterialNodeBoxes { /// /// The layer input. diff --git a/Source/Editor/Surface/Archetypes/Particles.cs b/Source/Editor/Surface/Archetypes/Particles.cs index f6fd2d003..2866ad22e 100644 --- a/Source/Editor/Surface/Archetypes/Particles.cs +++ b/Source/Editor/Surface/Archetypes/Particles.cs @@ -61,7 +61,7 @@ namespace FlaxEditor.Surface.Archetypes /// The particle emitter modules set header (per context). /// /// - public class ModulesHeader : ContainerControl + internal class ModulesHeader : ContainerControl { private static readonly string[] Names = { @@ -168,7 +168,7 @@ namespace FlaxEditor.Surface.Archetypes /// /// The particle modules sets headers (per context). /// - public readonly ModulesHeader[] Headers = new ModulesHeader[4]; + internal readonly ModulesHeader[] Headers = new ModulesHeader[4]; /// public ParticleEmitterNode(uint id, VisjectSurfaceContext context, NodeArchetype nodeArch, GroupArchetype groupArch) diff --git a/Source/Editor/Windows/Assets/MaterialWindow.cs b/Source/Editor/Windows/Assets/MaterialWindow.cs index 1b28512be..4615a8b02 100644 --- a/Source/Editor/Windows/Assets/MaterialWindow.cs +++ b/Source/Editor/Windows/Assets/MaterialWindow.cs @@ -255,7 +255,7 @@ namespace FlaxEditor.Windows.Assets /// /// Gets or sets the main material node. /// - public Surface.Archetypes.Material.SurfaceNodeMaterial MainNode + internal Surface.Archetypes.Material.SurfaceNodeMaterial MainNode { get { diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index 61d180362..b3c6e8822 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -42,7 +42,7 @@ namespace FlaxEditor.Windows private struct TextBlockTag { - public enum Types + internal enum Types { CodeLocation };