Context input and output for Do regions

Heyhey,

Deriving this question from the chat so that it’s more official/visible : would it make sense to add Context input and output pins to the Do region itself? In cases where the nodes you put inside those do not have inputs or outputs, how to make use of them becomes confusing :

Having Context input and outputs on the region would resonate with ImGUI and make it clear how to sequence them.

What do you thinkkkk?

Cheers!

edit: would also help visualize to which operation the region itself is assigned because the pin would inherit the color of that operation.

6 Likes

i like!

alternatively, it would be cool if that was allowed:


could there be a default type like bool for the Do regions BCPs?

I can also imagine a different approach, where the Do region would behave more like a frame. ignoring links, operation-colors and such as much as possible. maybe another type of region, that allows links crossing the border?


all of that is not essential. i usually just noodle a bool through the do regions, as it was said on the chat. but syntax sugar is always nice and a field where especially visual languages can shine.

2 Likes

I think the inactive link in your screenshot @sebl should even have an effect. No data is flowing, sure, but the execution order gets influenced.
That said: Creating this construct is tedious.

My favorite way of expression still would be this:

In classes it should even allow writing into a pad and after that calling an instance operation on This.
As it was brought up over here.

you mean pads could then also be written to immediately and not at the end of the call?

that would be a nice additional feature

Yes. Well actually, in some cases, they already get written in between:

ThroughPadInClass Tester.vl (11.9 KB)

Discussion back then:
[Quest] Field Setters and Getters, object graphs, This node, Readability

It’s just very hard to interpret this patch as writing to X after calling the getter. So in order to make constructs like this behave as expected we already allowed pads to be written on the fly. But this is only possible in classes (as they can mutate on the go). In Records or Process patches, we show a warning.

But yeah. A horizontal line would be lighter and express the same