Beispiel #1
0
        private static void InsertAntecedent(List <AbstractMaterialNode> nodes, AbstractMaterialNode node)
        {
            var upstream = node.GetInputSlots <MaterialSlot>().Where(slot => slot.isConnected).Select(slot => node.GetInputNodeFromSlot(slot.id));
            int safeIdx  = nodes.FindLastIndex(n => upstream.Contains(n)) + 1;

            nodes.Insert(safeIdx, node);
        }