FOREACH continue

   2012   2   1
User Avatar
Member
143 posts
Joined: March 2014
Offline
Hello,

Is there a way to skip every Nth iteration in the FOREACH sop? It'd be nice if you could do “if(not_what_i_want)skip_this_iteration;”

Thanks,
Caesar
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Put an if inside your foreach and put your logic in the if? Then it should only process if “true”

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Add a Switch SOP inside with “not_what_i_want” as the condition, have input 0 come from what you want to be done if the condition is false, and input 1 come from what you want to be done if the condition is true (e.g. the begin node if you want to just use the input for that iteration, or a Null SOP if you don't want anything at all).
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links