protected override bool CouldLinkMyInputTo(VFXDataAnchorController myInput, VFXDataAnchorController otherOutput, VFXDataAnchorController.CanLinkCache cache) { if (otherOutput.direction == myInput.direction) { return(false); } if (!myInput.CanLinkToNode(otherOutput.sourceNode, cache)) { return(false); } return(model.GetBestAffinityType(otherOutput.portType) != null); }
protected virtual bool CouldLinkMyInputTo(VFXDataAnchorController myInput, VFXDataAnchorController otherOutput, VFXDataAnchorController.CanLinkCache cache) { return(false); }
protected override bool CouldLinkMyInputTo(VFXDataAnchorController myInput, VFXDataAnchorController otherOutput, VFXDataAnchorController.CanLinkCache cache) { if (!myInput.model.IsMasterSlot()) { return(false); } if (otherOutput.direction == myInput.direction) { return(false); } if (!myInput.CanLinkToNode(otherOutput.sourceNode, cache)) { return(false); } int inputIndex = model.GetSlotIndex(myInput.model); IVFXOperatorNumericUnifiedConstrained constraintInterface = model as IVFXOperatorNumericUnifiedConstrained; var bestAffinityType = model.GetBestAffinityType(otherOutput.portType); if (bestAffinityType == null) { return(false); } if (constraintInterface.slotIndicesThatCanBeScalar.Contains(inputIndex)) { if (VFXTypeUtility.GetComponentCount(otherOutput.model) != 0) // If it is a vector or float type, then conversion to float exists { return(true); } } return(model.GetBestAffinityType(otherOutput.portType) != null); }
public bool CouldLink(VFXDataAnchorController myAnchor, VFXDataAnchorController otherAnchor, VFXDataAnchorController.CanLinkCache cache) { if (myAnchor.direction == Direction.Input) { return(CouldLinkMyInputTo(myAnchor, otherAnchor, cache)); } else { return(otherAnchor.sourceNode.CouldLinkMyInputTo(otherAnchor, myAnchor, cache)); } }