Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects › Reach Composition Effect

  • Reach Composition Effect

    Posted by Tommy Gury on October 24, 2015 at 2:33 pm

    Hello Everybody,

    I’m looking for an expression that could reach a checkbox in another comp:

    The CompA is placed in the Comp1.

    I need to change the CompB anchor point point if the Comp1’s checkbox is on.

    So this is basically my actual expression:

    if(comp(“Comp1”).layer(“CompB”).effect(“EffectName”)(“Checkbox”) == 1 ) y = 0 else y = 1080;

    That expression work fine, but in my case, I want to duplicate CompB a lot in Comp1 (like 500 times).
    If I use this expression, all the duplicated compositions will be connected to the CompB’s checkbox.
    Or I would like each layer intendant with its own checkbox.

    Is there any clue for me?

    Thanks in advance for your replies.

    Tommy

    Tommy Gury replied 10 years, 11 months ago 2 Members · 5 Replies
  • 5 Replies
  • Kalleheikki Kannisto

    October 24, 2015 at 7:37 pm

    Where do you want the checkboxes? 500 different checkboxes in Comp1???

  • Tommy Gury

    October 24, 2015 at 10:45 pm

    Hello Kalle,

    Thanks a lot for your message.

    This my flowchart:

    -> Master
    ->Comp1 (with checkbox1)
    ->CompA
    ->Comp2 (with checkbox2)
    ->CompB
    ->Comp3 (with checkbox3)
    ->CompC
    ->Ect

    In my case, I would like to duplicate Comp1 in the project windows to have Comp2,Comp3,ect
    And each anchorpoint is related to the checkbox in its “hierarchy-1” Comp.

    So for now, this expression works:
    if(comp(“Master”).layer(“Comp1”).effect(“EffectName”)(“Checkbox”) == 1 ) y = 0 else y = 1080;

    But since I call layer.”Comp1″, when I duplicate Comp1 (in the project window), each pre-Comp (A,B,C…) will all be related to the checkbox in Comp1 and not Comp2,3,ect.

    My temporary solution is , as you said, to put all the checkbox in the same layer (using Numlayer operations, put it’s not the most readable and it’s kinda messy in here. It’s would be great to have each checkbox in the corresponding layer.

    I’m looking for a way to call a value that is located in a layer in a hiearachy-1 level. I know this hiearachy-1 thing is unclear but I’m not sure how I should call it.

    Anyway, thanks for your time. If you have any idea, your can save my week 🙂

    Tommy

  • Kalleheikki Kannisto

    October 25, 2015 at 3:48 pm

    Perhaps a better question is: What is it that you want to achieve?

    1000 layers is pretty extravagant, especially if 500 of them are there just to hold one checkbox each.

    Do you want to control all 500 layers independently (and manually) or do you need to control one layer at a time?

    For instance, if you just need to pick one layer at a time so that just one of the layers has the y value of 1080 at a given time, a Layer Control would be a better approach than 500 separate checkboxes on 500 layers.

    (I figured out a way to essentially do what you are asking, but it seems highly doubtful this is actually the way you want to do it.)

  • Tommy Gury

    October 25, 2015 at 9:19 pm

    In fact, i’m using these checkbox cause i’m making a AE template which will be reused many times.

    To explain what I have in mind:

    Consider that I want to invert the anchor point position of my sub pre-comp if the checkbox is activated on the layer in the master comp.
    But my 500 layers aren’t necessary actived all the time, but if the user want 20 layers, so he can, and he can invert the anchor point position on each layer he want too.

    I didn’t realized i could use a layer control fr that. I will figured something.

    Thanks again for your precious reply.

    Tommy

  • Tommy Gury

    October 25, 2015 at 10:24 pm

    So this is the way i choose:

    I have this expression in the subComp anchor point property:

    x=3000
    if( comp(“Master”).layer(thisComp.name).effect(“TopLayer”)(“Checkbox”)== 1 ) y = 0 else y = 1080;

    [x,y]

    With this solution, I have to name all the subCompositions with the same name of the mainComps they refereed to but it’s actually not a problem for me in here.

    Thanks Kalle, I figured out i was unclear, the layer with the checkbox is a comp(mainComp) and contain another composition (the subComp), it’s not a layer with just the checkbox in. But your reply make me think to another approach.

    Have a nice day

    Tommy

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy