Jump to content
Sign in to follow this  
raincole

Is it possible to use an expression to drive a Multiparm?

Recommended Posts

Posted (edited)

For example, say I have 10 objects (named object1-10), an Object Merge and a Null with a toggle parm. I'd like to make Object Merge merge only object1, 3, 5, 7, 9 when the toggle is on, and merge only object2, 4, 6, 8, 10 when the toggle is off.

I could set all the enable# parm with expressions one by one. But there should be a better way to do this, right? What if I have N objects instead of 10?

Edited by raincole

Share this post


Link to post
Share on other sites

Yes, a reminder that the modulo "%" operator returns the remainder of a division operation. e.g. 5 % 2 = 1.

Assign an integer attribute to each of your objects with the iteration detail attribute (which you can get with a Block Begin node set to Fetch Metadata).
Switch the output of the loop between the Object Merge and a Null node, using "% 2" to get either input0 or input1.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×