- March 4, 2020 at 10:42 pm
Folks. I have A precomp A, and within that precomp A I have a pre-comp B, within composition B I want a text.
I would like the text to follow the precomp B Index.
Can you help me I’m desperate!
Sorry for google translator!
- March 4, 2020 at 10:53 pm
What do you mean by pre-comp B index? Do you mean the layer index of the pre-comp B layer within precomp A? Something like this:
- March 5, 2020 at 3:11 pm
Compositions in and of themselves do not have indexes; they are entirely object orientated based on their name. They only get layer indexes when they are precomps inside another comp.
Dan’s solution seems right, but if you are looking for the inverse of that where Comp B is inside Comp A and has a specific index, you could do the code below.
The strength in this method is you can swap out the compB’s with many different precomps all with different text layers inside each, and your compA will update it’s expression.
i = 3; //comp B's exact layer index inside compA;
comp(thisComp.layer(i).name).layer("text layer 1").text.sourceText;
- March 10, 2020 at 3:26 pm
OMG Thanks!! It helped me a lot! You are awesome!
Log in to reply.