paya.runtime.plugs.BezierCurve#
- class BezierCurve(*args, **kwargs)#
Inheritance
NurbsCurveGeometryAttributeAttributePyNodeProxyUnicode- getShapeMFn()#
Returns an API function set for the shape type associated with this plug, initialised around the MObject of the data block. Useful for performing spot inspections (like
numCVs()on a curve output) without creating a shape.- Returns
The function set.
- Return type
MFnNurbsCurve
- paramAtAnchor(anchorIndex)#
This is a fixed / static-only calculation.
- Parameters
anchorIndex (int) – the anchor index
- Returns
The U parameter.
- paramsAtAnchors()#
This is a fixed / static-only calculation. It evaluates slightly more quickly than repeated calls to
paramAtAnchor().- Returns
The U parameters at each Bezier anchor root.
- Return type
[
int]
- getCVAtAnchor(anchorIndex, asPoint=None, asIndex=None, plug=False)#
- Parameters
- Returns
The point at the root CV of the specified anchor.
- Return type
- pointAtAnchor(anchorIndex, plug=False)#
- getCVsAtAnchor(anchorIndex, asPoint=None, asIndex=None, asDict=False, plug=False)#
- Parameters
anchorIndex (int) – the index of the anchor to inspect
asPoint/ap (bool) – return CV point positions (the default)
asIndex/ai (bool) – return CV indices; indices are always returned as values, not scalar outputs, even if plug is
Trueplug/p – if asPoint is requested, return point outputs, not just values; defaults to
FalseasDict/ad (bool) –
returns the information in a dictionary with the following keys:
'in': the in-tangent point or index (may be omitted)'root': the point or index for the main anchor CV'out': the out-tangent point or index (may be omitted)
Defaults to
False.
- Returns
The CV indices or positions.
- Return type
[
int] | [paya.runtime.plugs.Vector] | [paya.runtime.data.Point]
- getControlVerts(plug=False, anchors=False)#
- Parameters
plug/p (bool) – return plugs rather than values; defaults to
Falseanchors/a (bool) – organise the return into bezier anchor groups; see
paya.lib.nurbsutil.itemsAsBezierAnchors(); defaults toFalse
- Returns
The members of the
controlPointsinfo array for this curve.- Return type
- matrixAtAnchor(anchorIndex, primaryAxis, secondaryAxis, upVector=None, upObject=None, aimCurve=None, closestPoint=True, upVectorSampler=None, defaultToNormal=None, globalScale=None, squashStretch=False, plug=None)#
- Parameters
anchorIndex (int) – the index of the anchor at which to construct a matrix
primaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
upVector/upv (None, str, tuple, list,
Vector,Vector) – if provided on its own, used directly; if combined with upObject, multiplied by the object’s world matrix, similar to the ‘Object Rotation Up’ mode onmotion pathnodes; defaults toNoneupObject/uo (None, str,
Transform) – similar tomotion pathnodes, if provided on its own, used as an aiming interest (‘Object Up’ mode); if combined with upVector, the up vector is multiplied by the object’s world matrix (‘Object Rotation Up’ mode); defaults toNoneaimCurve/aic (None, str,
paya.runtime.plugs.NurbsCurve,paya.runtime.nodes.NurbsCurve,Transform) – a curve from which to pull aiming interests, similar to the option oncurveWarpnodes; defaults toNoneclosestPoint/cp (bool) – pull points from aimCurve by proximity, not matched parameters; defaults to
TrueupVectorSampler/ups (None, str,
Network,CurveUpVectorSampler) – an up vector sampler created usingcreateUpVectorSampler(); defaults toNonedefaultToNormal/dtn (bool) – when all other up vector options are exhausted, don’t fall back to any ‘default’ up vector sampler previously created using
createUpVectorSampler(setAsDefault=True); instead, use the curve normal (the curve normal will be used anyway if no default sampler is defined); defaults toFalseglobalScale/gs (None, float, str,
Math1D) – a baseline scaling factor; note that scale will be normalized in all cases, so if this is value rather than a plug, it will have no practical effect; defaults toNonesquashStretch/ss (bool) – allow squashing and stretching of the primaryAxis on the output matrix; defaults to
Falseplug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
- Returns
A matrix at the specified anchor.
- Return type
- inbetweenAnchors(numTweens=1)#
- Parameters
numTweens/num (int) – the number of anchors to insert between each pair of existing anchors; defaults to
1- Returns
The edited Bezier curve.
- Return type