Custom Exec Pins for Custom Blueprint Functions/ Events

Dear Epic Santa…

Custom Blueprints Nodes are awesome. They empower me to make my Code cleaner and more logical. However they lack some things that might be critical.
Custom Blueprint Nodes can not:

  1. have multiple In/Out pins
  2. execute a specific Output pin at a specific time

It would be nice to have CustomBlueprintFunction and CustomBlueprintEvent specifiers that work with some some additional Meta-Specifiers like CanUserAddOutPins and UseCustomOutPins.

For Output it could work using functions like:



//Execute the last Pin of BP Function "Name"
int ID = this->BlueprintNodes.GetByName(TEXT("Name"))->OutPins.Count - 1;
this->BlueprintNodes.GetByName(TEXT("Name"))->OutPins[ID]->ExecutePin();


And for Input you could register Events to a InputPin specified using Meta specifiers. The register could take place in the Class constructor like:



ACustomBPClass::ACustomBPClass(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
    this->BlueprintNodes.GetByName(TEXT("Name"))->InPins.GetByName(TEXT("PinName"))->Event += &ACustomBPClass::InputEvent;
}


It doesn’t have to be this exact way, this is just meant to be a discussion starter, but i think that custom exec pins have to become a thing.

Thanks for reading
Baribal

I think you may find that the BlueprintCallable metadata ExpandEnumAsExecs might accomplish a lot of what you are looking for. They were mentioned in the 4.3 release notes when added for output nodes in addition to already existing for input nodes: What's New | Unreal Engine 5.1 Documentation. They aren’t used a lot in the engine, but you can find a couple of examples of them being used with APlayerController::PlayDynamicForceFeedback or UKismetSystemLibrary::MoveComponentTo

Yes i aggree. It pretty much covers the Output part but what about multiple inputs?

Other solution but it’s more complicated is to code your own node from UK2Node. All nodes are coded that way, the function one is actully UK2Node_CallFunction. You can find them here:

https://github.com/EpicGames/UnrealEngine/tree/890cefeee330dec714271af1cd07969f0a60848e/Engine/Source/Editor/BlueprintGraph/Private

So function nodes are not really “custom” ;]

The ExpandEnumAsExecs mechanism works for both input and output parameters.

Oh nice. Why is there only the release note info on that? Thats a powerful feature!

The release note was for when output parameters were made to also work with the keyword. The inputs had already worked prior to that, as was briefly mentioned in the introductory sentence.

It is indeed a powerful (and I feel underused) feature. I hope it allows you to accomplish your goals.

Well what i meant is why is there no documentation entry(neither input nor output pins) on that? It is not even under the metadata specifiers entry. Thats probably why it is so underused. Nobody knows about it.