public UniformColorNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) { Name = "Uniform Color"; Id = Guid.NewGuid().ToString(); width = w; height = h; tileX = tileY = 1; color = new MVector(0, 0, 0, 1); processor = new UniformColorProcessor(); previewProcessor = new BasicImageRenderer(); internalPixelType = p; Inputs = new List <NodeInput>(); output = new NodeOutput(NodeType.Color | NodeType.Gray, this); Outputs = new List <NodeOutput>(); Outputs.Add(output); //this is a special case for uniform color node //so it will render the node preview on drag drop TryAndProcess(); }
public UniformColorNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) : base() { Name = "Uniform Color"; Id = Guid.NewGuid().ToString(); width = w; height = h; tileX = tileY = 1; color = new MVector(0, 0, 0, 1); processor = new UniformColorProcessor(); previewProcessor = new BasicImageRenderer(); internalPixelType = p; Inputs = new List <NodeInput>(); output = new NodeOutput(NodeType.Color | NodeType.Gray, this); Outputs = new List <NodeOutput>(); Outputs.Add(output); }