-
Notifications
You must be signed in to change notification settings - Fork 245
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
Add support for Named Reroutes #209
base: 5.x
Are you sure you want to change the base?
Conversation
Source/Flow/Private/Nodes/Route/FlowNode_NamedRerouteDeclaration.cpp
Outdated
Show resolved
Hide resolved
Source/Flow/Public/Nodes/Route/FlowNode_NamedRerouteDeclaration.h
Outdated
Show resolved
Hide resolved
Source/FlowEditor/Public/Graph/Nodes/FlowGraphNode_NamedRerouteDeclaration.h
Outdated
Show resolved
Hide resolved
Source/FlowEditor/Public/Graph/Nodes/FlowGraphNode_NamedRerouteUsage.h
Outdated
Show resolved
Hide resolved
Source/Flow/Private/Nodes/Route/FlowNode_NamedRerouteDeclaration.cpp
Outdated
Show resolved
Hide resolved
Found a little issue - new named reroute declarations have the same name, either node placed from palette, created from pin or converted from regular reroute. Add to "FlowGraphNode_NamedRerouteDeclaration.h" Add to "FlowGraphNode_NamedRerouteDeclaration.cpp"
|
Found another bug, that can cause crash. The problem is in these two lines in
Neither of these functions call To fix this you need to add
and it is better not to call But... I do not see any reason at all to call
|
…aterial Graph bug has been fixed for this implementation (when you copy/duplicate more than one declaration the resulting node names end up being the same). Followed @MaksymKapelianovych recommendations.
Hi, please grab the latest changes as this change has merge conflicts with just accepted Flow AddOns. |
…nd their usages across other graphs without losing references.
@MothDoctor what do you think about this? Maybe I missed something again( |
@MaksymKapelianovych Thank you for mentioning the problems, yes, I think they should be solved. Let me know what you think about that so I can start implementing it. |
But if you want to keep current behaviour of your named reroutes, maybe it would be better to untie it from reroutes at all and to make it as an independent feature. |
…pdated behavior for improved control.
@MaksymKapelianovych I updated the code, can you check it? |
Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode_NamedRerouteDeclaration.cpp
Show resolved
Hide resolved
Other issues:
and remove line
The rest looks good) |
- Node palette is not updated when new named reroute is added or deleted. - Declaration node is not properly registered by Flow debugger.
@MaksymKapelianovych Can you check if the new commit fixes the problem? |
Yep, it is working, though I do not like the implementation (calling PostEditChangeProperty manually), but I do not know how to implement it better) I think it is totally fine for now. |
…ed from the palette during declaration operations in the graph.
while i think you're correct, that if a named reroute is a "reroute" at hearth it should have multiple inputs but only one output. I have to say: thinking of a "named reroute" as a "Sequence" (with don't-care order of outputs) makes the node itself way more useful. limiting the named reroute to the capability of a reroute itself means I'd have to create a sequence, move every output into it's own named reroute and use these. I terms of usage (disregarding technical details) this would feel more like the node in the material graph. |
While it would be useful functionality, it will not correlate with existing reroutes, so it should be implemented as a completely separate feature then (without converting to and from reroutes). In theory we can have both features, but it is not up to me) |
Yeah, I agree. And it kind of is my point: I feel like, we should not add this with the current design to the main package. As this would look too similar to the "sequence"-approach, but the sequence approach is way more useful. but that's just my 2cents, as I would probably disable this one then in my project |
@MaksymKapelianovych What do you think about adding both functionalities in this PR? I also tried using AllocateDefaultPins, but this created orphaned pins in each transaction. |
I think my decision-making capabilities end there and it is up to @MothDoctor in what form to add this feature. It would be wrong for my personal preferences to influence other people's workflow with the Flow. |
No description provided.