hi.
it is possible to simultaneously use custom ui in effect window and composition window?
thanks
rado
yes it is.
it's not even tricky.
just make sure you respond to the correct window when AE calls you with an EVENT. (it states that in the event data struct)
every call is either for the ECW, in which case you should tell what param you're talking about (if you have more than one custom UI in the ECW),
or layer window/comp window, where there is only one display at a time.
yes, so it should work, but there's a problem, give examples.
In the CCU sample project who all have, insert another custom ui parameter, if the plugin launch after effect crash.
Here is new code :
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_FIXED( STR(StrID_X_Slider_Name),
CCU_RADIUS_MIN,
CCU_RADIUS_BIG_MAX,
CCU_RADIUS_MIN,
CCU_RADIUS_MAX,
CCU_RADIUS_DFLT,
SLIDER_PRECISION,
DISPLAY_FLAGS,
0,
X_SLIDER_DISK_ID);
AEFX_CLR_STRUCT(def);
PF_ADD_FIXED( STR(StrID_Y_Slider_Name),
CCU_RADIUS_MIN,
CCU_RADIUS_BIG_MAX,
CCU_RADIUS_MIN,
CCU_RADIUS_MAX,
CCU_RADIUS_DFLT,
SLIDER_PRECISION,
DISPLAY_FLAGS,
0,
Y_SLIDER_DISK_ID);
AEFX_CLR_STRUCT(def);
PF_ADD_POINT( STR(StrID_Center_Name),
CCU_PTX_DFLT,
CCU_PTY_DFLT,
RESTRICT_BOUNDS,
CENTER_DISK_ID);
/////////////////////////////////////////////////////
// inserted new custom ui param
/////////////////////////////////////////////////////
AEFX_CLR_STRUCT(def);
def.ui_flags = PF_PUI_CONTROL;
PF_ADD_POINT( STR(StrID_Center_Name),
CCU_PTX_DFLT,
CCU_PTY_DFLT,
RESTRICT_BOUNDS,
CENTER_DISK_ID+1);
if (!err) {
PF_CustomUIInfo ci;
AEFX_CLR_STRUCT(ci);
ci.events = PF_CustomEFlag_EFFECT;
ci.comp_ui_width = ci.comp_ui_height = 0;
ci.comp_ui_alignment = PF_UIAlignment_NONE;
ci.layer_ui_width = 0;
ci.layer_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
ci.preview_ui_width = 0;
ci.preview_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
err = (*(in_data->inter.register_ui))(in_data->effect_ref, &ci);
}
//////////////////////////////////////////////////////
AEFX_CLR_STRUCT(def);
if (!err) {
PF_CustomUIInfo ci;
AEFX_CLR_STRUCT(ci);
ci.events = PF_CustomEFlag_COMP;
ci.comp_ui_width = ci.comp_ui_height = 0;
ci.comp_ui_alignment = PF_UIAlignment_NONE;
ci.layer_ui_width = 0;
ci.layer_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
ci.preview_ui_width = 0;
ci.preview_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
err = (*(in_data->inter.register_ui))(in_data->effect_ref, &ci);
}
out_data->num_params = CCU_NUM_PARAMS+1;
return err;
}
Can you advise where is the problem?
thanks
rado.
the block where you register the custom UI should only appear once for all
the effects together, and not once for every custom UI param.
and the following line:
ci.events = PF_CustomEFlag_EFFECT;
should read:
ci.events = PF_CustomEFlag_EFFECT | PF_CustomEFlag_COMP;//and also layer
if you need it.
just to make sure, the block i said should appear only once is the
following:
PF_CustomUIInfo ci;
AEFX_CLR_STRUCT(ci);
ci.events =
PF_CustomEFlag_COMP | PF_CustomEFlag_EFFECT;
ci.comp_ui_width = ci.comp_ui_height
= 0;
ci.comp_ui_alignment = PF_UIAlignment_NONE;
ci.layer_ui_width = 0;
ci.layer_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
ci.preview_ui_width = 0;
ci.preview_ui_height = 0;
ci.layer_ui_alignment = PF_UIAlignment_NONE;
err =
(*(in_data->inter.register_ui))(in_data->effect_ref, &ci);
North America
Europe, Middle East and Africa
Asia Pacific