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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to increment a value inside iterator or for-each loop

Message 1 of 3
445 Views, 2 Replies

How to increment a value inside iterator or for-each loop

Hey guys, I stumbled upon this issue but could not solve it. Basically I wanted to increment a value inside an iterator block or for-each block. I know for-each is a parallel block, so it's not a good choice. I'm also know how to use the feedback ports to update the existing attribute values. But Bifrost errors when I use feedback port inside an iteration block. To simply put it, I want to graph the following python code in Bifrost. 


import maya.cmds as MC

value = 5

for i in range(5):
    value += (value/2)

print value
# Result : 33


If anyone knows how to do it then please share with me. Thank you.

Message 2 of 3
in reply to: pranaymeher

What you are looking for is a port state. It is available in do-while and iterate loom compounds.



Maxime Jeanmougin - Technical Artist

Join the Bifrost Addicts community on Discord:
Message 3 of 3
in reply to: mjcg91

Thanks a lot for the reply @mjcg91. That's exactly what I was looking for. The naming 'port_state' doesn't make sense but as long as it does what it does, its good.

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

Post to forums