nuke.curveknob.Stroke
- class nuke.curveknob.Stroke
Bases:
_curveknob.Element
A paint stroke, which may be animated.
A paint stroke is represented as a sequence of AnimControlPoint objects. You can find out how many control points there are in the stroke using python’s built-in len() function; and you can access individual control points using the array-style syntax (e.g. stroke[0] returns the first control point, stroke[-1] returns the last control point, etc.).
Methods
Add a new control point to the stroke.
Bake out a curve for the path of this stroke at the specified time.
Gets the collection of attributes for this stroke.
Check whether a particular flag is set or not.
Gets the transform for this shape.
Get the value of the visible attribute at a particular time.
Insert a new control point in the stroke before the given index.
Remove the control point at the given index.
Returns a string representation of the given element.
Set a particular flag.
Set the value of the visible attribute at a particular time.
Attributes
Whether this element is locked.
The name for this element.
- append(controlPoint) None
Add a new control point to the stroke. The controlPoint parameter must be either an instance of the AnimControlPoint class, or something we can convert to an AnimControlPoint. This includes a sequence of 2, 3 or 4 floats; or a CVec2, CVec3 or CVec4 object.
- clone() elementCreate clone of element
- evaluate(time, viewName='default') CubicCurve
Bake out a curve for the path of this stroke at the specified time. :param time: The (floating point) frame number to bake the curve from. :param viewName: Optional parameter specifying which view to bake the curve from. If omitted, the default view will be used.
- getAttributes() AnimAttributes
Gets the collection of attributes for this stroke.
- getFlag(flag) bool
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.
- getTransform() AnimCTransform
Gets the transform for this shape.
- getVisible(time) bool
Get the value of the visible attribute at a particular time.
- insert(index, controlPoint) None
Insert a new control point in the stroke before the given index. The controlPoint parameter must be either an instance of the AnimControlPoint class, or something we can convert to an AnimControlPoint. This includes a sequence of 2, 3 or 4 floats; or a CVec2, CVec3 or CVec4 object.
- locked
Whether this element is locked.
- name
The name for this element.
- remove(index) None
Remove the control point at the given index. If the index is out of bounds, an IndexError will be raised.
- serialise() string
Returns a string representation of the given element.
- setFlag(flag, value) None
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.
- setVisible(time, value) None
Set the value of the visible attribute at a particular time. value must be a bool.