Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression not working across comps

  • Expression not working across comps

    Posted by David Cabestany on February 10, 2015 at 9:52 pm

    I have an extremely basic expression, just linking the opacity of one layer in one comp to the opacity of another layer in the outer comp. Nothing fancy.

    The numbers in the property change to red and the expression is active, however the result and the values do not change.

    I’m running AE CC 2014 and as far as I know I’m updated to the latest version and all the other expressions in the project seem to run just fine.

    Is this a bug?

    Thanks,
    D.

    comp("MAIN BODY").layer("KELLIANN BLONDE WAITRESS").transform.opacity

    David Cabestany replied 11 years, 6 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 10, 2015 at 11:26 pm

    >Is this a bug?

    Probably not. Is the comp with the expression a sub-comp in the main comp, and doesn’t start at time=0 and only exhibits the problem when you keyframe the opacity in the main comp? If so, that’s a pretty common situation, which you can fix by compensating for the time difference in the two comps with something like this:

    C = comp(“MAIN BODY”);
    ctrl = C.layer(“KELLIANN BLONDE WAITRESS”).transform.opacity;
    L = C.layer(thisComp.name);
    ctrl.valueAtTime(time+L.startTime)

    another possibility is that you have more than one comp or layer with the same name.

    Dan

  • David Cabestany

    February 10, 2015 at 11:51 pm

    Whoa!! It worked, thanks!!!

    But I can’t understand why, as far as I know (which admitted;y is very little) the other way should work fine and I even tried it in different comps and machines and everything was ok.

    Do you mind elaborate about this time difference problem? I never ran into it before.

    Thanks again.
    David.

  • Dan Ebberts

    February 11, 2015 at 12:29 am

    The only way you wouldn’t have run into the problem before (assuming you have the time offset) is if you didn’t keyframe the value in the main comp (if you just scrub the value it will track fine). Is it possible that was the case (no keyframes) in your other setups?

    Dan

  • David Cabestany

    February 11, 2015 at 1:16 am

    And here I am thinking I had finally mastered expressions, back to square one for me.

    I can’t remember a specific case where I linked two properties in different comps with expressions but if it worked then most likely there was no keyframes in neither comp.

    I’ll add this new one to my list of expressions that I quite not understand but use often.

    Thanks a lot for your help,
    David.

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