1
$\begingroup$

I'm adding items into a list using a loop, but in some cases a condition is met inside this loop that should skip that element into adding it to the list. How can this be done in AN? I've tried the loop break output but that just stops the iteration completely. I checked some python expressions and tried the passstatement but I keep getting syntax errors.

Any help? thanks

$\endgroup$

1 Answer 1

3
$\begingroup$

The generator node have a hidden Condition input that allows one to skip appending at a certain execution. See example 4 in the documentation.

Node Tree

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .