Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression works unless key framed?

  • expression works unless key framed?

    Posted by Jim Cascarina on March 23, 2011 at 2:55 pm

    Hi
    I have an expression that turns transparency full on or full off depending on how many degrees a control layer is rotated.

    It all works fine until I lay a keyframe on the control layer then the last visible layer is stuck on?

    I can see the numbers change as the time line runs but the image remain constant?

    baffled

    if (comp("SceneSetup").layer("cntrl").transform.rotation ==1 ) 100 else 0

    Dan Ebberts replied 15 years, 5 months ago 2 Members · 7 Replies
  • 7 Replies
  • Dan Ebberts

    March 23, 2011 at 6:27 pm

    This sounds like the situation that occurs when an expression is referencing a keyframed property in a different comp and the two comps are offset in time. Is that the case here? If so, you’ll have to compensate for that in your expression, probably by using valueAtTime().

    Dan

  • Jim Cascarina

    March 23, 2011 at 8:06 pm

    its happening on two comps one is time remapped so that makes sense, the other however is straight forward and in sync?

    I’m not at work now but have been thinking could it be because my control objects are text layers?

  • Dan Ebberts

    March 23, 2011 at 10:20 pm

    It shouldn’t matter that the control layers are text layers. The only other thing I can think of is that your keyframed rotation values might not be exactly 1, so you might be better off checking for a range of values near 1. Hard to say though without seeing it.

    Dan

  • Jim Cascarina

    March 23, 2011 at 10:38 pm

    Cheers Dan,

    visually it was hitting whole numbers?
    If I can’t work it out in the morning I might have to upload a setup.

    thanks again

  • Jim Cascarina

    March 24, 2011 at 10:51 am

    Dan as always you’re right.

    now I’m back at work I can see both troublesome comps are in a time remapped comp!

    I’m just reading up about valueAtTime() and then it should be full steam ahead.

    many thanks

    Jim

  • Jim Cascarina

    March 24, 2011 at 2:18 pm

    Hi Dan or others,

    I’ve read but can’t get it clear in my mind.

    how can I use valueAtTime(or any other method) to get the below expression to work in a nested comp that is in a time remapped comp.

    recap it works when i rotate manually but keyframes don’t work.

    cheers

    if(comp("SceneSetup").layer("control").transform.rotation==index) 100 else 0

  • Dan Ebberts

    March 24, 2011 at 10:10 pm

    Hard to say without seeing it. Sorry.

    Dan

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