-
Notifications
You must be signed in to change notification settings - Fork 310
Flow Node Validation enhancements #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.x
Are you sure you want to change the base?
Conversation
- UFlowNode::ValidateNode() is now blueprint-implementable - UFlowNode now has functions to log validation errors, warnings and notes - UFlowAsset validation fix : if the validation contains only warnings and/or notes but no errors, the messages are still logged
Source/Flow/Public/Nodes/FlowNode.h
Outdated
EDataValidationResult K2_ValidateNode(); | ||
|
||
// Log validation error (editor-only) | ||
UFUNCTION(BlueprintCallable, Category = "FlowNode|Validation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add meta = (DevelopmentOnly)
to these functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done !
That's a nice addition for BP nodes, but I noticed that this is for UFlowNode (as previous validation logic). I propose to move it to UFlowNodeBase, it will give users ability to implement validation logic for AddOns also, because currently we can't do that, only runtime message logging is supported. |
Also added meta = DevelopmentOnly for blueprint validation functions
I've taken the feedback into account, and AddOns validation is now possible :) Do you have any ideas on the ideal way to do this? |
Unfortunately, SGraphPanel does not know anything about AddOns. When SGraphPanel::Update is called, it loops over top level nodes only, creates their respective SWidgets and stores them in a map NodeToWidgetLookup. When you want to select some node, JumpToNode is called and, eventually, in SNodePanel::Tick it tries to find respective SWidget for UEdGraphNode in NodeToWidgetLookup map (in our case, this is AddOn node) and it is not there :) We could try to add UEdGraphNodes created for AddOns to Nodes array in UEdGraph, but I don't know if this will work) Simpler way would be just to pass owning FlowNode, but as you said, it is available at runtime only. |
I think we can add
to this
|
Blueprint Node Validation Support
Flow Asset Validation Logs All Severities
Flow Node AddOn Node Validation
Example in a Blueprint Flow Node