void UK2Node_CommutativeAssociativeBinaryOperator::RemoveInputPin(UEdGraphPin* Pin) { if(CanRemovePin(Pin)) { FScopedTransaction Transaction( LOCTEXT("RemovePinTx", "RemovePin") ); Modify(); if (RemovePin(Pin)) { --NumAdditionalInputs; int32 NameIndex = 0; const UEdGraphPin* OutPin = FindOutPin(); const UEdGraphPin* SelfPin = FindSelfPin(); for (int32 PinIndex = 0; PinIndex < Pins.Num(); ++PinIndex) { UEdGraphPin* LocalPin = Pins[PinIndex]; if(LocalPin && (LocalPin != OutPin) && (LocalPin != SelfPin)) { const FString PinName = GetNameForPin(NameIndex); if(PinName != LocalPin->PinName) { LocalPin->Modify(); LocalPin->PinName = PinName; } NameIndex++; } } FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint()); } } }
WorldPinsService::~WorldPinsService() { while(m_worldPinsRepository.GetItemCount() != 0) { WorldPinItemModel* item = m_worldPinsRepository.GetItemAtIndex(0); RemovePin(item); } }
void UK2Node_Switch::RemovePinFromSwitchNode(UEdGraphPin* TargetPin) { // If removing the default pin, we'll need to reconstruct the node, so send a property changed event to handle that if(bHasDefaultPin && TargetPin == GetDefaultPin()) { UProperty* HasDefaultPinProperty = FindField<UProperty>(GetClass(), "bHasDefaultPin"); if(HasDefaultPinProperty != NULL) { PreEditChange(HasDefaultPinProperty); bHasDefaultPin = false; FPropertyChangedEvent HasDefaultPinPropertyChangedEvent(HasDefaultPinProperty); PostEditChangeProperty(HasDefaultPinPropertyChangedEvent); } } else { TargetPin->BreakAllPinLinks(); Pins.Remove(TargetPin); RemovePin(TargetPin); } }