Aex SDK layer parameter and effectworld problem
I'm developing an aex plugin that can grap a still frame and replace all the images with this frame for reference purpose. My idea is that when I press a UI button, the src data will copy to a param layer through effectworld suite and then fetch this data in the render function.
so, I write this in my UserChangedParam function:
AEGP_SuiteHandler suites(in_data->pica_basicP);
if (which_hitP->param_index == SKELETON_SNAPSHOT) {
// example of modifying parameter
// params[SKELETON_GAIN]->u.fs_d.value = 50.0;
// params[SKELETON_GAIN]->uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;
if (PF_Quality_HI == in_data->quality) {
ERR(suites.WorldTransformSuite1()->copy_hq(in_data->effect_ref,
¶ms[SKELETON_INPUT]->u.ld,
¶ms[SKELETON_LAYER]->u.ld,
NULL,
NULL;
}
else {
ERR(suites.WorldTransformSuite1()->copy(in_data->effect_ref,
¶ms[SKELETON_INPUT]->u.ld,
¶ms[SKELETON_LAYER]->u.ld,
NULL,
NULL));
}
//ERR(PF_ABORT(in_data));
}
I guess it's not a proper way to do this and I got error of bad paremters in AE, or is it possible to create a effectworld object somewhere to store this frame and use it in render for all frame, any idea? Thanks.