Script runs properly from keyboardinDAT shortcut, but has a pop or delay if executed anywhere else

I’m running into a really annoying bug where a script that randomizes some parameters with an interpolation from a key command works as expected, but running the exact same script from a textDAT or chopexec / button causes a pop of the parameters for a frame before the interpolation begins. This is also a problem if I mod the keyboardinDAT callbacks themselves, so I can’t imagine what is causing this single frame pop when i execute from anywhere except the key command.

In trying to hunt this down, it works properly in 2021 builds, but not in 2022. I’m gonna try to build as stripped down of an example as possible, but there are lots of dependencies in the project, with some things that aren’t for public consumption. Is there a best place that I could possibly share a git repo with some instructions as to how to reproduce for someone to dig into?

What do you mean “pop” of parameters? Have you tried the performance monitor to see if something’s happening on that frame?

You can send repo link to ivan@derivative.ca and I’ll give it a once-over. Or if it’s the one you shared earlier in the week, just add a file for this one to it…

its been stripped from that one. The script for example randomizes parameters, say RGB for a scene over n number of seconds. if i run from a key command, it works as expected, but running the script, it will pop to an extreme value for a frame and then interpolate from the original value.

I’ll scrape it together and share with you with instructions to reproduce

1 Like

I have some time to look at this this week

1 Like

Looked into this. Your key system is very different from just running a script. It’s a timing thing. If you run your button script with a run(“”, endFrame=True) it works fine. Your par value is probably initialized in a weird way that works differently at endFrame than when you call it from a script.

1 Like