|
Hi guys,
Is there a way to determine what is causing the update of a scop? Whether it is being updated through animation playback or user interaction to be exact?
I am working on a operator cashing implementation that would need this information.
Thanks for the help!
|
|
|
|
An operator is evaluated when one of its port value has changed. If playing the animation doesn’t change those port values, then the operator doesn’t need any update.
You can temporarily put a LogMessage("update") to see each time your SCOP is being evaluated.
Cheers.
|
|
|
|
Hi Christopher,
I’m looking beyond that ...
The idea is to determine whether the operator is in “playback mode” when it IS being evaluated. So I can specify whether to sample the cashed information or to generate new values.
One possible solution would be to check against current evaluation time and if it has changed to assume that there is animation playback going on. However, one can not rely on the evaluation time as it could be different from current scene time and the operator could be evaluated several times per frame during playback which makes this method unstable.
I can always make it so if cashed information exists the operator would use it all the time but that is limiting to the workflow of the operator and I would like to avoid it if possible.
Looks like the ParticleOp example might have a possible solution ... time to dig through some code.
Cheers.
|
|
|