-
Adding parent to scale expression?
Hey guys,
Sorry I have been having lots of questions as of late!
So I’m using the following expression to change the scale of a layer based on a background gradient (from black to white) but I also need to have that layer parented to a null that is controlling a lot of layers at once for position.
The expression works great until I parent the layer to a null and then the layer scales to 0 immediately.
Is there a way to include the parent in the following expression so it works properly?
Thanks!
sourceLayer = thisComp.layer("gradient_ramp");sampleSize = [1,1];
samplePoint = transform.position;
colour = sourceLayer.sampleImage(sampleSize,samplePoint);
x=colour[0]*66;
[x,x]