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: 

How to make the if node pass multiple values?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
g2m.agent
273 Views, 3 Replies

How to make the if node pass multiple values?

How to make the if node pass multiple values? like "fan-in" port.

 

 

if True:
    # case 1
    # case 2
    # ...

 

 

maya_RfO4WTbKAv.jpg

 

I try to change if ports to "fan-in", but I can't change the output!

maya_rDfuyz68XB.jpg

compound inside:

maya_bbReEbva29.jpg

3 REPLIES 3
Message 2 of 4
mjcg91
in reply to: g2m.agent

There is no fan-in for output and I don't think there will ever never be. That could be dangerous with super large arrays.

Once it's in an array you should get your elements back using get_from_array.

PS: you don't need these build array nodes before plugin it into a fan-in port. The port itself acts concatenates all inputs into an array. 

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 4
g2m.agent
in reply to: g2m.agent

"fan-in" is just a "try".

my question is: How to make the if node pass multiple values?

I need this:

if True:
    # do case1
    # do case2
    # do case3

bifrost way(?):

if True:
    # do case1
if True:
    # do case2
if True:
    # do case3

Is there a better way?

Message 4 of 4
mjcg91
in reply to: g2m.agent

The 2nd snippet is the way to go. As a data flow graph, each branch or variables has to be passed in different if nodes.

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts

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

Post to forums  

Autodesk Design & Make Report