Skip to main content
Participating Frequently
December 28, 2020
Answered

Correct way to bypass rendering

  • December 28, 2020
  • 1 reply
  • 705 views

Hi,

I'm writing a effect plugin that doesn't need to render anything.

What is the correct way to bypass or pass-through in a render or audio_render function?

Just returning PF-Err-NONE nulls the output. I need the output to be the input.

Until now I've been setting the PF_OutFlag_AUDIO_EFFECT_ONLY flag, which avoided the problem on non-audio layers. But now I'd like to be able to add the effect to audio layers too.

Do I need to copy the input to the output manually, or is there a flag I'm missing somewhere?

 

Thanks in advance.

This topic has been closed for replies.
Correct answer shachar carmi

i vaguely remember that setting the output rectangle during pre-render to a 0 sized rect tells AE to skip the render... or was if to a rect where the right value is smaller than the left value? anyways, i only vaguely remember that, so you'll need play with it some.

 

in a similar situation, i just copy the input to the output. the overhead is negligible, even when i stack a buch of those effects, so taking the "wrong" solution here is no biggie. (IMHO)

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
December 28, 2020

i vaguely remember that setting the output rectangle during pre-render to a 0 sized rect tells AE to skip the render... or was if to a rect where the right value is smaller than the left value? anyways, i only vaguely remember that, so you'll need play with it some.

 

in a similar situation, i just copy the input to the output. the overhead is negligible, even when i stack a buch of those effects, so taking the "wrong" solution here is no biggie. (IMHO)

Participating Frequently
December 28, 2020

Thanks Shachar,

I did read that setting the width and height to 0 in Frame_Setup tells AE to ignore the next Render, but either that doesn't do what I think it does or it doesn't work. 

I tried copying the buffer across on an audio layer and it works fine and has minimal overhead, so I'm happy with that solution.

I wonder how the Slider Control effect does it. hmm.

Anyway, thanks for the help.

James Whiffin
Legend
December 28, 2020

Sorry nothing useful to add here, but wouldn't it be funny if the Slider Control effect was copying the input to the output behind our backs all this time.