public OperandInfo(VFXCascadedOperatorEdit owner, VFXOperatorNumericCascadedUnified op, int index) : base(owner, op, index) { field = new TextField(); field.RegisterCallback <BlurEvent>(OnChangeValue); field.RegisterCallback <KeyDownEvent>(OnKeyDown); Insert(0, field); }
public override VFXParameter.NodeLinkedSlot CreateLinkTo(VFXDataAnchorController output) { var slotOutput = output != null ? output.model : null; VFXOperatorNumericCascadedUnified op = sourceNode.model; op.AddOperand(op.GetBestAffinityType(output.model.property.type)); var slotInput = op.GetInputSlot(op.GetNbInputSlots() - 1); if (slotInput != null && slotOutput != null && slotInput.Link(slotOutput)) { return(new VFXParameter.NodeLinkedSlot() { inputSlot = slotInput, outputSlot = slotOutput }); } return(new VFXParameter.NodeLinkedSlot()); }
public override void Set(VFXOperatorNumericCascadedUnified op) { base.Set(op); field.value = op.GetOperandName(index); }