Trees | Indices | Help |
|
---|
|
object --+ | nuke.Knob --+ | CurveKnob
The knob which holds the tree of paint elements (Layers, Shapes and Strokes).
Most operations are performed on the tree itself, or its elements, rather than through the knob. You can get the root of the tree through the knob's rootLayer property, or you can get straight to a specific element using the toElement() method.
A common usage scenario is as follows:
>>> knob = nuke.toNode('RotoPaint1')['curves'] >>> root = knob.rootLayer >>> # perform operations on the root layer.
Creating any new shapes, strokes or layers will require you to pass in a reference to the knob, so it's worth storing the reference in a variable.
|
|||
|
|||
|
|||
|
|||
None |
|
||
[selectedObjects] | |||
Element |
|
||
Inherited from Inherited from |
|
|||
curveWidget Curve Widget |
|||
rootLayer The root layer. |
|||
Inherited from |
|
x.__delattr__('name') <==> del x.name
|
x.__getattribute__('name') <==> x.name
|
x.__setattr__('name', value) <==> x.name = value
|
Call this after performing updates on the tree, to tell it that it's been updated. For many operations this is called automatically, but you can call it manually for those cases where it isn't.
|
Takes a path which identifies a particular element in the curve tree and returns the corresponding Layer, Stroke or Shape object. The path is a slash separated string and is always resolved relative to the root layer. So if, for example, you have a RotoPaint node with a layer called 'Layer1' which contains a shape called 'Shape1', the path to the shape would be 'Layer1/Shape1'. >>> knob = nuke.toNode('RotoPaint1)['curves'] >>> shape = knob.toElement('Layer1/Shape1') >>> shape.name 'Shape1'
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Nov 23 08:52:25 2012 | http://epydoc.sourceforge.net |