Skip to main content
megamau
Inspiring
May 31, 2022
Question

Frame preview start/end

  • May 31, 2022
  • 1 reply
  • 856 views

Is there a way to know when a frame preview starts or ends, or even check if it's rendering?

Here's my problem, I have a custom UI for my plugin, and when changing values interactively, AE doesn't have time to render (preview) a complete frame before the next one is requested. This means that the frame being rendered is cancelled and a new one requested. I never get a fully rendered frame until I stop changing values.

 

I want to skip frame requests if the last one is still rendering. Either by detecting if one frame is still rendering, or telling the preview renderer to not cancel my previous frame.

 

I home this makes sense.

This topic has been closed for replies.

1 reply

Community Expert
May 31, 2022

do you abort the renderin mid process, or does AE throw away your complete result?

if you're aborting, you can set a flag in your global data telling an interaction is going on, and then avoid aborting during interaction.

megamau
megamauAuthor
Inspiring
May 31, 2022

AE throws it away mid process. What I'm actually doing is changing a data parameter using AEGP_SetStreamValue. This triggers a preview frame render. In my test case a frame takes about 60ms to process, but I'm setting the parameter faster that that. The problem is even worse if the frame takes more time that that.

megamau
megamauAuthor
Inspiring
June 2, 2022

good question... i'm not sure there's something you could do about it. i think that's just how AE behaves with long processing times while interacting...

i'm trying to think of some workaround.


Is it possible to at least know how long the last preview frame took? I see the elapsed time shows at the bottom left of AE's window (Frame Render Time). 

I could use that to calculate an average and use it as frameskip.