Copy link to clipboard
Copied
Hi there,
I am a total newbie when it comes to expressions... I just can't understand the logic half the time (must read a book or something!)
Anyway I simply want to link the x and y size of my shape layer to sliders on a separate layer. In the current format one of these expressions....kinda works, then the second part overwrites it.
h = content("Rectangle 1").content("Rectangle Path 1").size[1];
[h, thisComp.layer("Size_Controller").effect("Size-Y")("Slider")]
w = content("Rectangle 1").content("Rectangle Path 1").size[0];
[w, thisComp.layer("Size_Controller").effect("Size-X")("Slider")]
Please advise,
Many Thanks,
Phil
The expressions output becomes your value for that property so if all you want is slider control you could do something like this on the size property:
x = thisComp.layer("Size_Controller").effect("Size-X")("Slider");
y = thisComp.layer("Size_Controller").effect("Size-Y")("Slider");
[x,y]
If you want to use the initial value of the rectangle size as a starting point and treat the sliders as offest values you would change the last line to:
value+[x,y]
Copy link to clipboard
Copied
The expressions output becomes your value for that property so if all you want is slider control you could do something like this on the size property:
x = thisComp.layer("Size_Controller").effect("Size-X")("Slider");
y = thisComp.layer("Size_Controller").effect("Size-Y")("Slider");
[x,y]
If you want to use the initial value of the rectangle size as a starting point and treat the sliders as offest values you would change the last line to:
value+[x,y]
Copy link to clipboard
Copied
I knew it was meant to be very simple. Think I understand a little better now too!
Thanks a lot!