-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Toggling the sequenced
property of VisualScriptFunction
doesn't redraw/refesh call nodes
#37173
Comments
So all the functions with sequence property set to false, will they be called at the same time? Or do they act as getters? |
My understanding is that the functions act as getters. |
A better way to solve it would be to refresh the nodes, like you mentioned. Because if the sequence property is changed, it would depend on the user on how to connect/reconnect the node. |
From a "principle of least surprise" point of view:
FWIW I do feel like the |
But, yes, at a minimum, visually refreshing the nodes would be an improvement on the existing behaviour, even if it may not be ideal. |
Yep I do agree, that sequenced is rather obtuse and probably should be removed in-favor of automatically detecting no sequence port connections. As for the redrawing part, it is simple enough so maybe it's fine as a bandage. |
Yup, sure it will be. I'll be making a PR to refresh those nodes. This way there will be some consistency with the property change. |
Godot version: v3.2.1.stable.official
OS/device including version: N/A
Issue description:
The
sequenced
property ofVisualScriptFunction
is (AFAICT) supposed to enable a function to act as a getter, however:The functionality is undocumented (see: Document the
sequenced
property ofVisualScriptFunction
godot-docs#3287).There is an apparent bug which makes the functionality--at a minimum--undiscoverable and potentially broken.
Steps to reproduce:
Here is an example of how the
sequenced
property is intended to be used:Configuration:
functionA
hasSequenced
set totrue
i.e. "On"/checked/ticked.functionB
hasSequenced
set tofalse
i.e. "Off"/not-checked/not-tickedIn the above image, note the following:
functionB()
has no white triangle sequence ports, only an output data port.functionA()
does have sequence ports in addition to the output data port.Also, with this configuration, if the call to
functionA()
is not connected as part of a sequence then an error is generated by theAdd
node:Minimal reproduction project:
The below image shows an example of what happens if
sequenced
is toggled onfunctionA
and another call node is created by dragging the function name from the "Functions" list onto the graph:Note:
functionA()
function call nodes have different appearances (the lowerfunctionA()
node was created after "Sequenced" was unchecked.There is more detail in the documentation-related issue linked above. (Including discussion about whether there's an underlying feature design/exposure issue to consider and uncertainty about potential caching/consts issues.)
Potential solutions
My impression is that a bug fix would need to cover two parts:
Visual refresh of existing displayed function call nodes.
Handling of connections/disconnections of existing function call nodes when the referenced function's
sequenced
property is set to false--including potentially warning about unintended changes.Related links
Commit where functionality was added: 8a4bce6
Issue marked as "Fixed" by above commit: "It's impossible to create custom function without sequence port in VS #6346 "
Semi-related issue: VS: Fix return value for user-defined functions #9758
Documentation of
ports_changed_notify
which seems like it might used to modify/update display of node aftersequenced
property is toggled.The Reddit /r/godot question about the
Sequenced
property ofVisualScriptFunction
that started me down this path. :)The text was updated successfully, but these errors were encountered: