Hi,
I was wondering how curves work with python scripts. have you somes examples ? Even if i add somes animations on an effect, i don’t understand how i can edit curve, and i don’t see it in curve editor (ui).
https://natron.readthedocs.io/en/rb-2.3/devel/PythonReference/NatronEngine/AnimatedParam.html
(example at the bottom of the doc)
I was looking for something else, more like setPointAtIndex from BezierCurve class, but i don’t understand how to use it with keyframes from animated param. No way to create interpolation ? or i need to create python expression ?
I want to transform an animated html page into a video. For animations i use gsap, and it’s custom ease Ease Visualizer - Blog - GreenSock . It can give me an output a bit like natron’s curve. So i was wondering if i could use that output to edit natron’s curve with python.
BezierCurve is for roto curves only.
all parameters have a setValueAtTime function. If the parameter is animated and there is no keyframe, this places a keyframe.
see eg DoubleParam:
https://natron.readthedocs.io/en/rb-2.3/devel/PythonReference/NatronEngine/DoubleParam.html#NatronEngine.NatronEngine.DoubleParam.setValueAtTime
never forget that a DoubleParam has all these methods:
Oh you were actually trying to edit Roto curves.
see:
- Effect — Natron 2.3.16 documentation to get the right Roto object from the roto node
- Roto — Natron 2.3.16 documentation to create a Bezier
- Roto — Natron 2.3.16 documentation to get the BezierCurve object
- BezierCurve — Natron 2.3.16 documentation to edit it