Bitflags enum and K2Node pin

Hello everyone,

I am currently developing custom K2 nodes and I need to have an input pin of type enum with the Bitflags meta.

The PinCategory is set to PC_Byte
The PinSubCategoryObject is set to point to the StaticEnum object.

Everything works fine except that the pin is acting like a regular enum pin. Does anyone know how to make it works as expected?

I have searched for some kind of meta for the pin but found nothing… Maybe there is a way to get the widget from the pin and configure it… I don’t know…

EDIT: I work with 5.4.3, build from source and rider.

Thanks

You can override UEdGraphNode::GetPinMetaData. It takes a pin name and a meta data key which you can check against and return a string. Though this case is weird because you’d usually just do Bitflags, but that should be synonymous with `Bitflags=true’ so you’d return true.

Not all meta’s work for blueprint node pins, but if it works for function parameters it should work on custom node pins too.

You can use UEdGraphSchema_K2::ConvertPropertyToPinType() to get the correct pin type, otherwise I think you just need to set the PinSubCategory to PSC_Bitmask