Skip to content

Flow v2.1

Krzysiek Justyński edited this page Jan 12, 2025 · 9 revisions

This is the upcoming release. This page is updated regularly, after pushing changes to the repository.

This release includes pull requests from the community: 39M (Nil), HomerJohnston (Kyle Wilcox), LindyHopperGT, Maksym Kapelianovych, Ryan DowlingSoka, Soraphis.

This is the first release for UE 5.6.

Flow Asset

  • Graph refresh refactored. (contributed by HomerJohnston)
    • The goal of this PR is to make the graph editor stop refreshing the entire graph during as many events as possible. It also fixes a few minor bugs related to orphaned pins, running undo/redo commands on edge cases, and unnecessary graph dirtying on edge cases such as when nodes contain orphaned or invalid pins.
    • BREAKING CHANGE. Public void UFlowGraphNode::RefreshContextPins(bool) changed to protected void UFlowGraphNode::RefreshContextPins(). The existing system has some logic that could result in attempts to recursively call ReconstructNode -> RefreshContextPins -> ReconstructNode -> RefreshContextPins. Currently, there are bools to guard against this, but both methods are exposed and this felt unclean to me.
    • UFlowGraphNode::PostLoad now rebuilds the unserialized InputPins and OutputPins arrays using the serialized Pins array.
    • UFlowAsset::HarvestNodeConnections - made this function able to harvest a single node, or harvest the whole graph (pass in nullptr to harvest the whole graph, or pass in a single node to harvest just that node). Then UFlowGraphNode::NodeConnectionListChanged updates node connections for only a single node when its connections are changed.
    • Changed the right-click context menu command, "Refresh Context Pins", to "Reconstruct Node".
    • Modified the following functions to only refresh individual nodes instead of the whole graph by changing NotifyGraphChanged() calls to NotifyNodeChanged(Node): FFlowGraphSchemaAction_NewNode::CreateNode, UFlowGraphSchema::TryCreateConnection, UFlowGraphSchema::BreakNodeLinks, UFlowGraphNode::RemoveOrphanedPin, UFlowGraphNode::AddInstancePin, UFlowGraphNode::RemoveInstancePin.
    • FlowGraphSchemaAction_NewNode::CreateNode now runs ReconstructNode() instead of only spawning default pins.
    • UFlowGraphNode::OnGraphRefresh now runs ReconstructNode() instead of RefreshContextPins(), on all nodes.
    • UFlowGraphNode::RefreshContextPins - no longer runs if an editor transaction is in progress (running undo/redo).
    • `UFlowGraphNode::HavePinsChanged - now disregards any orphaned pin connections.
    • Added a new delegate UFlowGraphNode::OnReconstructNodeCompleted to trigger the rebuild of SFlowGraphNode widgets whenever ReconstructNode is called.
    • SFlowGraphNode added destructor to unbind from UFlowGraphNode delegates.
    • UFlowGraphSchemaadded virtual bool ShouldAlwaysPurgeOnModification() const override { return false; } to reduce unnecessary graph refreshes.
    • UFlowNodeAddOn - GetContextInput/OutputPins functions changed to ignore invalid pins and write a log warning for invalid pins.

Flow Node

  • UFlowNode::TriggerOutput won't execute its logic if a given node is deactivated. (contributed by 39M)
  • Fixed UFlowNode::Branch never deactivating after checking its condition. (fix suggested by Geckostya)
  • Several improvements to copy/pasting nodes. (submitted by MaksymKapelianovych)
    • Reset EventName in UFlowNode_CustomInput after duplicating or copying/pasting.
    • Fix pasting nodes into Flow Asset when Flow Asset cannot accept such nodes (node or asset class is denied).
    • If among selected nodes there are nodes that cannot be deleted, they will stay in the graph as is and all "deletable" nodes will be deleted (currently none of the nodes will be deleted in such case).
  • Exposed ability to override node's Category via OverridenNodeCategories list Flow Graph project settings. This way you can fully reorganize Flow Palette to your liking. (inspired by LindyHopperGT's proposal)
  • The first-ever update to built-in node categories. (inspired by LindyHopperGT's proposal)
    • I did partially accept a proposed update to the category layout. I updated the defaults, which are more flat than proposed, as this would be enough for projects starting with a limited number of project-specific nodes.
    • It feels good to refresh categories after a few years of using that palette. The World category has been effectively renamed Actor since a growing number of projects embrace ECS. It's useful to separate nodes tied to the OOP paradigm from multi-threaded ECS.
    • BREAKING CHANGE. Flow Node source files have been moved to matching folder names. You might need to update your includes if you have C++ classes referencing built-it Flow Node classes in your code.

Flow Component

  • Added TriggerRootFlowCustomInput method. (contributed by Soraphis)
  • Renamed methods related to Custom Output events, now called BP_OnRootFlowCustomEvent and OnRootFlowCustomEvent.