Skip to main content
Richard Rosenman
Inspiring
September 16, 2021
Answered

How to update modified parameters in render function?

  • September 16, 2021
  • 1 reply
  • 502 views

Hi gang;

 

I've had this issue come up a number of times.

 

In UserChangedParam and UpdateParameterUI I am modifying some parameters. Specifically, I am setting coordinates for a 'slave' point parameter based off a 'master' point parameter. This works just fine if I move the master point parameter interactively - the slave also moves accordingly.

 

However, if I animate the master point parameter, and then scrub through the timeline, the slave does not update. I assume I need to somehow force AE to update the parameter results during the render function. Does anyone have suggestions on how I can go about solving my issue?

 

Thanks!

-Richard

This topic has been closed for replies.
Correct answer shachar carmi

this is a very issuie issue.

before CC2015 it was possible to modify params during a render, but it caused a re-render loop as the changed param would invalidate the current render as it was being rendered.

since CC2015, the render thread is not allowed to modify the project in any way.

also, since MFR, multiple frames are being rendered simultaniouly, so... what should the param be set to?

 

if you're used the salve param to affect a render in any way (such as being read by expressions by other effect/layers) then i would say this design isn't supported by AE's workflow.

 

if the salve param is not used to affect the render in any way, and all you care about is the display when the user is vieweing the effect, then you can:

1. create a custom UI that redraws on time changes. use it's draw event to trigger changes in the effect.

2. create an AEGP with an idle_hook, then scan the current comp for your effect, and change the effect as needed on the fly.

1 reply

James Whiffin
Legend
September 16, 2021

Hi Richard

I believe it's not possible to update a parameter each frame, other than if the user specifically modifies another parameter. Though someone more knowledgable than me may have a roundabout way to achieve this!

shachar carmiCommunity ExpertCorrect answer
Community Expert
September 16, 2021

this is a very issuie issue.

before CC2015 it was possible to modify params during a render, but it caused a re-render loop as the changed param would invalidate the current render as it was being rendered.

since CC2015, the render thread is not allowed to modify the project in any way.

also, since MFR, multiple frames are being rendered simultaniouly, so... what should the param be set to?

 

if you're used the salve param to affect a render in any way (such as being read by expressions by other effect/layers) then i would say this design isn't supported by AE's workflow.

 

if the salve param is not used to affect the render in any way, and all you care about is the display when the user is vieweing the effect, then you can:

1. create a custom UI that redraws on time changes. use it's draw event to trigger changes in the effect.

2. create an AEGP with an idle_hook, then scan the current comp for your effect, and change the effect as needed on the fly.

Richard Rosenman
Inspiring
September 18, 2021

Thank you as always Shachar (and James).

 

I'd be utterly lost without your thoughtful  help and expertise. Thank you.

 

Richard