Referencing Layers within Precomps
Posted: March 6th, 2008, 3:48 pm
Hi,
I'm using this expression on the scale of some precomps based on the closeness of another layer. But I also need it to change the opacity of a layer inside the precomps. All the precomps are set up the same way, with same amount of layers in the same order. What is the best way to go about referencing the layer? It would be best if I could do it by layer number.
startS = 200; //start scale 400 pixels from null
endS = 50; //end scale 50 pixels from null
C = thisComp.layer("Proximity").toWorld([0,0,0]);
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startS,endS,[125,125],[100,100])
Thanks in advance!
I'm using this expression on the scale of some precomps based on the closeness of another layer. But I also need it to change the opacity of a layer inside the precomps. All the precomps are set up the same way, with same amount of layers in the same order. What is the best way to go about referencing the layer? It would be best if I could do it by layer number.
startS = 200; //start scale 400 pixels from null
endS = 50; //end scale 50 pixels from null
C = thisComp.layer("Proximity").toWorld([0,0,0]);
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startS,endS,[125,125],[100,100])
Thanks in advance!