public static int TransferExpressionToParameters(IList <VFXExpression> inputExpression, IEnumerable <VFXParameter> parameters, List <VFXExpression> backedUpExpressions = null) { int cptSlot = 0; foreach (var param in parameters) { VFXSlot outputSlot = param.outputSlots[0]; param.subgraphMode = true; if (inputExpression.Count <= cptSlot) { continue; } foreach (var slot in outputSlot.GetExpressionSlots()) { if (backedUpExpressions != null) { backedUpExpressions.Add(slot.GetExpression()); } slot.SetExpression(inputExpression[cptSlot]); cptSlot += 1; } } return(cptSlot); }
public void AddExpressionsFromSlot(VFXSlot masterSlot, int blockId) { foreach (var slot in masterSlot.GetExpressionSlots()) { var exp = slot.GetExpression(); if (!Contains(exp)) { AddExpression(exp, slot.fullName, blockId); } } }