• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to move layer back and forward in time (After Effects)

Engaged ,
Oct 12, 2019 Oct 12, 2019

Copy link to clipboard

Copied

In After Effects, suppose I have a layer with keyframes and I want to move its position in time. I can't just set it using 

 

myLayer.startTime = new_start_time
 
because that doesn't move the keyframes along with it.  I essentially want the exact same effect as dragging a layer to the left or right (as you would in the GUI) but with scripting: You can see what I mean here: https://imgur.com/qpIilCw
 
How do I move a layer and its keyframes with scripting?
TOPICS
Expressions , Scripting

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 12, 2019 Oct 12, 2019

Copy link to clipboard

Copied

Well, not sure how this isn't working for you, because it does work as expected - layer.startTime does move layer and its keyframes to a new time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 12, 2019 Oct 12, 2019

Copy link to clipboard

Copied

LATEST
You are correct, I apologize. It turns out I had a bug in my script that was leading me astray.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines