Using the roto functionalities

All rotoscoping functionalities are gathered in the Roto class. For now, only the roto node can have a Roto object. The Roto by Natron and can be accessed as an attribute of the roto node:

app.Roto1.roto

Beziers and layers can be accessed via their script-name directly:

app.Roto1.roto.Layer1.Bezier1

The script-name of the roto items can be found in the settings panel of the Roto node.

Moving items within layers

In Natron, all the items in a layer are rendered from top to bottom, meaning the bottom-most items will always appear on top of the others.

You can re-organize the tree using the functions available in the Layer class.

Warning

Removing an item from a layer or inserting it in a layer will change the auto-declared variable, e.g:

fromLayer = app.Roto1.roto.Layer1
toLayer = app.Roto1.roto.Layer2
item = app.Roto1.roto.Layer1.Bezier1
toLayer.addItem(item)

#Now item is referenced from app.Roto1.roto.Layer2.Bezier1

Creating layers

To create a new BezierCurve, use the createLayer() function made available by the Roto class.

Creating shapes

To create a new BezierCurve, use one of the following functions made available by the Roto class:

  • createBezier(x,y,time)
  • createEllipse(x,y,diameter,fromCenter,time)
  • createRectangle(x,y,size,time)

Once created, the bezier will have at least 1 control point (4 for ellipses and rectangles) and one keyframe at the time specified in parameter.