using System; using System.Collections.Generic; using UnityEditor.ShaderGraph; namespace UnityEditor.Graphing { enum ModificationScope { Nothing = 0, Node = 1, Graph = 2, Topological = 3, Layout = 4 } delegate void OnNodeModified(AbstractMaterialNode node, ModificationScope scope); static class NodeExtensions { public static IEnumerable GetSlots(this AbstractMaterialNode node) where T : MaterialSlot { var slots = new List(); node.GetSlots(slots); return slots; } public static IEnumerable GetInputSlots(this AbstractMaterialNode node) where T : MaterialSlot { var slots = new List(); node.GetInputSlots(slots); return slots; } public static IEnumerable GetInputSlots(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot { var slots = new List(); node.GetInputSlots(startingSlot, slots); return slots; } public static IEnumerable GetOutputSlots(this AbstractMaterialNode node) where T : MaterialSlot { var slots = new List(); node.GetOutputSlots(slots); return slots; } public static IEnumerable GetOutputSlots(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot { var slots = new List(); node.GetOutputSlots(startingSlot, slots); return slots; } } }