Skip to main content
Inspiring
May 11, 2023
Answered

SDK Render layer as is

  • May 11, 2023
  • 1 reply
  • 1649 views

Hi

 

I have a c++ effect which I'm only using for settings. I would like to be able to add it to a layer and nothing on the layer will change visually. Kind of like a Slider Exp Control, but with more settings.

What would be the simpliest and most processor friendly way of doing that?

I tried to simply not call any prerender and smart render function and leave the render function empty like this. Makes the layer disapear or scrambled.

static PF_Err	
Render(	PF_InData		*in_data,
		PF_OutData		*out_data,
		PF_ParamDef		*params[],
		PF_LayerDef		*output)
{
	PF_Err	err	= PF_Err_NONE;

	AEGP_SuiteHandler	suites(in_data->pica_basicP);

	return err;
}

Should I still use the iterate function?

 

Thanks,

Jakob

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

there are a few options:

1. you can use AE's utils->Copy() function to copy the input to the output. it's pretty fast.

2. using PF_OutFlag_AUDIO_EFFECT_ONLY should make AE not call your effect for image rendering at all. it will, however call your effect for audio rendering which you'll need to implement (at least copy the input to the output). that should be faster than copying the input image buffer to the output.

3. i remember vaguely that setting the output rect size to either 0 or negavie during pre-render causes AE to skip the render... can't seem to find the info. i also remember someone here in the forum saying it didn't work for him....

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
May 11, 2023

there are a few options:

1. you can use AE's utils->Copy() function to copy the input to the output. it's pretty fast.

2. using PF_OutFlag_AUDIO_EFFECT_ONLY should make AE not call your effect for image rendering at all. it will, however call your effect for audio rendering which you'll need to implement (at least copy the input to the output). that should be faster than copying the input image buffer to the output.

3. i remember vaguely that setting the output rect size to either 0 or negavie during pre-render causes AE to skip the render... can't seem to find the info. i also remember someone here in the forum saying it didn't work for him....

Inspiring
May 11, 2023

Thank you for all the options. Can you be more specific about the "AE's utils->Copy() function"? I realy tried, but I can't figure out how to copy the inData to the outData.

Community Expert
May 11, 2023

i wasn't clear enough. copy the input buffer to the output buffer, not the input/output data.