Page 1 of 1

Can the RGB values of a poly be sourced from null sliders?

PostPosted: 12/6/2017, 3:39 pm
by sunsanvil
What I would LIKE to have is...

- A Null with three sliders, lets call them R, G, and B.
- A simple rectangle which gets its RGB color values from those sliders.
- A text block which displays as "Rvalue,Gvalue,Bvalue" (basically spelling out the current triplet).

Right now I'm key-framing the changes to the rectangle color AND keyframing/editing the text. It would be so much efficient if I could keyframe just the sliders.

Alternatively, if thats absolutely impossible, I'd settle for the text getting its source from the rectangle's RGB values.

Any help would be very much appreciated.

Re: Can the RGB values of a poly be sourced from null sliders?

PostPosted: 12/17/2017, 9:43 am
by star+circle
Color fill:
Code: Select all
r = thisComp.layer("Null 1").effect("R")("Slider")/255;
g = thisComp.layer("Null 1").effect("G")("Slider")/255;
b = thisComp.layer("Null 1").effect("B")("Slider")/255;
[r, g, b, 1]


Source text:
Code: Select all
"Rvalue "+ thisComp.layer("Null 1").effect("R")("Slider").value + ", Gvalue "+thisComp.layer("Null 1").effect("G")("Slider").value+", Bvalue "+thisComp.layer("Null 1").effect("B")("Slider").value