Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions toggle TimeWarp’s adjustTimeBy property (AE scripting)

  • toggle TimeWarp’s adjustTimeBy property (AE scripting)

    Posted by Antony Dupsta on September 10, 2015 at 7:21 pm

    This is my first swing at scripting some properties. Did a bunch of searching and tried to frankenstein some code. I really do no know what I am doing so forgive this syntax if it makes no since?
    All I want to do is apply the TimeWarp effect to my footage, set the “Adjust Time By” and make the source frame 30 for my footage. This will help me make a poster frame (thumbnail) of any image sequence I bring in.

    I successfully figured out how to apply Timewarp to my layer! But I am now stuck…

    I want to select or toggle the “adjust Time By” property and set the value to somewhere in the middle to skip the handle frames.

    layer(1).property(“Effects”).addProperty(“Timewarp”).property(“adjustTimeBy”);
    //stuck now as this will not toggle the property. All this does is apply Timewarp with its default “Speed” property set to 50%. I want to toggle into the adjustTimeBy and set the source to a value.

    Again I am stuck here. Or if you have another solution I am all ears.
    I started reading about how to do this last night, so pretty green with this. If you can keep it simple I might be able to figure it out.
    Thanks for your help!

    layer(1).property("Effects").addProperty("Timewarp").property("adjustTimeBy");
    //stuck now as this will not toggle the property. All this does is apply Timewarp with its default "Speed" property

    Antony Dupsta replied 10 years, 12 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 10, 2015 at 8:45 pm

    Try it this way:

    var comp = app.project.activeItem;
    var timeWarp = comp.layer(1).property(“Effects”).addProperty(“Timewarp”);
    timeWarp.property(“Adjust Time By”).setValue(2);
    timeWarp.property(“Source Frame”).setValue(30);

    Dan

  • Antony Dupsta

    September 10, 2015 at 10:14 pm

    Bless you Dan you Saint!

    I spent so much time trying to figure out how to toggle this and it was a set value of 2. Ha. How is one suppose to know it is not a true or false? Well day two of coding so this is really cool! Thanks again Dan.
    I tried to run the gimmeprops to read the property names. That script will not run for me? I am sure I am doing something wrong
    Have a great day. In three hours you helped me…That is better than the police responding to a car accident. LOL!

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