Copy link to clipboard
Copied
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!
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);
}
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now