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

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

Engaged ,
Oct 12, 2019 Oct 12, 2019

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
1.9K
Translate
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

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.

Translate
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
LATEST
You are correct, I apologize. It turns out I had a bug in my script that was leading me astray.
Translate
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