PF_ADD_TOPIC breaks parameters within topic's values
I was experimenting with the SDK's parameters to improve my plugin user experience. Basically, I just want some settings to be collapsed in an "advanced settings" section.
To do so I used the PF_ADD_TOPIC and PF_END_TOPIC macros. The topic is well displayed in premiere in the effects pannel, but all the settings within the topic's section have a value of zero during the execution of the program, no matter the parameters within the section.
- I tested it with another plugin I am working on, and I have the exact same problem
- All of the other parameters outside the topic are working
- I tried to remove the AEFX_CLR_STRUCT but it changed nothing
static PF_Err
ParamsSetup (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE;
PF_ParamDef def;
AEFX_CLR_STRUCT(def);
PF_ADD_FLOAT_SLIDERX(
STR(StrID_Ratio_Param_Name),
TINTER_RATIO_MIN,
TINTER_RATIO_MAX,
TINTER_RATIO_MIN,
TINTER_RATIO_MAX,
TINTER_RATIO_DFLT,
PF_Precision_TENTHS,
PF_ValueDisplayFlag_PERCENT,
PF_ParamFlag_RESERVED1,
RATIO_DISK_ID
);
AEFX_CLR_STRUCT(def);
PF_ADD_COLOR(
STR(StrID_Color_Param_Name),
TINTER_DEFAULT_RED,
TINTER_DEFAULT_GREEN,
TINTER_DEFAULT_BLUE,
COLOR_DISK_ID
);
AEFX_CLR_STRUCT(def);
PF_ADD_TOPIC(
STR(StrID_Debug_Topic),
DEBUG_TOPIC_DISK_ID
);
AEFX_CLR_STRUCT(def);
PF_ADD_FLOAT_SLIDER(
STR(StrID_Border_Width),
BORDER_MIN_WIDTH,
BORDER_MAX_WIDTH,
BORDER_MIN_WIDTH,
BORDER_MAX_WIDTH,
AEFX_AUDIO_DEFAULT_CURVE_TOLERANCE,
BORDER_DEFAULT_WIDTH,
PF_Precision_INTEGER,
PF_ValueDisplayFlag_PIXEL,
PF_FSliderFlag_NONE,
BORDER_WIDTH_DISK_ID
);
AEFX_CLR_STRUCT(def);
PF_END_TOPIC(
DEBUG_TOPIC_DISK_ID
);
AEFX_CLR_STRUCT(def);
out_data->num_params = PLUGIN_NUM_PARAMS;
return err;
}Here is the related part of my header file :
#define TINTER_RATIO_MIN 0
#define TINTER_RATIO_MAX 100
#define TINTER_RATIO_DFLT 50
#define TINTER_DEFAULT_RED 255
#define TINTER_DEFAULT_GREEN 255
#define TINTER_DEFAULT_BLUE 255
#define BORDER_MIN_WIDTH 0
#define BORDER_MAX_WIDTH 0
#define BORDER_DEFAULT_WIDTH 5
enum {
// Always keep first
PLUGIN_INPUT = 0,
// Effect settings
TINTER_RATIO,
TINTER_COLOR,
// Debug settings
BORDER_WIDTH,
// Always keep last
PLUGIN_NUM_PARAMS
};
enum {
// Effect settings
RATIO_DISK_ID = 1,
COLOR_DISK_ID,
// Debug settings
BORDER_WIDTH_DISK_ID,
// Topics
DEBUG_TOPIC_DISK_ID,
};Can someone tells me / spots / knows what am I doing wrong ? If you also have used this parameter in the passed, I am interested in working code snippets.
