Browse Source

Use Node Info to set display name

CPKreuz 1 year ago
parent
commit
3b9574d654
34 changed files with 44 additions and 96 deletions
  1. 4 1
      src/PixiEditor.ChangeableDocument/Changeables/Graph/NodeInfoAttribute.cs
  2. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Animable/TimeNode.cs
  3. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineChannelsNode.cs
  4. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineColorNode.cs
  5. 1 4
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineVecD.cs
  6. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineVecI.cs
  7. 1 4
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateChannelsNode.cs
  8. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateColorNode.cs
  9. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateVecDNode.cs
  10. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateVecINode.cs
  11. 1 2
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/DebugBlendModeNode.cs
  12. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/EllipseNode.cs
  13. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/EmptyImageNode.cs
  14. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Evaluator/ColorEvaluatorLeftNode.cs
  15. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Evaluator/ColorEvaluatorRightNode.cs
  16. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/ApplyFilterNode.cs
  17. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/ColorMatrixFilterNode.cs
  18. 1 2
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/KernelFilterNode.cs
  19. 1 1
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FolderNode.cs
  20. 1 1
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageLayerNode.cs
  21. 1 2
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageSpaceNode.cs
  22. 1 4
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/LerpColorNode.cs
  23. 1 4
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/MathNode.cs
  24. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/MergeNode.cs
  25. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageLeftNode.cs
  26. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageRightNode.cs
  27. 8 1
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Node.cs
  28. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/NoiseNode.cs
  29. 1 2
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/OutputNode.cs
  30. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/DistributePointsNode.cs
  31. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/RasterizePointsNode.cs
  32. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/RemoveClosePointsNode.cs
  33. 1 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/SampleImageNode.cs
  34. 1 5
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/StructureNode.cs

+ 4 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/NodeInfoAttribute.cs

@@ -4,8 +4,10 @@
 public class NodeInfoAttribute : Attribute
 {
     public string UniqueName { get; }
+    
+    public string DisplayName { get; }
 
-    public NodeInfoAttribute(string uniqueName)
+    public NodeInfoAttribute(string uniqueName, string displayName)
     {
         if (!uniqueName.StartsWith("PixiEditor"))
         {
@@ -13,5 +15,6 @@ public class NodeInfoAttribute : Attribute
         }
         
         UniqueName = uniqueName;
+        DisplayName = displayName;
     }
 }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Animable/TimeNode.cs

@@ -3,11 +3,9 @@ using PixiEditor.DrawingApi.Core;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Animable;
 
-[NodeInfo("Time")]
+[NodeInfo("Time", "TIME_NODE")]
 public class TimeNode : Node
 {
-    public override string DisplayName { get; set; } = "TIME_NODE";
-    
     public OutputProperty<int> ActiveFrame { get; set; }
     public OutputProperty<double> NormalizedTime { get; set; }
 

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineChannelsNode.cs

@@ -6,7 +6,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("CombineChannels")]
+[NodeInfo("CombineChannels", "COMBINE_CHANNELS_NODE")]
 public class CombineChannelsNode : Node
 {
     private readonly Paint _screenPaint = new() { BlendMode = BlendMode.Screen };
@@ -106,7 +106,5 @@ public class CombineChannelsNode : Node
         return final.Size;
     }
 
-    public override string DisplayName { get; set; } = "COMBINE_CHANNELS_NODE";
-
     public override Node CreateCopy() => new CombineChannelsNode();
 }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineColorNode.cs

@@ -5,7 +5,7 @@ using PixiEditor.DrawingApi.Core.ColorsImpl;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("CombineColor")]
+[NodeInfo("CombineColor", "COMBINE_COLOR_NODE")]
 public class CombineColorNode : Node
 {
     public FuncOutputProperty<Color> Color { get; }
@@ -18,8 +18,6 @@ public class CombineColorNode : Node
 
     public FuncInputProperty<double> A { get; }
 
-    public override string DisplayName { get; set; } = "COMBINE_COLOR_NODE";
-
     public CombineColorNode()
     {
         Color = CreateFuncOutput(nameof(Color), "COLOR", GetColor);

+ 1 - 4
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineVecD.cs

@@ -6,7 +6,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("CombineVecD")]
+[NodeInfo("CombineVecD", "COMBINE_VECD_NODE")]
 public class CombineVecD : Node
 {
     public FuncOutputProperty<VecD> Vector { get; }
@@ -15,9 +15,6 @@ public class CombineVecD : Node
     
     public FuncInputProperty<double> Y { get; }
     
-    
-    public override string DisplayName { get; set; } = "COMBINE_VECD_NODE";
-
     public CombineVecD()
     {
         Vector = CreateFuncOutput(nameof(Vector), "VECTOR", GetVector);

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/CombineVecI.cs

@@ -5,7 +5,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("CombineVecI")]
+[NodeInfo("CombineVecI", "COMBINE_VECI_NODE")]
 public class CombineVecI : Node
 {
     public FuncOutputProperty<VecI> Vector { get; }
@@ -14,8 +14,6 @@ public class CombineVecI : Node
     
     public FuncInputProperty<int> Y { get; }
 
-    public override string DisplayName { get; set; } = "COMBINE_VECI_NODE";
-
     public CombineVecI()
     {
         Vector = CreateFuncOutput(nameof(Vector), "VECTOR", GetVector);

+ 1 - 4
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateChannelsNode.cs

@@ -5,7 +5,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("SeparateChannels")]
+[NodeInfo("SeparateChannels", "SEPARATE_CHANNELS_NODE")]
 public class SeparateChannelsNode : Node
 {
     private readonly Paint _paint = new();
@@ -42,9 +42,6 @@ public class SeparateChannelsNode : Node
         Image = CreateInput<Surface>(nameof(Image), "IMAGE", null);
         Grayscale = CreateInput(nameof(Grayscale), "GRAYSCALE", false);
     }
-
-
-    public override string DisplayName { get; set; } = "SEPARATE_CHANNELS_NODE";
     
     protected override Surface? OnExecute(RenderingContext context)
     {

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateColorNode.cs

@@ -4,7 +4,7 @@ using PixiEditor.DrawingApi.Core.ColorsImpl;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("SeparateColor")]
+[NodeInfo("SeparateColor", "SEPARATE_COLOR_NODE")]
 public class SeparateColorNode : Node
 {
     public FuncInputProperty<Color> Color { get; }
@@ -17,8 +17,6 @@ public class SeparateColorNode : Node
     
     public FuncOutputProperty<double> A { get; }
     
-    public override string DisplayName { get; set; } = "SEPARATE_COLOR_NODE";
-
     public SeparateColorNode()
     {
         Color = CreateFuncInput(nameof(Color), "COLOR", new Color());

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateVecDNode.cs

@@ -4,7 +4,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("SeparateVecD")]
+[NodeInfo("SeparateVecD", "SEPARATE_VECD_NODE")]
 public class SeparateVecDNode : Node
 {
     public FuncInputProperty<VecD> Vector { get; }
@@ -13,8 +13,6 @@ public class SeparateVecDNode : Node
     
     public FuncOutputProperty<double> Y { get; }
     
-    public override string DisplayName { get; set; } = "SEPARATE_VECD_NODE";
-
     public SeparateVecDNode()
     {
         X = CreateFuncOutput("X", "X", ctx => Vector.Value(ctx).X);

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CombineSeparate/SeparateVecINode.cs

@@ -4,7 +4,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
 
-[NodeInfo("SeparateVecI")]
+[NodeInfo("SeparateVecI", "SEPARATE_VECI_NODE")]
 public class SeparateVecINode : Node
 {
     public FuncInputProperty<VecI> Vector { get; }
@@ -13,8 +13,6 @@ public class SeparateVecINode : Node
     
     public FuncOutputProperty<int> Y { get; }
     
-    public override string DisplayName { get; set; } = "SEPARATE_VECI_NODE";
-
     public SeparateVecINode()
     {
         X = CreateFuncOutput("X", "X", ctx => Vector.Value(ctx).X);

+ 1 - 2
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/DebugBlendModeNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
 // TODO: Add based on debug mode, not debug build.
-[NodeInfo("DebugBlendMode")]
+[NodeInfo("DebugBlendMode", "Debug Blend Mode")]
 public class DebugBlendModeNode : Node
 {
     private Paint _paint = new();
@@ -20,7 +20,6 @@ public class DebugBlendModeNode : Node
 
     public OutputProperty<Surface> Result { get; }
 
-    public override string DisplayName { get; set; } = "Debug Blend Mode";
     public DebugBlendModeNode()
     {
         Dst = CreateInput<Surface?>(nameof(Dst), "Dst", null);

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/EllipseNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Ellipse")]
+[NodeInfo("Ellipse", "ELLIPSE_NODE")]
 public class EllipseNode : Node
 {
     public InputProperty<VecI> Radius { get; }
@@ -75,7 +75,5 @@ public class EllipseNode : Node
         return targetSurface;
     }
 
-    public override string DisplayName { get; set; } = "ELLIPSE_NODE";
-
     public override Node CreateCopy() => new EllipseNode();
 }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/EmptyImageNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("CreateImage")]
+[NodeInfo("CreateImage", "CREATE_IMAGE_NODE")]
 public class CreateImageNode : Node
 {
     private Paint _paint = new();
@@ -37,7 +37,5 @@ public class CreateImageNode : Node
         return Output.Value;
     }
  
-    public override string DisplayName { get; set; } = "CREATE_IMAGE_NODE";
-
     public override Node CreateCopy() => new CreateImageNode();
 }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Evaluator/ColorEvaluatorLeftNode.cs

@@ -5,12 +5,10 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Evaluator;
 
-[NodeInfo("ColorEvaluatorLeft")]
+[NodeInfo("ColorEvaluatorLeft", "BEGIN_COLOR_EVALUATOR")]
 [PairNode(typeof(ColorEvaluatorRightNode), "ColorEvaluatorZone", true)]
 public class ColorEvaluatorLeftNode : Node
 {
-    public override string DisplayName { get; set; } = "BEGIN_COLOR_EVALUATOR";
-
     public FuncOutputProperty<VecD> Position { get; }
 
     public ColorEvaluatorLeftNode()

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Evaluator/ColorEvaluatorRightNode.cs

@@ -4,12 +4,10 @@ using PixiEditor.DrawingApi.Core.ColorsImpl;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Evaluator;
 
-[NodeInfo("ColorEvaluatorRight")]
+[NodeInfo("ColorEvaluatorRight", "FINISH_COLOR_EVALUATOR")]
 [PairNode(typeof(ColorEvaluatorLeftNode), "ColorEvaluatorZone")]
 public class ColorEvaluatorRightNode : Node
 {
-    public override string DisplayName { get; set; } = "FINISH_COLOR_EVALUATOR";
-    
     public FuncOutputProperty<Color> Output { get; }
 
     public FuncInputProperty<Color> Input { get; }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/ApplyFilterNode.cs

@@ -5,13 +5,11 @@ using PixiEditor.DrawingApi.Core.Surfaces.PaintImpl;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.FilterNodes;
 
-[NodeInfo("ApplyFilter")]
+[NodeInfo("ApplyFilter", "APPLY_FILTER_NODE")]
 public class ApplyFilterNode : Node
 {
     private Paint _paint = new();
     
-    public override string DisplayName { get; set; } = "APPLY_FILTER_NODE";
-    
     public OutputProperty<Surface?> Output { get; }
 
     public InputProperty<Surface?> Input { get; }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/ColorMatrixFilterNode.cs

@@ -3,13 +3,11 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.FilterNodes;
 
-[NodeInfo("ColorMatrixFilter")]
+[NodeInfo("ColorMatrixFilter", "COLOR_MATRIX_FILTER_NODE")]
 public class ColorMatrixFilterNode : FilterNode
 {
     public InputProperty<ColorMatrix> Matrix { get; }
 
-    public override string DisplayName { get; set; } = "COLOR_MATRIX_FILTER_NODE";
-    
     public ColorMatrixFilterNode()
     {
         Matrix = CreateInput(nameof(Matrix), "MATRIX", ColorMatrix.Identity);

+ 1 - 2
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FilterNodes/KernelFilterNode.cs

@@ -4,7 +4,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.FilterNodes;
 
-[NodeInfo("KernelFilter")]
+[NodeInfo("KernelFilter", "KERNEL_FILTER_NODE")]
 public class KernelFilterNode : FilterNode
 {
     private readonly Paint _paint = new();
@@ -19,7 +19,6 @@ public class KernelFilterNode : FilterNode
 
     public InputProperty<bool> OnAlpha { get; }
 
-    public override string DisplayName { get; set; } = "KERNEL_FILTER_NODE";
     public KernelFilterNode()
     {
         Kernel = CreateInput(nameof(Kernel), "KERNEL", Numerics.Kernel.Identity(3, 3));

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/FolderNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Folder")]
+[NodeInfo("Folder", "FOLDER_NODE")]
 public class FolderNode : StructureNode, IReadOnlyFolderNode
 {
     public InputProperty<Surface?> Content { get; }

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageLayerNode.cs

@@ -10,7 +10,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("ImageLayer")]
+[NodeInfo("ImageLayer", "IMAGE_LAYER_NODE")]
 public class ImageLayerNode : LayerNode, IReadOnlyImageNode
 {
     public const string ImageFramesKey = "Frames";

+ 1 - 2
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageSpaceNode.cs

@@ -6,14 +6,13 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("ImageSpace")]
+[NodeInfo("ImageSpace", "IMAGE_SPACE_NODE")]
 public class ImageSpaceNode : Node
 {
     public FuncOutputProperty<VecD> SpacePosition { get; }
     
     public FuncOutputProperty<VecI> Size { get; }
 
-    public override string DisplayName { get; set; } = "IMAGE_SPACE_NODE";
     public ImageSpaceNode()
     {
         SpacePosition = CreateFuncOutput(nameof(SpacePosition), "UV", ctx => ctx.Position);

+ 1 - 4
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/LerpColorNode.cs

@@ -6,7 +6,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Lerp")]
+[NodeInfo("Lerp", "LERP_NODE")]
 public class LerpColorNode : Node // TODO: ILerpable as inputs? 
 {
     public FuncOutputProperty<Color> Result { get; } 
@@ -14,9 +14,6 @@ public class LerpColorNode : Node // TODO: ILerpable as inputs?
     public FuncInputProperty<Color> To { get; }
     public FuncInputProperty<double> Time { get; }
     
-    public override string DisplayName { get; set; } = "LERP_NODE";
-    
-    
     public LerpColorNode()
     {
         Result = CreateFuncOutput("Result", "RESULT", Lerp);

+ 1 - 4
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/MathNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.DrawingApi.Core;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Math")]
+[NodeInfo("Math", "MATH_NODE")]
 public class MathNode : Node
 {
     public FuncOutputProperty<double> Result { get; }
@@ -20,9 +20,6 @@ public class MathNode : Node
     
     public FuncInputProperty<double> Y { get; }
     
-    
-    public override string DisplayName { get; set; } = "MATH_NODE";
-    
     public MathNode()
     {
         Result = CreateFuncOutput(nameof(Result), "RESULT", Calculate);

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/MergeNode.cs

@@ -8,7 +8,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Merge")]
+[NodeInfo("Merge", "MERGE_NODE")]
 public class MergeNode : Node, IBackgroundInput
 {
     private Paint _paint = new();
@@ -26,8 +26,6 @@ public class MergeNode : Node, IBackgroundInput
         Output = CreateOutput<Surface?>("Output", "OUTPUT", null);
     }
 
-    public override string DisplayName { get; set; } = "MERGE_NODE";
-
     public override Node CreateCopy()
     {
         return new MergeNode();

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageLeftNode.cs

@@ -10,7 +10,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("ModifyImageLeft")]
+[NodeInfo("ModifyImageLeft", "MODIFY_IMAGE_LEFT_NODE")]
 [PairNode(typeof(ModifyImageRightNode), "ModifyImageZone", true)]
 public class ModifyImageLeftNode : Node
 {
@@ -20,8 +20,6 @@ public class ModifyImageLeftNode : Node
     
     public FuncOutputProperty<Color> Color { get; }
 
-    public override string DisplayName { get; set; } = "MODIFY_IMAGE_LEFT_NODE";
-    
     private ConcurrentDictionary<RenderingContext, Pixmap> pixmapCache = new();
 
     public ModifyImageLeftNode()

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageRightNode.cs

@@ -11,7 +11,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("ModifyImageRight")]
+[NodeInfo("ModifyImageRight", "MODIFY_IMAGE_RIGHT_NODE")]
 [PairNode(typeof(ModifyImageLeftNode), "ModifyImageZone")]
 public class ModifyImageRightNode : Node, IPairNodeEnd
 {
@@ -24,8 +24,6 @@ public class ModifyImageRightNode : Node, IPairNodeEnd
 
     public OutputProperty<Surface> Output { get; }
 
-    public override string DisplayName { get; set; } = "MODIFY_IMAGE_RIGHT_NODE";
-
     private Surface surface;
 
     public ModifyImageRightNode()

+ 8 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Node.cs

@@ -13,6 +13,7 @@ namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 [DebuggerDisplay("Type = {GetType().Name}")]
 public abstract class Node : IReadOnlyNode, IDisposable
 {
+    private string displayName;
     private List<InputProperty> inputs = new();
     private List<OutputProperty> outputs = new();
     protected List<KeyFrameData> keyFrames = new();
@@ -44,13 +45,19 @@ public abstract class Node : IReadOnlyNode, IDisposable
 
     protected Node()
     {
+        displayName = GetType().GetCustomAttribute<NodeInfoAttribute>().DisplayName;
     }
 
     IReadOnlyList<IInputProperty> IReadOnlyNode.InputProperties => inputs;
     IReadOnlyList<IOutputProperty> IReadOnlyNode.OutputProperties => outputs;
     IReadOnlyList<IReadOnlyKeyFrameData> IReadOnlyNode.KeyFrames => keyFrames;
     public VecD Position { get; set; }
-    public abstract string DisplayName { get; set; }
+
+    public virtual string DisplayName
+    {
+        get => displayName;
+        set => displayName = value;
+    }
 
     private KeyFrameTime _lastFrameTime = new KeyFrameTime(-1, 0);
     private ChunkResolution? _lastResolution;

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/NoiseNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Noise")]
+[NodeInfo("Noise", "NOISE_NODE")]
 public class NoiseNode : Node
 {
     private double previousScale = double.NaN;
@@ -106,8 +106,6 @@ public class NoiseNode : Node
         return shader;
     }
 
-    public override string DisplayName { get; set; } = "NOISE_NODE";
-
     public override Node CreateCopy() => new NoiseNode();
 }
 

+ 1 - 2
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/OutputNode.cs

@@ -5,12 +5,11 @@ using PixiEditor.DrawingApi.Core;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("Output")]
+[NodeInfo("Output", "OUTPUT_NODE")]
 public class OutputNode : Node, IBackgroundInput
 {
     public const string InputPropertyName = "Background";
 
-    public override string DisplayName { get; set; } = "OUTPUT_NODE";
     public InputProperty<Surface?> Input { get; } 
     public OutputNode()
     {

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/DistributePointsNode.cs

@@ -5,11 +5,9 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Points;
 
-[NodeInfo("DistributePoints")]
+[NodeInfo("DistributePoints", "DISTRIBUTE_POINTS")]
 public class DistributePointsNode : Node
 {
-    public override string DisplayName { get; set; } = "DISTRIBUTE_POINTS";
-
     public OutputProperty<PointList> Points { get; }
 
     public InputProperty<int> MaxPointCount { get; }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/RasterizePointsNode.cs

@@ -7,13 +7,11 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Points;
 
-[NodeInfo("RasterizePoints")]
+[NodeInfo("RasterizePoints", "RASTERIZE_POINTS")]
 public class RasterizePointsNode : Node
 {
     private Paint _paint = new();
 
-    public override string DisplayName { get; set; } = "RASTERIZE_POINTS";
-    
     public OutputProperty<Surface> Image { get; }
 
     public InputProperty<PointList> Points { get; }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Points/RemoveClosePointsNode.cs

@@ -4,11 +4,9 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Points;
 
-[NodeInfo("RemoveClosePoints")]
+[NodeInfo("RemoveClosePoints", "REMOVE_CLOSE_POINTS")]
 public class RemoveClosePointsNode : Node
 {
-    public override string DisplayName { get; set; } = "REMOVE_CLOSE_POINTS";
-    
     public OutputProperty<PointList> Output { get; }
     
     public InputProperty<PointList> Input { get; }

+ 1 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/SampleImageNode.cs

@@ -7,7 +7,7 @@ using PixiEditor.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 
-[NodeInfo("SampleImage")]
+[NodeInfo("SampleImage", "SAMPLE_IMAGE")]
 public class SampleImageNode : Node
 {
     private Pixmap? pixmap;
@@ -18,8 +18,6 @@ public class SampleImageNode : Node
 
     public FuncOutputProperty<Color> Color { get; }
 
-    public override string DisplayName { get; set; } = "SAMPLE_IMAGE";
-
     public SampleImageNode()
     {
         Image = CreateInput<Surface>(nameof(Surface), "IMAGE", null);

+ 1 - 5
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/StructureNode.cs

@@ -28,11 +28,7 @@ public abstract class StructureNode : Node, IReadOnlyStructureNode, IBackgroundI
 
     public string MemberName { get; set; } = "New Element"; // would be good to add localization here, it is set if node is created via node graph
     
-    public override string DisplayName
-    {
-        get => MemberName;
-        set => MemberName = value;
-    }
+    public string DisplayName => MemberName;
 
     protected Dictionary<(ChunkResolution, int), Surface> workingSurfaces = new Dictionary<(ChunkResolution, int), Surface>();
     private Paint maskPaint = new Paint() { BlendMode = DrawingApi.Core.Surfaces.BlendMode.DstIn };