Bryan Ray wrote:Simple" expressions can actually be quite complex. Take this node, for instance:
Thanks very much for your help on this, your scripting technique is far more reliable than what I was doing before - it's saved my project!
For interest of anyone else following this, I was using a 'transform' node to move an image of a kangaroo across the screen. I right-click on the transform's 'Center' control, chose the bottom 'Expression' option and entered the following in the box:
- Code: Select all
{1.3-comp.CurrentTime/80, math.abs(math.sin(comp.CurrentTime/10)/3)+0.3}
The first part changes the X of the kangaroo to move across the screen and the second part implement a sinusoidal pattern which looks like he's bouncing - works quite well for a single line!
At first I thought it wasn't working, it seemed to be okay in some places but still jumped around in an annoying way, but I now think that was some aspect of caching my old flawed way, since repeatedly making nominal edits and rerunning caused it over time to transform into a more reliable rendering.
I also hadn't appreciated the richness of options from right-clicking a control option and choosing 'modify with' - I suspect buried in that complexity is the answer to a bunch of other questions I've had about Resolve Fusion (which google has not been able to answer!)
Thanks,
Oli