The documentation details the ways to create different types of objects:
Beziers = app.Roto1.roto.createBezier(x,y,time)
Ellipses = app.Roto1.roto.createEllipse(x, y, diameter, fromCenter, time)
Rectangle = app.Roto1.roto.createRectangle(x, y, size, time)
but I couldn’t find a way to create a new pencil object. I already tried with createPencil, but it doesn’t work. What is the way to create this object?
The ‘createStroke’ function is declared in the program’s source code (file:Natron/Engine/PyRoto.cpp), but it is not recognized in the scriptEditor and its parameters are not the same as the others.
Mr. Kepzie (Alexandre) worked on that part of the code but it has been inactive for a long time.
I didn’t find that function again when reviewing the file (?), but it seems that pencil objects cannot be created from the Python editor.
The simplest solution is to create a file with the predefined curves and copy them manually.