ItemBase

Inherited by: BezierCurve, Layer

Synopsis

This is an abstract class that serves as a base class for both Layer and BezierCurve. See detailed description…

Functions

Detailed Description

This class gathers all common functions to both layers and beziers. An item has both a script-name and label. The script-name uniquely identifies an item within a roto node, while several items can have the same label.

Member functions description

NatronEngine.ItemBase.getLabel()
Return type:str

Returns the label of the item, has visible in the table of the settings panel.

NatronEngine.ItemBase.getLocked()
Return type:bool

Returns whether this item is locked or not. When locked the item is no longer editable by the user.

NatronEngine.ItemBase.getLockedRecursive()
Return type:bool

Returns whether this item is locked or not. Unlike getLocked() this function looks parent layers recursively to find out if the item should be locked.

NatronEngine.ItemBase.getParentLayer()
Return type:Layer

Returns the parent layer of the item. All items must have a parent layer, except the base layer.

NatronEngine.ItemBase.getParam(name)
Parameters:namestr
Return type:Param

Returns a parameter by its script-name or None if no such parameter exists.

NatronEngine.ItemBase.getScriptName()
Return type:str

Returns the script-name of the item. The script-name is unique for each items in a roto node.

NatronEngine.ItemBase.getVisible()
Return type:bool

Returns whether the item is visible or not. On the user interface, this corresponds to the small eye. When hidden, an item will no longer have its overlay painted on the viewer, but it will still render in the image.

NatronEngine.ItemBase.setLabel(name)
Parameters:namestr

Set the item’s label.

NatronEngine.ItemBase.setLocked(locked)
Parameters:lockedbool

Set whether the item should be locked or not. See getLocked().

NatronEngine.ItemBase.setScriptName(name)
Parameters:namestr
Return type:bool

Set the script-name of the item. You should never call it yourself as Natron chooses automatically a unique script-name for each item. However this function is made available for internal technicalities, but be aware that changing the script-name of an item can potentially break other scripts relying on it.

NatronEngine.ItemBase.setVisible(activated)
Parameters:activatedbool

Set whether the item should be visible in the Viewer. See getVisible().