I'm looking for some help creating dependent parameters that interact correctly with keyframing/expressions/scrubbing.
As an example imagine I have 2 float sliders: SLIDER1 and SLIDER2. I want my effect to copy the value of slider1 into slider2. I've discovered the PF_ParamFlag_SUPERVISE flag, so when the user adjusts slider1 I can copy the value into slider2 during the PF_Cmd_USER_CHANGED_PARAM callback:
params[SLIDER2]->u.fs_d.value = params[SLIDER1]->u.fs_d.value;
params[SLIDER2]->uu.change_flags |= PF_ChangeFlag_CHANGED_VALUE;
That works but fails when SLIDER1 has been keyframed (or uses an expression). If I add 2 keyframes on SLIDER1 and then just scrub the timeline then PF_Cmd_USER_CHANGED_PARAM is never called. The supervisor sample just seems to use a non time-varying supervised parameter so that's not so helpful.
Are there any callbacks/flags/idioms/hacks to create the effect I want? It's not ideal but I'm thinking about baking keyframes in SLIDER2 whenever SLIDER1 is changed :-(
Thanks!