Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all articles
Browse latest Browse all 73444

Dependent parameters, keyframing.

$
0
0

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!


Viewing all articles
Browse latest Browse all 73444

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>