A roto 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).
|
|
|
|
|
|
|
|
a new object with type S, a subtype of T
|
|
|
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value |
|
|
None
|
append(self,
shapeControlPoint)
Add a new control point to the shape. |
|
|
CubicCurve
|
evaluate(self,
curveNum,
time,
viewName='default')
Bake out a curve for the outline of this shape at the specified time. |
|
|
AnimAttributes
|
getAttributes(self)
Gets the collection of attributes for this shape. |
|
|
bool
|
getFlag(self,
flag)
Check whether a particular flag is set or not. |
|
|
AnimCTransform
|
getTransform(self)
Gets the transform for this shape. |
|
|
None
|
insert(self,
index,
shapeControlPoint)
Insert a new control point in the shape before the given index. |
|
|
None
|
remove(self,
index)
Remove the control point at the given index. |
|
|
None
|
setFlag(self,
flag,
value)
Set a particular flag. |
|
|
Inherited from Element :
clone ,
getVisible ,
serialise ,
setVisible
Inherited from object :
__format__ ,
__hash__ ,
__init__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|