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

How to get the current playhead time in an AEGP plugin?

Participant ,
Mar 14, 2024 Mar 14, 2024

I'm writing an AEGP plugin, and would like to determine the current time of the playhead. Do you know if there is a function for that in the SDK? I've been looking for about 20 minutes, and can't find it. Thanks!

TOPICS
SDK
212
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

correct answers 1 Correct answer

Participant , Mar 14, 2024 Mar 14, 2024

Aha! I figured it out. Here is some code that shows how to do it:

 

suites.ItemSuite6()->AEGP_GetActiveItem(&item);

suites.ItemSuite6()->AEGP_GetItemType(item, &itemType);

 

if (itemType == AEGP_ItemType_COMP) {

     suites.ItemSuite9()->AEGP_GetItemCurrentTime(item, &time);

}

 

Translate
Participant ,
Mar 14, 2024 Mar 14, 2024

Aha! I figured it out. Here is some code that shows how to do it:

 

suites.ItemSuite6()->AEGP_GetActiveItem(&item);

suites.ItemSuite6()->AEGP_GetItemType(item, &itemType);

 

if (itemType == AEGP_ItemType_COMP) {

     suites.ItemSuite9()->AEGP_GetItemCurrentTime(item, &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
Participant ,
Aug 07, 2025 Aug 07, 2025
LATEST

Just a note if someone is looking for this, the time won't update while rendering, meaning during playback this function will not return the current CTI position until the playback stops.

 

Also AEGP_GetLayerCurrentTime might be a better option if you want the time relative to a specific layer instead of the comp.

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