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

How to set the start frame (or time) of a composition in Automation Blocks

Explorer ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

I was trying to set the start frame of the active composition (where the start frame is 1000) using:

 

set attribute time of project item active composition to 0

 

When I run the script, I'm not seeing any change, and the console shows:

 

"execution result:undefined

destructor final end point 'main script' reached"

TOPICS
Scripting

Views

380

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

correct answers 1 Correct answer

Community Expert , Aug 05, 2022 Aug 05, 2022

The time attribute of project items is the location of the playhead. If you want to change the start timecode of the composition, you need to set the display start frame or display start time (s) which you find in the "set attribute of comp" instead of the "set attribute of project item" block (since it can onl be changed for comps and not for other project items.

Also note that in Ae scripting in general and also in Automation Blocks, internally the beginning of the comp is always time 0. This

...

Votes

Translate

Translate
Community Expert ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

The time attribute of project items is the location of the playhead. If you want to change the start timecode of the composition, you need to set the display start frame or display start time (s) which you find in the "set attribute of comp" instead of the "set attribute of project item" block (since it can onl be changed for comps and not for other project items.

Also note that in Ae scripting in general and also in Automation Blocks, internally the beginning of the comp is always time 0. This means when you work with time values, you can always rely on 0 being the beginning of the comp and the "display start value" is only a cosmetic thing that Ae adds when showing time values in the user interface.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

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
Explorer ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

LATEST

Fantastic! That worked! Thank you!

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
Community Expert ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Oh, and a few words to the console output - this is the typical output when the script finished without any issue, here is exactly what it means:

 

"execution result:undefined"
The execution result is the value that the last executed block produced. For many blocks the "result" is undefined. If you put a "get attribute time of item" attribute at the bottom of your script, it would show the retrieved time value of the attribute instead of undefined, for eample.

 

"destructor final end point 'main script' reached"
This shows that the script exection is completely finished. In the (not yet published) Premiere Pro version of Automation Blocks, you can write scripts which wait for the render queue to finish and then perform additional tasks. Those scripts then have several "end points" - i.e. at some point the end of the 'main code' is reached, but it is not the 'final end point' yet, since the script is still waiting for the render queue to finish and plans to execute more code once that happened. In those cases, the console messages will be different and inform you that the code is still waiting for more "end points".

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

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