Skip to main content
Inspiring
May 28, 2023
Question

How to invalidate frames after they're rendered?

  • May 28, 2023
  • 1 reply
  • 275 views

Hi there!

 

I am writing an effect plugin that does work on a thread in the background, and while working, outputs the input with a progress bar on top, just like in Warp Stabilizer and 3D Camera Tracker.

 

However, I cannot figure out how to invalidate the progress bar frames once the background work is done so AE will re-render them rather than continuing to use the cached frames.

 

I've tried a number of things - I know that changing a hidden paramter using AEGP Stream Suites could do it, but those suites throw an error when I try to access them from an IdleHook function, and UserChangedParam and UpdateParamUI don't get called often enough.

 

I have also tried using GuidMixInPtr() as in the SmartyPants SDK example, but cannot get it to work - whether I point it at a bool in global_dataP (that changes frequently) or all of global_dataP (which includes a float that changes frequently), no frames ever seem to get invalidated. I'm not sure if it's supposed to work with global data or not - if so, it seems like the ideal solution, but I unfortunately can't get it to work as intended.

 

Somehow Warp Stabilizer and 3D Camera Tracker manage to do it, so I remain optimistic that it is possible. If anyone has any insight, it would be greatly appreciated.


Thank you!

This topic has been closed for replies.

1 reply

jonah.c.lAuthor
Inspiring
May 28, 2023

I also wanted to add- I found the GuidMixInPtr actually works to invalidate frames as expected, but only after changing some parameter and then changing it back. This is contrary to the expected behavior of just invaliding the frames as soon as the data stored in the buffer passed to that function is modified. Not sure why that is.