Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Extendscript syntax for disabling stopwatch on layer property

  • Extendscript syntax for disabling stopwatch on layer property

    Posted by Rob Coakley on September 5, 2014 at 3:30 pm

    I cant seem to find the property that will allow disabling the stopwatch or keyframes on a layer property. I found “app.project.item(index).layer(index).propertySpec.isTimeVarying” but it is only read-only.

    I am currently working on an extendscript that will supplement clean up of an imported Maya ASCII File.
    When a Maya ASCII is imported all properties are keyed on every frame. I would like to disable Time-vary from some of the properties after the file is imported.


    Matthias Stoll replied 4 years ago 4 Members · 3 Replies
  • 3 Replies
  • Walter Soyka

    September 5, 2014 at 4:20 pm

    I would use removeKey() iteratively on every keyframe in the property, from the last one to the first.

    prop = app.project.item(index).layer(index).propertySpec;
    numKeys = prop.numKeys;
    for (i=numKeys; i>0; i--) prop.removeKey(i);

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Dr Greenlaw

    March 25, 2015 at 7:38 pm

    This was exactly what I needed to learn today. Thank you!


    Artist/Parter | Little Green Dog –
    Senior Digital Artist | Rhythm & Hues Studio – http://www.rhythm

  • Matthias Stoll

    April 28, 2020 at 3:00 pm

    In my case, I was looping through many properties, some have keyframes some don’t.
    If there is no keyframe the script tries to perform a for loop from 0 to greater than 0 by substraction.

    I found it easiest to just add an if condition.

    if(property.numKeys != 0){
    for (var i = (property.numKeys); i>=0; i--){property.removeKey(i)}

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