void USoundCueGraphNode::RemoveInputPin(UEdGraphPin* InGraphPin) { const FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "SoundCueEditorDeleteInput", "Delete Sound Cue Input") ); Modify(); TArray<class UEdGraphPin*> InputPins; GetInputPins(InputPins); for (int32 InputIndex = 0; InputIndex < InputPins.Num(); InputIndex++) { if (InGraphPin == InputPins[InputIndex]) { InGraphPin->MarkPendingKill(); Pins.Remove(InGraphPin); // also remove the SoundNode child node so ordering matches SoundNode->Modify(); SoundNode->RemoveChildNode(InputIndex); break; } } USoundCue* SoundCue = CastChecked<USoundCueGraph>(GetGraph())->GetSoundCue(); SoundCue->CompileSoundNodesFromGraphNodes(); SoundCue->MarkPackageDirty(); // Refresh the current graph, so the pins can be updated GetGraph()->NotifyGraphChanged(); }
void USoundCueGraphNode::AddInputPin() { const FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "SoundCueEditorAddInput", "Add Sound Cue Input") ); Modify(); CreateInputPin(); USoundCue* SoundCue = CastChecked<USoundCueGraph>(GetGraph())->GetSoundCue(); SoundCue->CompileSoundNodesFromGraphNodes(); SoundCue->MarkPackageDirty(); // Refresh the current graph, so the pins can be updated GetGraph()->NotifyGraphChanged(); }