49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Windows;
|
|
|
|
namespace ImageProcessingGraph.Editor.Nodes.NodeAttributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|
public class NodeInfoAttribute : Attribute
|
|
{
|
|
private string name;
|
|
private string menuItem;
|
|
private string ussPath;
|
|
private Type editorType;
|
|
|
|
public string Title => name;
|
|
public string MenuItem => menuItem;
|
|
public string UssPath => ussPath;
|
|
public Type EditorType => editorType;
|
|
|
|
public NodeInfoAttribute(string name, string menuItem = "", bool requiresImage = false, string ussPath = null, Type editorType = null)
|
|
{
|
|
this.name = name;
|
|
this.menuItem = menuItem;
|
|
this.ussPath = ussPath;
|
|
this.editorType = editorType;
|
|
}
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Field)]
|
|
public class Input : Attribute
|
|
{
|
|
public string Label { get; }
|
|
|
|
public Input(string _label)
|
|
{
|
|
Label = _label;
|
|
}
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Field)]
|
|
public class Output : Attribute
|
|
{
|
|
public string Label { get; }
|
|
|
|
public Output(string _label)
|
|
{
|
|
Label = _label;
|
|
}
|
|
}
|
|
} |