Skip to content

Loops do not repeat execution for leaf nodes (about expected behavior for ForLoop) #10

@Shyryp

Description

@Shyryp

Expected Behavior
I would expect that the final branches (leaf nodes (nodes without return pins)) in the loop body would also be re-executed with each loop, or I would expect to be able to control this somehow, but I haven't found such functionality.

Actual Behavior
Currently, any leaf nodes in the node tree inside the loop body are not executed in subsequent loops (leaf nodes are executed only once). For example, in the screenshot below, you can see that the preview (on the left) of the very first image created by the loop is displayed, rather than the very last image that is displayed after the loop (on the right). While the loop is running, the image previews are not updated inside the loop body.

Screenshot with workflow with problem:
image

Steps to Reproduce
Here is a simple workflow that makes it easy to reproduce this issue:
Leaf_Node_Problem_Example_Workflow.json

It would be interesting to know why it was decided to make the end nodes run once within a loop, rather than repeatedly - is there any problem with that?

I expect there will be a setting for ForLoop that will allow end nodes to be run in every loop, not just the first one. Or alternative ForLoop nodes that will run end nodes in every loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions