Trees | Indices | Help |
|
---|
|
object --+ | Element --+ | Shape
A Roto or SplineWarp shape, which may be animated. Shapes are represented as a sequence of ShapeControlPoint objects, which group together a 'center' control point along with tangent locations and feather offsets. Python's built-in len() function can be used to get the number of shape control points; and array-style access can be used to get individual shape control points (e.g. shape[0] returns the first shape control point, shape[-1] returns the last shape control point, etc.). You can create a new shape as follows: >>>import _curveknob >>>rotoNode = nuke.toNode('RotoPaint1') >>>curveKnob = rotoNode['curves'] >>>emptyShape = _curveknob.Shape( curveKnob ) >>>twoPointShape = _curveknob.Shape( curveKnob, *((0,0), (10,10)) ) >>> # perform operations on the shape(s). NOTE: this object was designed to work for Roto shapes, which have feather curves. Please report any problems with this type to support@thefoundry.co.uk
|
|||
|
|||
|
|||
|
|||
|
|||
a new object with type S, a subtype of T |
|
||
|
|||
None |
|
||
CubicCurve |
|
||
AnimAttributes |
|
||
bool |
|
||
AnimCTransform |
|
||
None |
|
||
None |
|
||
None |
|
||
Inherited from Inherited from |
|
|||
|
x.__delattr__('name') <==> del x.name
|
x.__getattribute__('name') <==> x.name
|
|
x.__setattr__('name', value) <==> x.name = value
|
Add a new control point to the shape. The shapeControlPoint parameter must be either an instance of the ShapeControlPoint class, or something we can convert to a ShapeControlPoint. This includes a sequence of 2, 3 or 4 floats; a CVec2, CVec3 or CVec4 object; or an AnimControlPoint object.
|
Bake out a curve for the outline of this shape at the specified time. Note that the feather curve is represented as an offset from the main curve. If you want to get the screen position of a point along the feather curve, you'll need to add it to the corresponding position on the main curve. For example: >>> frameNum = 10.0 >>> t = 0.5 >>> rotoknob = nuke.toNode('RotoPaint1')['curves'] >>> shape = rotoknob.toElement('Bezier1') >>> mainCurve = shape.evaluate(0, frameNum) >>> featherCurve = shape.evaluate(1, frameNum) >>> pointOnMainCurve = mainCurve.getPoint(t) >>> featherOffset = featherCurve.getPoint(t) >>> pointOnFeatherCurve = pointOnMainCurve + featherOffset
|
Check whether a particular flag is set or not. The flag parameter should be one of the constants from the FlagType class. The return value will be True if the flag is set, False if it isn't.
|
Insert a new control point in the shape before the given index. The shapeControlPoint parameter must be either an instance of the ShapeControlPoint class, or something we can convert to a ShapeControlPoint. This includes a sequence of 2, 3 or 4 floats; a CVec2, CVec3 or CVec4 object; or an AnimControlPoint object.
|
Remove the control point at the given index. This removes any associated tangent and feather point data as well. If the index is out of bounds, an IndexError will be raised.
|
Set a particular flag. The flag parameter specifies which flag to set and should be one of the constants from the FlagType class. The value parameter is a boolean value; True will set the flag, False will clear it.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Sep 25 20:04:08 2019 | http://epydoc.sourceforge.net |