The custom K2Node does not appear in the context menu when dragging a pin

I created my own child node from UK2Node. It can be created by right-clicking on the graph and selecting it in the list.

But if you try to pull out a new node by drag the pin, then my node is no longer displayed in the context menu that appears. However, it appears if the “Context Sensitive” flag is turned off.
If you select it in this case, it will be automatically attached to the pin from which I drag it out, that is, theoretically, my node should fall under the context criteria.

I noticed that when my node is displayed, at the moment of opening the context menu in the node, the “IsActionFilteredOut” function is called, and in it I can prevent the node from being displayed if I opened the context menu using RMB, but this function is not called when I pull a new node from pin, therefore I cannot influence whether it will be displayed in the list or not.

Question: how to influence what will be displayed in a certain context? How can I add my node to the list of a specific context?

Thank you in advance.

It turns out I created this problem myself out of ignorance…

To create pins correctly, I needed to bind to a delegate to keep track of their relevance. But in some cases, at the moment the delegate was called, the engine could crash.

I found out that this happens in the node along the path Engine/Transient.PROTO_BP_Blueprint_0:UserConstructionScript.NodeName

If I bind a delegate in this node, then in some cases this node was marked as “PendingKill”, which led to a crash at the time the delegate was called.

Without hesitation, I simply added ignoring “AllocateDefaultPins” in the “PROTO” node.

But as it turned out, the “ContextSensitive” list of available nodes is created based on the pins that will be in the “PROTO” node, in which I do not create pins, because to create them correctly I need to bind to the delegate, the call of which led to the crash .

After some time, I changed the way I track the relevance of pins, and I no longer needed to bind to a delegate, and I removed the ignoring of “AllocateDefaultPins” in the “PROTO” node.

And at that moment everything fixed itself…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.