Skip to main content
Participant
September 5, 2023
Question

How to update slider UI on value changed (not by user changed) AE SDK C++

  • September 5, 2023
  • 1 reply
  • 202 views

I have an effect with slider and checkbox, the idea is to get current time variable and apply it to the slider when checkbox is switching (by keyframes or expressions), I was able to create this functionality using PF_ChangeFlag_CHANGED_VALUE, but it works only if I manually click checkbox, so the slider is not updating if checkbox is changing by keyframes. Is there a way to do it correctly?
Thanks!

This topic has been closed for replies.

1 reply

Community Expert
September 5, 2023

well... that's a bit problematic as it doesn't play into AE's ui/render scheme. the render threads operate on a separate copy of the project, which can not be changed during render calls. so if AE is rendering frames sequentially, it can not change the value of the slider according the value of the checkbox. that can only be done via expressions.

 

even if you wish to do so only from the UI thread, the param supervision only works on user interaction and not while scrubbing the timeline. if you insist, you could implement an idle_hook and check the comp status a few times per second, but that would not correlate to the correct value being applied for each frame during render. again, that's acheivable only via expressions.

as an alternative, you could apply a keyframe for the slider on every frame after a manual change is made... you could make the slider disabled, so it's visable but not changable by the user. but even in this scenario there are accurances where changes would be missed, such as the user moving the checkbox's keyframes around.

 

i think the best solution is to apply an expression to the slider which you can to via the API.

dandensAuthor
Participant
September 6, 2023

Thanks for a such detailed answer, now it makes sense.