FORUMS: list search recent posts

Shared variables

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nicholas Deines
Shared variables
on Jun 9, 2020 at 8:11:53 pm

With the help of people on this forum I've created several color control expressions so that I can choose one color and have other colors be slight variants of that master color. I'm doing this with pie slices on a pie chart. That way the top and side color of each pie wedge have different lightness values, but the same hue.

What I'm wondering is if I can point my variables at a something that would be my "master variable" so that if I want to tweak the lighter color expression for 10 pie slices I can just change one "master variable".

Below is the lighter color expression for my first pie slice. I would like to make "l" = that master variable number, which I would repeat for all my pie slices.

But I don't know what to pick whip it to that could hold that variable. Another fill perhaps?

c = effect("Master 1")("Color")
h = 1; // hue factor
s = 1; // saturation factor
l = 1.35; // lightness factor
hsl = rgbToHsl(c);
hslToRgb([hsl[0],hsl[1]*s,hsl[2]*l,hsl[3]])


Return to posts index

Andrei Popa
Re: Shared variables
on Jun 10, 2020 at 8:32:42 am

You should add a slider control to your layer and pick whip that value.

Andrei
My Envato portfolio.


Return to posts index

Nicholas Deines
Re: Shared variables
on Jun 10, 2020 at 5:26:50 pm

Thanks, Andrei! I actually figured that out yesterday after I posted the question.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]