MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

XPresso Question - Radio Button

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Tony BaroneXPresso Question - Radio Button
by on Apr 24, 2013 at 2:15:14 pm

Could someone please explain how I could set up an Xpresso setup where I have 3 Radio Buttons in my User Data which would control 3 separate Object's visibility depending on which radio button is selected?

For example:

Button 1 Selected - Object 1 visible, but Object 2 & 3 Invisible

Button 2 Selected - Object 2 visible, but Object 1 & 3 Invisible

Button 3 Selected - Object 3 visible, but Object 1 & 2 Invisible


Return to posts index

Adam TrachtenbergRe: XPresso Question - Radio Button
by on Apr 24, 2013 at 3:36:55 pm

Heh, I learned something answering this question (as I often do). The key is to choose the right user data type. In this case I added user data type Integer with the Radio Buttons interface. Then you have to type in the correct syntax for the buttons (go to "manage user data" or check the help file). Once you get that sorted it's just a matter of adding the user data in the Xpresso manager.

In this case, with three buttons, the interface will output 0 if the first button is checked, 1 if the second is checked, and 2 if the third is checked. From there it's just a question of setting up compare nodes to turn off the various objects' visibility.

Example file:

Return to posts index

Tony BaroneRe: XPresso Question - Radio Button
by on Apr 24, 2013 at 4:53:26 pm

FANTASTIC! That is EXACTLY what I was looking for, thanks!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved