on Nov 13, 2018 at 10:25:26 pm Last Edited By Spencer Evans on Nov 13, 2018 at 10:55:34 pm
Hello, I'm not great at coding and I'm trying to figure out how to link properties in my main comp (A) to items in other compositions (B). The names and layer index of those other compositions (B) will vary, but they will each contain a layer which these properties in main comp (A) link to. Also, these other compositions (B) will *always* be the last layer in my main comp (A).
Basically, my big question is: is it possible to access items within a composition using its layer number and *not* its name? If not, what other solutions might I consider?
P.S. I have tried to change the layer name on all my sub comps (B) to be the same ("Frame" in this case) but this didn't seem to work. I guess you can only reference a comp by its source name and not layer name?
I have come up with a solution but it's not the cleanest. I just have to change the name of a null object (layer 1) in each comp so that it references the correct comp. Any advice on simplifying this is welcome. n = thisComp.layer(1).name;
comp("Frame_"+n).layer("Text BG").content("Border").content("Rectangle Path 1").size