Browse Source

Set node icon in view model attribute

CPKreuz 1 year ago
parent
commit
c66471b002
32 changed files with 34 additions and 79 deletions
  1. 0 42
      src/PixiEditor/Fonts/NodeIcons.cs
  2. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/Animable/TimeNodeViewModel.cs
  3. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineChannelsNodeViewModel.cs
  4. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineColorNodeViewModel.cs
  5. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineVecDNodeViewModel.cs
  6. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineVecINodeViewModel.cs
  7. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateChannelsNodeViewModel.cs
  8. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateColorNodeViewModel.cs
  9. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateVecDNodeViewModel.cs
  10. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateVecINodeViewModel.cs
  11. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/CreateImageNodeViewModel.cs
  12. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/DebugBlendModeNodeViewModel.cs
  13. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/EllipseNodeViewModel.cs
  14. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/ApplyFilterNodeViewModel.cs
  15. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/ColorMatrixFilterNodeViewModel.cs
  16. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/GrayscaleNodeViewModel.cs
  17. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/KernelFilterNodeViewModel.cs
  18. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/FolderNodeViewModel.cs
  19. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/ImageLayerNodeViewModel.cs
  20. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/LerpColorNodeViewModel.cs
  21. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/MathNodeViewModel.cs
  22. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/MergeNodeViewModel.cs
  23. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/ModifyImageLeftNodeViewModel.cs
  24. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/ModifyImageRightNodeViewModel.cs
  25. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/NoiseNodeViewModel.cs
  26. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/OutputNodeViewModel.cs
  27. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/Points/DistributePointsNodeViewModel.cs
  28. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/Points/RasterizePointsNodeViewModel.cs
  29. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/Points/RemoveClosePointsNodeViewModel.cs
  30. 1 1
      src/PixiEditor/ViewModels/Document/Nodes/SampleImageNodeViewModel.cs
  31. 1 6
      src/PixiEditor/ViewModels/Nodes/NodeTypeInfo.cs
  32. 4 2
      src/PixiEditor/ViewModels/Nodes/NodeViewModelAttribute.cs

+ 0 - 42
src/PixiEditor/Fonts/NodeIcons.cs

@@ -1,42 +0,0 @@
-using System.Collections.ObjectModel;
-using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
-using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Animable;
-using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.CombineSeparate;
-using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.FilterNodes;
-using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Points;
-
-namespace PixiEditor.Fonts;
-
-public static class NodeIcons
-{
-    public static ReadOnlyDictionary<Type, string> IconMap { get; } = new ReadOnlyDictionary<Type, string>(
-        new Dictionary<Type, string>
-        {
-            { typeof(TimeNode), "\uE900" },
-            { typeof(FolderNode), "\ue901" },
-            { typeof(CreateImageNode), "\ue902" },
-            { typeof(MergeNode), "\ue903" },
-            { typeof(ModifyImageLeftNode), "\ue904" },
-            { typeof(ImageLayerNode), "\ue905" },
-            { typeof(RasterizePointsNode), "\ue906" },
-            { typeof(SampleImageNode), "\ue907" },
-            { typeof(CombineColorNode), "\ue908" },
-            { typeof(ApplyFilterNode), "\ue909" },
-            { typeof(DistributePointsNode), "\ue90a" },
-            { typeof(LerpColorNode), "\ue90b" },
-            { typeof(NoiseNode), "\ue90c" },
-            { typeof(EllipseNode), "\ue90d" },
-            { typeof(MathNode), "\ue90e" },
-            { typeof(KernelFilterNode), "\ue90f" },
-            { typeof(CombineChannelsNode), "\ue915" },
-            { typeof(ColorMatrixFilterNode), "\ue911" },
-            { typeof(GrayscaleNode), "\ue912" },
-            { typeof(SeparateColorNode), "\ue913" },
-            { typeof(RemoveClosePointsNode), "\ue914" },
-            { typeof(SeparateChannelsNode), "\ue910" },
-            { typeof(CombineVecDNode), "\ue916" },
-            { typeof(CombineVecINode), "\ue917" },
-            { typeof(SeparateVecDNode), "\ue918" },
-            { typeof(SeparateVecINode), "\ue919" }
-        });
-}

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/Animable/TimeNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.Animable;
 namespace PixiEditor.ViewModels.Document.Nodes.Animable;
 
 
-[NodeViewModel("TIME_NODE", "ANIMATION")]
+[NodeViewModel("TIME_NODE", "ANIMATION", "\uE900")]
 internal class TimeNodeViewModel : NodeViewModel<TimeNode>;
 internal class TimeNodeViewModel : NodeViewModel<TimeNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineChannelsNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("COMBINE_CHANNELS_NODE", "IMAGE")]
+[NodeViewModel("COMBINE_CHANNELS_NODE", "IMAGE", "\ue915")]
 internal class CombineChannelsNodeViewModel : NodeViewModel<CombineChannelsNode>;
 internal class CombineChannelsNodeViewModel : NodeViewModel<CombineChannelsNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineColorNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("COMBINE_COLOR_NODE", "COLOR")]
+[NodeViewModel("COMBINE_COLOR_NODE", "COLOR", "\ue908")]
 internal class CombineColorNodeViewModel : NodeViewModel<CombineColorNode>;
 internal class CombineColorNodeViewModel : NodeViewModel<CombineColorNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineVecDNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("COMBINE_VECD_NODE", "NUMBERS")]
+[NodeViewModel("COMBINE_VECD_NODE", "NUMBERS", "\ue916")]
 internal class CombineVecDNodeViewModel : NodeViewModel<CombineVecDNode>;
 internal class CombineVecDNodeViewModel : NodeViewModel<CombineVecDNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/CombineVecINodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("COMBINE_VECI_NODE", "NUMBERS")]
+[NodeViewModel("COMBINE_VECI_NODE", "NUMBERS", "\ue917")]
 internal class CombineVecINodeViewModel : NodeViewModel<CombineVecINode>;
 internal class CombineVecINodeViewModel : NodeViewModel<CombineVecINode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateChannelsNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("SEPARATE_CHANNELS_NODE", "IMAGE")]
+[NodeViewModel("SEPARATE_CHANNELS_NODE", "IMAGE", "\ue910")]
 internal class SeparateChannelsNodeViewModel : NodeViewModel<SeparateChannelsNode>;
 internal class SeparateChannelsNodeViewModel : NodeViewModel<SeparateChannelsNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateColorNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("SEPARATE_COLOR_NODE", "COLOR")]
+[NodeViewModel("SEPARATE_COLOR_NODE", "COLOR", "\ue913")]
 internal class SeparateColorNodeViewModel : NodeViewModel<SeparateColorNode>;
 internal class SeparateColorNodeViewModel : NodeViewModel<SeparateColorNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateVecDNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("SEPARATE_VECD_NODE", "NUMBERS")]
+[NodeViewModel("SEPARATE_VECD_NODE", "NUMBERS", "\ue918")]
 internal class SeparateVecDNodeViewModel : NodeViewModel<SeparateVecDNode>;
 internal class SeparateVecDNodeViewModel : NodeViewModel<SeparateVecDNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CombineSeparate/SeparateVecINodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 namespace PixiEditor.ViewModels.Document.Nodes.CombineSeparate;
 
 
-[NodeViewModel("SEPARATE_VECI_NODE", "NUMBERS")]
+[NodeViewModel("SEPARATE_VECI_NODE", "NUMBERS", "\ue917")]
 internal class SeparateVecINodeViewModel : NodeViewModel<SeparateVecINode>;
 internal class SeparateVecINodeViewModel : NodeViewModel<SeparateVecINode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/CreateImageNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("CREATE_IMAGE_NODE", "IMAGE")]
+[NodeViewModel("CREATE_IMAGE_NODE", "IMAGE", "\ue902")]
 internal class CreateImageNodeViewModel : NodeViewModel<CreateImageNode>;
 internal class CreateImageNodeViewModel : NodeViewModel<CreateImageNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/DebugBlendModeNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("Debug Blend Mode", "")]
+[NodeViewModel("Debug Blend Mode", "", null)]
 internal class DebugBlendModeNodeViewModel : NodeViewModel<DebugBlendModeNode>;
 internal class DebugBlendModeNodeViewModel : NodeViewModel<DebugBlendModeNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/EllipseNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("ELLIPSE_NODE", "SHAPE")]
+[NodeViewModel("ELLIPSE_NODE", "SHAPE", "\ue90d")]
 internal class EllipseNodeViewModel : NodeViewModel<EllipseNode>;
 internal class EllipseNodeViewModel : NodeViewModel<EllipseNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/ApplyFilterNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 
 
-[NodeViewModel("APPLY_FILTER_NODE", "FILTERS")]
+[NodeViewModel("APPLY_FILTER_NODE", "FILTERS", "\ue909")]
 internal class ApplyFilterNodeViewModel : NodeViewModel<ApplyFilterNode>;
 internal class ApplyFilterNodeViewModel : NodeViewModel<ApplyFilterNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/ColorMatrixFilterNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 
 
-[NodeViewModel("COLOR_MATRIX_TRANSFORM_FILTER_NODE", "FILTERS")]
+[NodeViewModel("COLOR_MATRIX_TRANSFORM_FILTER_NODE", "FILTERS", "\ue911")]
 internal class ColorMatrixFilterNodeViewModel : NodeViewModel<ColorMatrixFilterNode>;
 internal class ColorMatrixFilterNodeViewModel : NodeViewModel<ColorMatrixFilterNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/GrayscaleNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 
 
-[NodeViewModel("GRAYSCALE_FILTER_NODE", "FILTERS")]
+[NodeViewModel("GRAYSCALE_FILTER_NODE", "FILTERS", "\ue912")]
 internal class GrayscaleNodeViewModel : NodeViewModel<GrayscaleNode>;
 internal class GrayscaleNodeViewModel : NodeViewModel<GrayscaleNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/FilterNodes/KernelFilterNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 namespace PixiEditor.ViewModels.Document.Nodes.FilterNodes;
 
 
-[NodeViewModel("KERNEL_FILTER_NODE", "FILTERS")]
+[NodeViewModel("KERNEL_FILTER_NODE", "FILTERS", "\ue90f")]
 internal class KernelFilterNodeViewModel : NodeViewModel<KernelFilterNode>;
 internal class KernelFilterNodeViewModel : NodeViewModel<KernelFilterNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/FolderNodeViewModel.cs

@@ -6,7 +6,7 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("FOLDER_NODE", "STRUCTURE")]
+[NodeViewModel("FOLDER_NODE", "STRUCTURE", "\ue901")]
 internal class FolderNodeViewModel : StructureMemberViewModel<FolderNode>, IFolderHandler
 internal class FolderNodeViewModel : StructureMemberViewModel<FolderNode>, IFolderHandler
 {
 {
     public ObservableCollection<IStructureMemberHandler> Children { get; } = new();
     public ObservableCollection<IStructureMemberHandler> Children { get; } = new();

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/ImageLayerNodeViewModel.cs

@@ -5,7 +5,7 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("IMAGE_LAYER_NODE", "STRUCTURE")]
+[NodeViewModel("IMAGE_LAYER_NODE", "STRUCTURE", "\ue905")]
 internal class ImageLayerNodeViewModel : StructureMemberViewModel<ImageLayerNode>, ILayerHandler
 internal class ImageLayerNodeViewModel : StructureMemberViewModel<ImageLayerNode>, ILayerHandler
 {
 {
     bool lockTransparency;
     bool lockTransparency;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/LerpColorNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("LERP_NODE", "NUMBERS")]
+[NodeViewModel("LERP_NODE", "NUMBERS", "\ue90b")]
 internal class LerpColorNodeViewModel : NodeViewModel<LerpColorNode>;
 internal class LerpColorNodeViewModel : NodeViewModel<LerpColorNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/MathNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("MATH_NODE", "NUMBERS")]
+[NodeViewModel("MATH_NODE", "NUMBERS", "\ue90e")]
 internal class MathNodeViewModel : NodeViewModel<MathNode>;
 internal class MathNodeViewModel : NodeViewModel<MathNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/MergeNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("MERGE_NODE", "IMAGE")]
+[NodeViewModel("MERGE_NODE", "IMAGE", "\ue903")]
 internal class MergeNodeViewModel : NodeViewModel<MergeNode>;
 internal class MergeNodeViewModel : NodeViewModel<MergeNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/ModifyImageLeftNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("MODIFY_IMAGE_LEFT_NODE", "IMAGE")]
+[NodeViewModel("MODIFY_IMAGE_LEFT_NODE", "IMAGE", "\ue904")]
 internal class ModifyImageLeftNodeViewModel : NodeViewModel<ModifyImageLeftNode>;
 internal class ModifyImageLeftNodeViewModel : NodeViewModel<ModifyImageLeftNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/ModifyImageRightNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("MODIFY_IMAGE_RIGHT_NODE", "IMAGE")]
+[NodeViewModel("MODIFY_IMAGE_RIGHT_NODE", "IMAGE", null)]
 internal class ModifyImageRightNodeViewModel : NodeViewModel<ModifyImageRightNode>;
 internal class ModifyImageRightNodeViewModel : NodeViewModel<ModifyImageRightNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/NoiseNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("NOISE_NODE", "IMAGE")]
+[NodeViewModel("NOISE_NODE", "IMAGE", "\ue90c")]
 internal class NoiseNodeViewModel : NodeViewModel<NoiseNode>;
 internal class NoiseNodeViewModel : NodeViewModel<NoiseNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/OutputNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("OUTPUT_NODE", "", PickerName = "")]
+[NodeViewModel("OUTPUT_NODE", "", null, PickerName = "")]
 internal class OutputNodeViewModel : NodeViewModel<OutputNode>;
 internal class OutputNodeViewModel : NodeViewModel<OutputNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/Points/DistributePointsNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 
 
-[NodeViewModel("DISTRIBUTE_POINTS", "SHAPE")]
+[NodeViewModel("DISTRIBUTE_POINTS", "SHAPE", "\ue90a")]
 internal class DistributePointsNodeViewModel : NodeViewModel<DistributePointsNode>;
 internal class DistributePointsNodeViewModel : NodeViewModel<DistributePointsNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/Points/RasterizePointsNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 
 
-[NodeViewModel("RASTERIZE_POINTS", "SHAPE")]
+[NodeViewModel("RASTERIZE_POINTS", "SHAPE", "\ue906")]
 internal class RasterizePointsNodeViewModel : NodeViewModel<RasterizePointsNode>;
 internal class RasterizePointsNodeViewModel : NodeViewModel<RasterizePointsNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/Points/RemoveClosePointsNodeViewModel.cs

@@ -3,5 +3,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 namespace PixiEditor.ViewModels.Document.Nodes.Points;
 
 
-[NodeViewModel("REMOVE_CLOSE_POINTS", "SHAPE")]
+[NodeViewModel("REMOVE_CLOSE_POINTS", "SHAPE", "\ue914")]
 internal class RemoveClosePointsNodeViewModel : NodeViewModel<RemoveClosePointsNode>;
 internal class RemoveClosePointsNodeViewModel : NodeViewModel<RemoveClosePointsNode>;

+ 1 - 1
src/PixiEditor/ViewModels/Document/Nodes/SampleImageNodeViewModel.cs

@@ -4,5 +4,5 @@ using PixiEditor.ViewModels.Nodes;
 
 
 namespace PixiEditor.ViewModels.Document.Nodes;
 namespace PixiEditor.ViewModels.Document.Nodes;
 
 
-[NodeViewModel("SAMPLE_IMAGE", "IMAGE")]
+[NodeViewModel("SAMPLE_IMAGE", "IMAGE", "\ue907")]
 internal class SampleImageNodeViewModel : NodeViewModel<SampleImageNode>;
 internal class SampleImageNodeViewModel : NodeViewModel<SampleImageNode>;

+ 1 - 6
src/PixiEditor/ViewModels/Nodes/NodeTypeInfo.cs

@@ -2,7 +2,6 @@
 using PixiEditor.ChangeableDocument.Changeables.Graph;
 using PixiEditor.ChangeableDocument.Changeables.Graph;
 using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 using PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
 using PixiEditor.Extensions.Common.Localization;
 using PixiEditor.Extensions.Common.Localization;
-using PixiEditor.Fonts;
 using PixiEditor.UI.Common.Fonts;
 using PixiEditor.UI.Common.Fonts;
 
 
 namespace PixiEditor.ViewModels.Nodes;
 namespace PixiEditor.ViewModels.Nodes;
@@ -35,11 +34,7 @@ public class NodeTypeInfo
         DisplayName = attribute.DisplayName;
         DisplayName = attribute.DisplayName;
         PickerName = attribute.PickerName;
         PickerName = attribute.PickerName;
         Category = attribute.Category ?? "";
         Category = attribute.Category ?? "";
-
-        if (NodeIcons.IconMap.TryGetValue(NodeType, out var icon))
-        {
-            Icon = icon;
-        }
+        Icon = attribute.Icon;
 
 
         FinalPickerName = (PickerName ?? DisplayName);
         FinalPickerName = (PickerName ?? DisplayName);
     }
     }

+ 4 - 2
src/PixiEditor/ViewModels/Nodes/NodeViewModelAttribute.cs

@@ -1,10 +1,12 @@
 namespace PixiEditor.ViewModels.Nodes;
 namespace PixiEditor.ViewModels.Nodes;
 
 
-public class NodeViewModelAttribute(string displayName, string? category) : Attribute
+public class NodeViewModelAttribute(string displayName, string? category, string? icon) : Attribute
 {
 {
     public string DisplayName { get; } = displayName;
     public string DisplayName { get; } = displayName;
 
 
     public string? Category { get; } = category;
     public string? Category { get; } = category;
-    
+
+    public string? Icon { get; } = icon;
+
     public string? PickerName { get; set; }
     public string? PickerName { get; set; }
 }
 }