AEGP_LayerFlag_MOTION_BLUR and AEGP_CompFlag_ENABLE_MOTION_BLUR
Copy link to clipboard
Copied
Hi,
I have a plugin that handles its own motion blur calculation (like the Puppet tool does).
Everything works fine, I can check AEGP_CompFlag_ENABLE_MOTION_BLUR at render time so users can play with it just like any other layer.
The only issue I have is:
_If AEGP_LayerFlag_MOTION_BLUR is disabled, which is the option I chose now, AE doesn't compute motion blur on this layer and I can render my own motion blur.
BUT, I don't get a render call when AEGP_CompFlag_ENABLE_MOTION_BLUR is modified, and AE caches wrong data.
_If AEGP_LayerFlag_MOTION_BLUR is enabled, AE computes motion blur as it should and triggers a rerender when AEGP_CompFlag_ENABLE_MOTION_BLUR changes, but my own motion blur is just added to AE's one, which is not good.
So, is there any way to either have AEGP_LayerFlag_MOTION_BLUR enabled but tell AE not to render motion blur on this layer, or to get a render call when AEGP_CompFlag_ENABLE_MOTION_BLUR is modified?
I still can check the flag at idle time, but then I have to keep track of active comp, the layer index and the effect index... And even so, to force re-render, I would have to change a hidden parameter value, and that would invalidate all the cached data for nothing.
Any idea?
Thanks,
François
Copy link to clipboard
Copied
use PF_OutFlag2_I_MIX_GUID_DEPENDENCIES, and factor in the comp's motion blur state in GuidMixInPtr() during pre-render.
that ought to do the trick.
Copy link to clipboard
Copied
Thanks Shachar!
I never understood what PF_OutFlag2_I_MIX_GUID_DEPENDENCIES was here for... I guess it's time to give it a try!
Cheers,
François
Copy link to clipboard
Copied
in short:
AE calls the pre-render function, and asks the effect "so... what's the
state of all the info that will affect this frame's render?" (besides the
params and inputs ect that AE checks by itself).
your effect can then factor in some sequence data bit, comp switches, data
from other layers, NBA playoffs standings, whatever you see as necessary.
if the resulting guid (or checksum, if you will) is the same is the one
stored in the frame cache, AE will use the cached frame. if not, a render
call will be sent.
what are the limitations? you still rely on AE to send over the pre-render
call to see if a render is needed. if your plug-in relies on some VERY
obscure stuff such as the name of a layer in some unrelated comp... AE
might not think it needs to check your effect for a possible change.
i think a comp switch will not give you such a problem, but you'll just
have to check and see...
On Thu, Jun 28, 2018 at 11:38 PM, françois leroy <forums_noreply@adobe.com>

