Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to "jump over" once loop? something like the "continue" keyword in Python.

1 REPLY 1
SOLVED
Reply
Message 1 of 2
g2m.agent
280 Views, 1 Reply

Is there a way to "jump over" once loop? something like the "continue" keyword in Python.

for i in some_array:
    if i==0:
        continue
    # do something that i not equal 0.

 

 

 

1 REPLY 1
Message 2 of 2
Grahame_Fuller
in reply to: g2m.agent

Hi,

 

Connect your array to a for_each compound. Inside that, right-click and make the array connection into an iteration target. Delete the max_iterations port (or set it to a large number). Use an if node to test whether the current value from the array is 0. If it is, pass it through unchanged. Otherwise, change it in some way.

 

test-value-in-for-each.png

 

I hope that helps,

gray

 

 


Grahame Fuller
Learning Content Developer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report