Jump to content

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


Recommended Posts

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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...