zChooser
Introduction
This is a small helper node to select one output out of several. This can be implemented
with native Maya nodes, and this is only a shortcut to allow selecting any number of outputs
with just one node.
Attributes
-
choice - The element of output[] that should be set to selectedValue.
-
selectedValue - The value to set the selected element to.
-
unselectedValue - The value to set all other elements to.
-
output[] - An array of output values.
Example
To display one out of a list of ten meshes, connect each transform's visibility attribute
to an element of output. Leave selectedValue and unselectedValue at their defaults of 1 and 0,
and set choice to the index of the mesh to display.
Limitations
This doesn't work for texture attributes. A Python implementation would probably be too slow
for that anyway.
Notes
There must be a builtin node that does this. "chooser" looks close, but isn't quite it.