2.27. XSplineContour¶
2.27.1. Synopsis¶
2.27.1.1. Functions¶
def
__eq__
(rhs)def
control_point
(index)def
get_bounding_rect
([time=0.f[, view=View( 0 )]])def
insert_point
(time, xcp[, index=UINT_MAX[, view=View()]])def
insert_point
(time, xcpd[, index=UINT_MAX[, view=View()]])def
parameter
(name_components)def
parameter_set
([name_components=list()])def
remove
()def
set_control_points
(points)
2.27.1.2. Properties¶
property
control_points
[read-write] of list ofXControlPoint
instancesproperty
psets
[read-only] of ParameterSet
2.27.2. Detailed Description¶
X-Spline contour class. Provides access to X-Spline contours and their control points.
-
XSplineContour.
control_point
(index)¶ - Return type
- Parameters
index (uint) – Control point index.
- Returns
XControlPoint
orNone
if index is invalid.
Returns x spline control point by index.
-
XSplineContour.
get_bounding_rect
([time=0.f[, view=View( 0 )]])¶ - Return type
list of float
- Parameters
time (float) – Time
view (
mocha.project.View
) – View
Returns coordinates of top left and bottomRight points of the contour bounding rectangle, considering its handles, as a list of floats [x1, y1, x2, y2]
-
XSplineContour.
insert_point
(time, xcp[, index=UINT_MAX[, view=View()]])¶ - Return type
- Parameters
time (float) – Keyframe time.
xcp (
mocha.project.XControlPoint
) – Keyframe data.index (uint) – Inserting index.
view (
mocha.project.View
) – View.
Inserts new control point into index position.
-
XSplineContour.
insert_point
(time, xcpd[, index=UINT_MAX[, view=View()]])¶ - Return type
- Parameters
time (float) – Keyframe time.
xcpd (
mocha.project.XControlPointData
) – Keyframe data.index (uint) – Inserting index.
view (
mocha.project.View
) – View.
Inserts new control point into index position.
-
XSplineContour.
__eq__
(rhs)¶ - Return type
bool
-
XSplineContour.
parameter
(name_components)¶ - Return type
- Parameters
name_components (list of strings) – Relative name for a requested parameter.
Returns
Parameter
instance bound with given name path.
-
XSplineContour.
parameter_set
([name_components=list()])¶ - Return type
- Parameters
name_components (list of strings) – Relative name for a requested parameter set.
Returns
ParameterSet
instance bound with given name path. Pass an empty list[]
to get access to the X-Spline contour parameters set.
-
XSplineContour.
remove
()¶ Removes this contour.
-
XSplineContour.
set_control_points
(points)¶
-
XSplineContour.
control_points
¶ - Type
list of
XControlPoint
instances- Access
read-write Provides access to list of
XControlPoint
instances.
-
XSplineContour.
psets
¶ - Type
- Access
read-only Provides access to the root parameter set.
Mimics parameter_set() call.