#1
|
|||
|
|||
Resetting the Color and Alpha of Nodes
Hi,
I'm trying to make nodes 'blink' in Vizard 5. I wrote the following code to make a given node blink: Code:
fadeColor = vizact.fadeTo(node.getColor(), time=0.333) fadeWhite = vizact.fadeTo([1,1,1], time=0.333) fadeSequence = vizact.sequence(fadeWhite,fadeColor,viz.FOREVER) node.addAction(fadeSequence) Of course, I could recurse through each child and each child of each child for all of the nodes, save all the color values to a list, and then access those values when resetting their colors and alphas. Surely, there's an easier way to do this, right? Isn't there some built-in function that I can call to reset a node to its original state/color/alpha? Last edited by The SundanceKid; 07-16-2014 at 12:15 PM. |
#2
|
|||
|
|||
Saving the values to a list is probably the way to do this. Is this a model with sub-parts or is the parent/child hierarchy defined through the script? The fadeTo action takes an optional 'node' argument which applies the action to a sub-part.
|
Tags |
alpha, color, getcolor(), reset, vizard 5.0 |
|
|