paya.runtime.nodes.NurbsCurve#
- class NurbsCurve(*args, **kwargs)#
Inheritance
NurbsCurve
CurveShape
CurveShape
DeformableShape
DeformableShape
GeometryShape
GeometryShape
Shape
Shape
DagNode
DagNode
Entity
Entity
ContainerBase
ContainerBase
DependNode
DependNode
PyNode
ProxyUnicode
- classmethod create(*points, degree=3, name=None, bSpline=False, parent=None, displayType=None, conformShapeName=None, intermediate=False, lineWidth=None, dispCV=True)#
Draws static or dynamic curves.
- Parameters
*points (list, tuple, str,
Vector
,Point
,Vector
) – the input points; can be values or attributesbSpline/bsp (bool) – only available if degree is 3; draw as a bSpline (similar to drawing by EP); defaults to False
degree/d (int) – the curve degree; defaults to 3
parent/p (None, str,
Transform
) – an optional destination parent; no space conversion will take place; if the parent has transforms, the curve shape will be transformed as well; defaults to Nonename/n (str) – the shape name; defaults to
None
conformShapeName/csn (bool) – ignored if parent was omitted; rename the shape after it is reparented; defaults to True if parent was provided, otherwise False
intermediate (bool) – set the shape to intermediate; defaults to False
displayType/dt (None, int, str) –
if provided, an index or enum label:
0: ‘Normal’
1: ‘Template’
2: ‘Reference’
If omitted, display overrides won’t be activated at all.
dispCV/dcv (bool) – display CVs on the curve; defaults to True
lineWidth/lw (None, float) – an override for the line width; defaults to None
- Returns
The curve shape.
- Return type
- classmethod createArc(*points, directionVector=None, radius=1.0, toggleArc=False, sections=8, degree=3, guard=None, name=None, conformShapeName=None, lineWidth=None)#
Constructs a circular arc. The arc will be live if any of the arguments are plugs.
- Parameters
points (tuple, list,
Point
,Vector
) – two or three points, packed or unpackeddirectionVector/dv (None, tuple, list,
Vector
,Vector
) – on two-point arcs this defaults to [0, 0, 1] (Z) and defines the arc’s ‘normal’; on three point arcs it must be provided explicitly if ‘guard’ is requested, and it is used to jitter the input points to avoid Maya errorsradius/r (float,
Math1D
) – for two-point arcs only: the arc radius; defaults to 1.0toggleArc/tac (bool) – for two-point arcs only: draw the arc on the outside; defaults to False
sections/s (int,
Math1D
) – the number of arc sections; defaults to 8degree/d (int,
Math1D
) – the arc degree; defaults to 3guard (bool) – for three-point arcs only: prevent the arc from disappearing with an error when the input points are collinear; defaults to True if directionVector was provided, otherwise False.
lineWidth/lw (None, float) – an override for the line width; defaults to None
name/n (str) – the shape name; defaults to
None
conformShapeName/csn (bool) – ignored if parent was omitted; rename the shape after it is reparented; defaults to True if parent was provided, otherwise False
- Returns
The curve shape.
- Return type
- classmethod createFromMacro(macro, **overrides)#
- Parameters
- Returns
A curve constructed using the macro.
- Return type
- macro(includeShapeDetails=False)#
- Parameters
includeShapeDetails (bool) – include information on overrides; defaults to
False
- Returns
A simplified representation of this curve that can be used by
createFromMacro()
to reconstruct it.- Return type
- classmethod normalizeMacro(macro)#
Used by the shapes library to fit control points inside a unit cube. This is an in-place operation; the method has no return value.
- Parameters
macro (dict) – the macro to edit
- length(worldSpace=False, plug=False)#
Overloads the base PyMEL method to implement worldSpace and plug.
- getCollocatedCVGroups(tolerance=1e-06)#
- Parameters
tolerance/tol (float) – the collocation tolerance; defaults to 1e-7
- Returns
A list of lists, where each sub-list comprises CVs which are collocated.
- Return type
[[
NurbsCurveCV
]]
- clusterAll(merge=False, tolerance=1e-06)#
Clusters-up the CVs on this curve.
- info(reuse=True, plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.info()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.info()
:- Parameters
- Returns
If plug is
True
, acurveInfo
node; otherwise, a dictionary with the following keys:'arcLength'
,'controlPoints'
,'knots'
- Return type
dict
|paya.runtime.nodes.CurveInfo
- motionPath(**config)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.motionPath()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.motionPath()
:Creates a
motionPath
node and connects it to this curve. All other configuration is performed via config.- Parameters
**config – a source: plug mapping to configure the node’s attributes; sources can be plugs or values
- Returns
The
motionPath
node.- Return type
- motionPathAtParam(param, **config)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.motionPathAtParam()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.motionPathAtParam()
:Creates a
motionPath
and hooks it up to the specified parameter. All other configuration is performed via **config*. Flags uValue and fractionMode will always be overriden.- Parameters
param – the parameter at which to create the
motionPath
node**config – a source: plug mapping to configure the node’s attributes; sources can be plugs or values
- Rtype param
float,
Math1D
- Returns
The
motionPath
node.- Return type
- motionPathAtFraction(fraction, **config)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.motionPathAtFraction()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.motionPathAtFraction()
:Creates a
motionPath
and hooks it up to the specified fraction. All other configuration is performed via **config*. Flags uValue and fractionMode will always be overriden.- Parameters
fraction – the fraction at which to create the
motionPath
node**config – a source: plug mapping to configure the node’s attributes; sources can be plugs or values
- Rtype fraction
float,
Math1D
- Returns
The
motionPath
node.- Return type
- infoAtParam(param, reuse=True, plug=None, turnOnPercentage=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.infoAtParam()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.infoAtParam()
:- Parameters
turnOnPercentage/top (bool) – per the namesake attribute on
pointOnCurveInfo
, interpret param a percentage ratio within parametric space (note that this is not the same asfractionMode
on motion paths; defaults toFalse
reuse/re (bool) – if plug is
True
, reuse any matchingpointOnCurveInfo
nodes; defaults toTrue
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
- return a
pointOnCurveInfo
node rather than a dictonary of values; default is auto-configured based on arguments
- Returns
If plug is
True
, apointOnCurveInfo
node; otherwise, a dictionary with the followingk keys:'position'
,'tangent'
,'normalizedTangent'
,'normal'
,'normalizedNormal'
- Return type
- getControlVerts(plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.getControlVerts()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.getControlVerts()
:
- getControlVert(cvIndex, plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.getControlVert()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.getControlVert()
:
- pointAt(paramOrFraction, parametric=True, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.pointAt()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.pointAt()
:Dispatches
pointAtParam()
ifparametric=True
, otherwisepointAtFraction()
.- Parameters
parametric/par (bool) – interpret paramOrFraction as a U parameter rather than a length fraction; defaults to
False
- pointAtParam(param, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.pointAtParam()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.pointAtParam()
:
- pointAtLength(length, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.pointAtLength()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.pointAtLength()
:
- pointAtFraction(fraction, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.pointAtFraction()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.pointAtFraction()
:
- nearestPoint(refPoint, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.nearestPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.nearestPoint()
:
- distributePoints(numberFractionsOrParams, parametric=False, uniform=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributePoints()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.distributePoints()
:- Parameters
numberFractionsOrParams –
one of:
a single integer value, specifying how many fraction or parameter values to return, or
a user list of fractions or parameters, which can be values or plugs
parametric/par (bool) – if numberFractionsOrParams is a number, generate parameters, not fractions; defaults to
False
uniform/uni (bool) – if generating parameters, distribute them by length, not parametric space; defaults to
False
plug/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 list of point values or plugs.
- Return type
- paramAtStart(plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.paramAtStart()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.paramAtStart()
:
- paramAtEnd(plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.paramAtEnd()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.paramAtEnd()
:
- knotDomain(plug=False, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.knotDomain()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.knotDomain()
:
- paramAtPoint(point, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.paramAtPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.paramAtPoint()
:This is a ‘forgiving’ implementation, and uses the closest point.
- Alias
nearestParam
- Parameters
- Returns
The nearest parameter to the reference point.
- Return type
- paramAtFraction(fraction, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.paramAtFraction()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.paramAtFraction()
:
- paramAtLength(length, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.paramAtLength()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.paramAtLength()
:
- distributeParams(numberFractionsOrParams, parametric=False, uniform=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeParams()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.distributeParams()
:- Parameters
numberFractionsOrParams (
float
, [float
|Math1D
]) –one of:
a single integer value, specifying how many fraction or parameter values to return, or
a user list of fractions or parameters, which can be values or plugs
parametric/par (bool) – if numberFractionsOrParams is a number, generate parameters, not fractions; defaults to
False
uniform/uni (bool) – if generating parameters, distribute them by length, not parametric space; defaults to
False
plug/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 list of parameter plugs or values.
- Return type
- lengthAtFraction(fraction, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.lengthAtFraction()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.lengthAtFraction()
:
- lengthAtParam(param, plug=None, checkDomain=True, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.lengthAtParam()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.lengthAtParam()
:Differs from the PyMEl / API
findLengthFromParam()
in that it returns properly-spaced curve lengths.- Parameters
param (float,
Math1D
) – the parameter to inspectcheckDomain/cd (bool) – perform gating against the current curve knot domain to prevent sampling errors at the very start or end of the curve; defaults to
True
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
- Returns
The curve length at the specified parameter.
- Return type
- lengthAtPoint(point, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.lengthAtPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.lengthAtPoint()
:This is a ‘forgiving’ implementation, and uses the closest point.
- distributeLengths(numberFractionsOrParams, parametric=False, uniform=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeLengths()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.distributeLengths()
:- Parameters
numberFractionsOrParams (
float
, [float
|Math1D
]) –one of:
a single integer value, specifying how many fraction or parameter values to return, or
a user list of fractions or parameters, which can be values or plugs
parametric/par (bool) – if numberFractionsOrParams is a number, generate parameters, not fractions; defaults to
False
uniform/uni (bool) – if generating parameters, distribute them by length, not parametric space; defaults to
False
plug/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 list of lengths.
- Return type
- fractionAtPoint(point, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.fractionAtPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.fractionAtPoint()
:This is a ‘forgiving’ implementation, and uses the closest point.
- Parameters
- Returns
The length fraction at the specified point.
- Return type
- fractionAtParam(param, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.fractionAtParam()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.fractionAtParam()
:
- fractionAtLength(length, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.fractionAtLength()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.fractionAtLength()
:
- distributeFractions(number, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeFractions()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.distributeFractions()
:Convenience method. Equivalent to
floatRange(0, 1, number)
.
- normalAtParam(param, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.normalAtParam()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.normalAtParam()
:- Parameters
- Returns
The sampled vector.
- Return type
- normalAtFraction(fraction, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.normalAtFraction()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.normalAtFraction()
:- Parameters
- Returns
The sampled vector.
- Return type
- normalAtLength(length, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.normalAtLength()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.normalAtLength()
:- Parameters
- Returns
The sampled vector.
- Return type
- normalAtPoint(point, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.normalAtPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.normalAtPoint()
:- Parameters
- Returns
The sampled vector.
- Return type
- tangentAtParam(param, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.tangentAtParam()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.tangentAtParam()
:- Parameters
- Returns
The sampled vector.
- Return type
- tangentAtFraction(fraction, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.tangentAtFraction()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.tangentAtFraction()
:- Parameters
- Returns
The sampled vector.
- Return type
- tangentAtLength(length, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.tangentAtLength()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.tangentAtLength()
:- Parameters
- Returns
The sampled vector.
- Return type
- tangentAtPoint(point, normalize=False, plug=None, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.tangentAtPoint()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.tangentAtPoint()
:- Parameters
- Returns
The sampled vector.
- Return type
- distributeTangents(numberFractionsOrParams, plug=None, normalize=False, parametric=False, uniform=True, worldSpace=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeTangents()
; a worldSpace/ws keyword argument has been added, defaulting toFalse
Documentation from
paya.runtime.plugs.NurbsCurve.distributeTangents()
:- Parameters
numberFractionsOrParams –
this should either be
A number of fractions or parameters to sample along the curve, or
An explicit list of fractions or parameters at which to construct the tangents
plug/p (bool) – return attribute outputs, not values; defaults to
False
normalize/nr (bool) – normalize the tangents; defaults to
False
parametric/par (bool) – interpret numberOrFractions as parameters, not fractions; defaults to
False
uniform/uni (bool) – if parametric is
True
, and numberFractionsOrParams is a number, initial parameters should be distributed by length, not parametric space; defaults toFalse
- Returns
A list of tangents.
- Return type
- upVectorAtParam(param, sampler=None, plug=None)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.upVectorAtParam()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.upVectorAtParam()
:- Parameters
param (
float
,Math1D
) – the parameter at which to sample the up vectorplug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
sampler/sam (
str
,Network
,CurveUpVectorSampler
) – an up vector sampler to use; sampler can be created usingcreateUpVectorSampler()
; if this is omitted, then the last sampler created usingcreateUpVectorSampler(setAsDefault=True)
will be retrieved; defaults toNone
- Raises
RuntimeError – No default up vector sampler has been configured on this curve output.
- Returns
An up vector at the specified parameter. A default up vector sampler must have been configured on this curve using
createUpVectorSampler()
.- Return type
- upVectorAtFraction(fraction, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.upVectorAtFraction()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.upVectorAtFraction()
:Converts fraction into a parameter and defers to
upVectorAtParam()
.- Parameters
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
upVectorAtParam()
- upVectorAtLength(length, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.upVectorAtLength()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.upVectorAtLength()
:Finds the parameter at the specified length and defers to
upVectorAtParam()
.- Parameters
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
upVectorAtParam()
- upVectorAtPoint(point, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.upVectorAtPoint()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.upVectorAtPoint()
:Finds the closest parameter to the specified point and defers to
upVectorAtParam()
.- Parameters
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
upVectorAtParam()
- createUpVectorSampler(resolution=9, unwindSwitch=0, interpolation='Linear', aimCurve=None, closestPoint=True, upObject=None, upVector=None, parallelTransport=False, setAsDefault=True)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.createUpVectorSampler()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.createUpVectorSampler()
:Depending on options, returns one of the following up-vector samplers:
Not all options can be combined. If all options are omitted, an optimised curve normal sampler will be returned.
Use
sampleAtParam()
on the returned object to pull up vectors.- Parameters
upVector/upv (
None
,zip
,list
,tuple
,str
,Vector
,Vector
, [[float
|str
|Math1D
], [tuple
|list
,paya.runtime.data.Vector
,paya.runtime.plugs.Vector
]]) – this can be a single up vector, or zipped pairs of parameter: vector, indicating known up vectors at specific points; if a single up vector is provided then, if it’s combined with upObject, the vector is multiplied by the object’s world matrix (similar to ‘Object Rotation Up’ onmotionPath
nodes); otherwise, the vector is used on its own; if pairs are provided then they will be blended using parallel-transport or linearly (similar to IK spline twist); defaults toNone
upObject/uo (str,
Transform
) – if provided on its own, works as an aiming interest (similar to ‘Object Up’ mode onmotionPath
nodes); if combined with upVector, the object’s world matrix is used to multiply the up vector; defaults toNone
resolution/res (int) – if using parallel transport, the number of solutions to generate; higher values improve accuracy at the expense of interactivity; defaults to 9
unwindSwitch/uws (
int
,str
,Math1D
, [int
|str
|Math1D
]) –an integer value or plug, or a list of integer values or plugs (one per segment, i.e.
len(paramVectorKeys)-1
) specifying how to resolve angle- blending edge cases in per-segment parallel transport:0
(shortest, the default)1
(positive)2
(negative)
interpolation/i: –
defines how to interpolate values from param: vector pairs:
0
('None'
) (you wouldn’t normally want this)1
('Linear'
) (the default)2
('Smooth'
)3
('Spline'
)
parallelTransport/pt (bool) – use parallel-transport; defaults to False
aimCurve (str,
paya.runtime.nodes.NurbsCurve
,paya.runtime.nodes.Transform
,paya.runtime.plugs.NurbsCurve
) – an aim-curve from which to pull aiming interest points, similarly to the option oncurveWarp
nodes; defaults to NoneclosestPoint/cp (bool) – pull points from aimCurve by proximity rather than matched parameter; defaults to
True
setAsDefault/sad (bool) – make this the default fallback up vector source for other sampling operations; defaults to
True
- Raises
NotImplementedError – The requested options can’t be combined.
- Returns
The sampler system.
- Return type
- getUpVectorSamplers()#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.getUpVectorSamplers()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.getUpVectorSamplers()
:- Returns
All
up vector samplers
created on this curve output.- Return type
- getDefaultUpVectorSampler()#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.getDefault UpVectorSampler()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.getDefaultUpVectorSampler()
:- Returns
The last
up vector sampler
that was created on this curve withsetAsDefault=True
.- Return type
- clearUpVectorSamplers()#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.clearUpVectorSamplers()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.clearUpVectorSamplers()
:Removes all up vector samplers and their dependencies.
Warning
This will break any rigging that hangs off one or more of the samplers.
- matrixAtParam(param, primaryAxis, secondaryAxis, upVector=None, upObject=None, aimCurve=None, closestPoint=True, upVectorSampler=None, defaultToNormal=None, globalScale=None, squashStretch=False, plug=None)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.matrixAtParam()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.matrixAtParam()
:Note
Unlike
matrixAtFraction()
, which uses amotionPath
node, this builds off of apointOnCurveInfo
.- Parameters
param (float, str,
Math1D
) – the parameter at which to construct the matrixprimaryAxis (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 path
nodes; defaults toNone
upObject/uo (None, str,
Transform
) – similar tomotion path
nodes, 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 toNone
aimCurve/aic (None, str,
paya.runtime.plugs.NurbsCurve
,paya.runtime.nodes.NurbsCurve
,Transform
) – a curve from which to pull aiming interests, similar to the option oncurveWarp
nodes; defaults toNone
closestPoint/cp (bool) – pull points from aimCurve by proximity, not matched parameters; defaults to
True
upVectorSampler/ups (None, str,
Network
,CurveUpVectorSampler
) – an up vector sampler created usingcreateUpVectorSampler()
; defaults toNone
defaultToNormal/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 toFalse
globalScale/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 toNone
squashStretch/ss (bool) – allow squashing and stretching of the primaryAxis on the output matrix; defaults to
False
plug/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 position.
- Return type
- matrixAtFraction(fraction, primaryAxis, secondaryAxis, upVector=None, upObject=None, aimCurve=None, closestPoint=True, upVectorSampler=None, defaultToNormal=None, globalScale=None, squashStretch=False, plug=None)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.matrixAtFraction()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.matrixAtFraction()
:Note
Unlike
matrixAtParam()
, which uses apointOnCurveInfo <paya.runtime.nodes.PointOnCurveInfo
node, this builds off of amotionPath
.- Parameters
fraction (float, str,
Math1D
) – the fraction at which to construct the matrixprimaryAxis (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 path
nodes; defaults toNone
upObject/uo (None, str,
Transform
) – similar tomotion path
nodes, 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 toNone
aimCurve/aic (None, str,
paya.runtime.plugs.NurbsCurve
,paya.runtime.nodes.NurbsCurve
,Transform
) – a curve from which to pull aiming interests, similar to the option oncurveWarp
nodes; defaults toNone
closestPoint/cp (bool) – pull points from aimCurve by proximity, not matched parameters; defaults to
True
upVectorSampler/ups (None, str,
Network
,CurveUpVectorSampler
) – an up vector sampler created usingcreateUpVectorSampler()
; defaults toNone
defaultToNormal/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 toFalse
globalScale/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 toNone
squashStretch/ss (bool) – allow squashing and stretching of the primaryAxis on the output matrix; defaults to
False
plug/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 position.
- Return type
- matrixAtParamOrFraction(paramOrFraction, primaryAxis, secondaryAxis, parametric=True, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.matrixAtPa ramOrFraction()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.matrixAtParamOrFraction()
:Dispatches
matrixAtParam()
ormatrixAtFraction()
. See either of those for full parameter information.- Parameters
paramOrFraction (float, str,
Math1D
) – the parameter or fraction at which to construct a matrixprimaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
parametric (bool) – interpret paramOrFraction as a U parameter rather than a length fraction; defaults to
True
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
matrixAtParam()
or :meth:`matrixAtFraction
- Returns
A matrix at the specified position.
- Return type
- matrixAtPoint(point, primaryAxis, secondaryAxis, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.matrixAtPoint()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.matrixAtPoint()
:Finds the closest parameter to point and dispatches
matrixAtParam()
. See that method for full parameter information.- Parameters
primaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
matrixAtParam()
- Returns
A matrix at the specified position.
- Return type
- matrixAtLength(length, primaryAxis, secondaryAxis, plug=None, **kwargs)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.matrixAtLength()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.matrixAtLength()
:Finds the parameter at length and dispatches
matrixAtParam()
. See that method for full parameter information.- Parameters
length (tuple, list,
Point
,Vector
) – the partial length at which to construct the matrixprimaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to
None
**kwargs – forwarded to
matrixAtParam()
- Returns
A matrix at the specified position.
- Return type
- distributeMatrices(numberFractionsOrParams, primaryAxis, secondaryAxis, parametric=False, uniform=False, chain=False, upVector=None, upObject=None, aimCurve=None, closestPoint=True, upVectorSampler=None, defaultToNormal=None, globalScale=None, squashStretch=False, plug=None)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeMatrices()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.distributeMatrices()
:- Parameters
numberFractionsOrParams –
this should either be
A number of fractions or parameters to generate along the curve, or
An explicit list of fractions or parameters at which to construct the matrices
primaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
parametric/par (bool) – interpret numberOrFractions as parameters, not fractions; defaults to
False
uniform/uni (bool) – if parametric is
True
, and numberFractionsOrParams is a number, initial parameters should be distributed by length, not parametric space; defaults toFalse
chain/cha (bool) – aim each matrix towards the next in the series, similar to chain joints; defaults to
False
upVector/upv (
None
,str
,tuple
,list
,Vector
,Vector
, [None
|str
|tuple
|list
|Vector
|Vector
]) –either
A single up vector, or
A list of up vectors (one per matrix)
If up vectors are provided on their own, they are used directly; if they are combined with ‘up objects’ (upObject), they are multiplied by the objects’ world matrices, similar to the ‘Object Rotation Up’ mode on
motion path
nodes; defaults toNone
upObject/uo (
None
,str
,Transform
) – this can be a single transform, or a list of transforms (one per sample point); if provided on its own, used as an aiming interest (similar to ‘Object Up’ mode onmotionPath
nodes); if combined with upVector, the vector will be multiplied with the object’s matrix (similar to ‘Object Rotation Up’); defaults toNone
aimCurve/aic (None, str,
paya.runtime.plugs.NurbsCurve
,paya.runtime.nodes.NurbsCurve
,Transform
) – a curve from which to pull aiming interests, similar to the option oncurveWarp
nodes; defaults toNone
closestPoint/cp (bool) – pull points from aimCurve by proximity, not matched parameters; defaults to
True
upVectorSampler/ups (None, str,
Network
,CurveUpVectorSampler
) – an up vector sampler created usingcreateUpVectorSampler()
; defaults toNone
defaultToNormal/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 toFalse
globalScale/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 toNone
squashStretch/ss (bool) – allow squashing and stretching of the primaryAxis on the output matrix; defaults to
False
plug/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 position.
- Return type
- distributeJoints(numberFractionsOrParams, primaryAxis, secondaryAxis, parametric=False, uniform=False, upVector=None, upObject=None, aimCurve=None, closestPoint=True, upVectorSampler=None, defaultToNormal=None, globalScale=None, squashStretch=False, chain=False, displayLocalAxis=True, radius=1.0, rotateOrder='xyz', parent=None, freeze=True, decompose=True, plug=False)#
Note
Adapted from
paya.runtime.plugs.NurbsCurve.distributeJoints()
; only runs in world space.Documentation from
paya.runtime.plugs.NurbsCurve.distributeJoints()
:Distributes joints along this curve. Pass plug/p=True for live connections.
- Parameters
numberFractionsOrParams –
this should either be
A number of fractions or parameters to generate along the curve, or
An explicit list of fractions or parameters at which to construct the matrices
primaryAxis (str) – the primary (aim) matrix axis, for example ‘-y’
secondaryAxis (str) – the secondary (up) matrix axis, for example ‘x’
parametric/par (bool) – interpret numberOrFractions as parameters, not fractions; defaults to
False
uniform/uni (bool) – if parametric is
True
, and numberFractionsOrParams is a number, initial parameters should be distributed by length, not parametric space; defaults toFalse
upVector/upv (
None
,str
,tuple
,list
,Vector
,Vector
, [None
|str
|tuple
|list
|Vector
|Vector
]) –either
A single up vector, or
A list of up vectors (one per matrix)
If up vectors are provided on their own, they are used directly; if they are combined with ‘up objects’ (upObject), they are multiplied by the objects’ world matrices, similar to the ‘Object Rotation Up’ mode on
motion path
nodes; defaults toNone
upObject/uo (
None
,str
,Transform
) – this can be a single transform, or a list of transforms (one per sample point); if provided on its own, used as an aiming interest (similar to ‘Object Up’ mode onmotionPath
nodes); if combined with upVector, the vector will be multiplied with the object’s matrix (similar to ‘Object Rotation Up’); defaults toNone
aimCurve/aic (None, str,
paya.runtime.plugs.NurbsCurve
,paya.runtime.nodes.NurbsCurve
,Transform
) – a curve from which to pull aiming interests, similar to the option oncurveWarp
nodes; defaults toNone
closestPoint/cp (bool) – pull points from aimCurve by proximity, not matched parameters; defaults to
True
upVectorSampler/ups (None, str,
Network
,CurveUpVectorSampler
) – an up vector sampler created usingcreateUpVectorSampler()
; defaults toNone
defaultToNormal/dtn (bool) –
when all other up vector options are exhausted, don’t fall back to any ‘default’ up vector sampler previously created using :meth:`createUpVectorSampler(
setAsDefault=True) <createUpVectorSampler>`;
instead, use the curve normal (the curve normal will be used anyway if no default sampler is defined); defaults to
False
globalScale/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 toNone
squashStretch/ss (bool) – allow squashing and stretching of the primaryAxis on the output matrix; defaults to
False
chain/cha (bool) – create the joints as a contiguous chain with aimed, rather than tangent-based, matrix orientation; defaults to
False
displayLocalAxis/dla (bool) – display the local matrix axes; defaults to
True
radius/rad (float) – the joint display radius; defaults to 1.0
rotateOrder/ro (
None
,str
,int
,Math1D
) – the rotate order for the joint; defaults to'xyz'
parent/p (None, str,
Transform
) – an optional destination parent for the jointsfreeze/fr (bool) – zero-out transformations (except translate) at the initial pose; defaults to
True
decompose/dec (bool) –
if
False
, connect tooffsetParentMatrix
instead of driving the joint’s SRT channels; note that, if freeze is requested, the initial matrixwill always be applied via decomposition and then frozen; defaults to
True
plug/p (bool) – drive the joints dynamically; defaults to
False
- Returns
The individual joints or a chain (if chain was requested).
- Return type
- toBezier(force=False)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.toBezier()
:Converts this NURBS curve to a Bezier curve.
- Parameters
force/f (bool) – when this is
False
, this plug will be passed through as-is if it’s already a Bezier curve; defaults to False- Returns
The bezier curve.
- Return type
- toNurbs(force=False)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.toNurbs()
:Converts this Bezier curve to a NURBS curve.
- Parameters
force/f (bool) – when this is
False
, this plug will be passed through as-is if it’s already a Bezier curve; defaults to False- Returns
The NURBS curve.
- Return type
- bSpline(tolerance=0.001, keepRange=1)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.bSpline()
:- Parameters
- Returns
The B-spline.
- Return type
- subCurve(minValue, maxValue, relative=False)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.subCurve()
:Connects and configures a
subCurve
node and returns its output.- Alias
sub
- Parameters
- Returns
The sub-curve.
- Return type
- attach(*curves, blend=False, blendBias=0.5, parameter=0.1, blendKnotInsertion=False, reverse1=False, reverse2=False, multipleKnots=True)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.attach()
:Note
If more than one curves are passed-in, the result may be different from calling
detach()
per pair, because theinputCurves
array will be used on the node.- Parameters
*curves (str,
NurbsCurve
) – one or more curves to attach to this oneblend (bool) – use blended attachments; defaults to False
blendBias/bb (float,
Math1D
) – ignored if more than two curves are involved; the bias for blended attachments; defaults to 0.5blendKnotInsertion (bool) – ignored if more than two curves are involved; add a blend knot; defaults to False
parameter/p (float) – ignored if more than two curves are involved or blendKnotInsertion is False; the parameter for the blend knot; defaults to 0.1
reverse1/rv1 (bool) – ignored if more than two curves are involved; reverse the first curve; defaults to False
reverse2/rv2 (bool) – ignored if more than two curves are involved; reverse the second curve; defaults to False
multipleKnots (bool) – keep multiple knots; defaults to True
- Returns
The combined curve.
- Return type
- detach(*parameters, select=None)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.detach()
:Detaches this curve at the specified parameter(s).
- Parameters
*parameters (float,
Math1D
) – the parameter(s) at which to ‘cut’ the curveselect/sel – a subset of output indices to include in the return;
keep
attributes will configured accordingly
- Returns
- retract(length, atStart=None, atBothEnds=None)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.retract()
:Retracts this curve.
- Parameters
- Returns
The modified curve.
- Return type
- setLength(targetLength, atStart=False, vector=None, linear=None, circular=None, extrapolate=None, multipleKnots=True)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.setLength()
:Uses gated retractions and extensions to force the length of this curve.
- Parameters
targetLength (float,
Math1D
) – the target lengthatStart/ats (bool) – anchor the curve at the end rather than the start; defaults to
False
vector (None, tuple, list,
Vector
,Vector
) – a vector along which to extend; this is recommended for spine setups where tangency should be more tightly controlled; if this is omitted, the linear / circular / extrapolate modes will be used insteadcircular/cir (bool) – ignored if vector was provided; use the ‘circular’ mode of the
extendCurve
node; defaults toFalse
linear/lin (bool) – ignored if vector was provided; use the ‘linear’ mode of the
extendCurve
node; defaults toFalse
extrapolate/ext (bool) – ignored if vector was provided; use the ‘extrapolate’ mode of the
extendCurve
node; defaults toTru``e
multipleKnots (bool) – keep multiple knots; defaults to
True
- Returns
- extendByLength(length, circular=None, linear=None, extrapolate=None, atStart=None, atEnd=None, multipleKnots=True)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.extendByLength()
:- Parameters
circular (bool) – use a circular extension; defaults to
False
linear (bool) – use a linear extension; defaults to
True
extrapolate (bool) – use an extrapolated extension; defaults to
False
atStart (bool) – extend at the start of the curve; defaults to
False
atEnd (bool) – extend at the start of the curve; defaults to
True
multipleKnots/mul (bool) – preserve multiple knots; defaults to
True
- Returns
This curve output, extended accordingly.
- Return type
- extendByVector(vector, atStart=False, useSegment=False, multipleKnots=True)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.extendByVector()
:- Parameters
- Returns
This curve output, extended along the specified vector.
- Return type
- extendByPoint(point, atStart=False, useSegment=False, multipleKnots=True)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.extendByPoint()
:- Parameters
- Returns
This curve output, extended towards the specified point.
- Return type
- extend(atStart=None, atEnd=None, point=None, vector=None, length=None, multipleKnots=True, useSegment=False)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.extend()
:- Parameters
length (
float
,Math1D
) – the length to add to the curve; defaults toNone
vector (
list
[float
],str
,Vector
,Vector
) – the vector along which to extend; defaults toNone
point (
list
[float
],str
,Vector
,Vector
) – the point towards which to extend; defaults toNone
atStart – extend at the start of the curve; defaults to
False
atEnd – extend at the start of the curve; defaults to
True
useSegment/seg (bool) – uses an attached line segment for the extension (vector / point only); defaults to
False
multipleKnots/mul (bool) – preserve multiple knots; defaults to
True
- Raises
One of:
More than one of vector, point or length were specified.
Both atStart and atEnd were specified when extending with point / vector.
None of vector, point or length were specified.
The useSegment option was requested when extending by curve.
- Returns
This curve output, extended accordingly.
- Return type
- squashStretch(squashy, stretchy, globalScale=None, vector=None)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.squashStretch()
:- Parameters
squashy (
str
,Math1D
) – the user attribute to control how squashy the output should bestretchy (
str
,Math1D
) – the user attribute to control how stretchy the output should beglobalScale/gs (
str
,Math1D
) – (recommended) an attribute to use as a normalizing factor for length calculations; defaults toNone
vector/v – (recommended) an extension vector to use when the curve is under-shot (e.g. an extracted animation control axis); defaults to
None
- Returns
This curve output with added squash-stretch effects.
- Return type
- rebuild(spans=None, degree=None, keepRange=1, endKnots=0, keepEndPoints=True, keepTangents=True, keepControlPoints=False, tolerance=0.01, rebuildType=0, matchCurve=None)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.rebuild()
:Same signature as the API method. If any arguments are omitted, they are derived from the curve’s current state.
- Parameters
spans/s – the target number of spans; defaults to the current number of spans
degree/d (int, str,
Math1D
) – the target degree, one of 1, 2, 3, 5 or 7; defaults to the current degreekeepRange/kr (int, str,
Math1D
) –an integer or label for the enumerator on
rebuildCurve
, namely:0 (‘0 to 1’)
1 (‘Original’) (the default)
2 (‘0 to #spans’)
endKnots/end (int, str,
Math1D
) –an integer or label for the enumerator on
rebuildCurve
, namely:0 (‘Non Multiple end knots’)
1 (‘Multiple end knots’)
keepEndPoints/kep (bool, str,
Math1D
) – keep end points; defaults to TruekeepTangents/kt (bool, str,
Math1D
) – keep tangents; defaults to TruekeepControlPoints/kcp (bool, str,
Math1D
) – keep control points; defaults to Falsetolerance/tol (float, str,
Math1D
) – the rebuild tolerance; defaults to 0.01matchCurve/mc (str,
NurbsCurve
,NurbsCurve
,Transform
) – a curve shape or input for the ‘Match Knots’ mode; if provided, rebuildType will be overriden to 2; defaults to NonerebuildType/rt (int, str,
Math1D
) –an integer or label for the enumerator on
rebuildCurve
, namely:0 (‘Uniform’) (the default)
1 (‘Reduce Spans’)
2 (‘Match Knots’)
3 (‘Remove Multiple Knots’)
4 (‘Curvature’)
5 (‘End Conditions’)
6 (‘Clean’)
- Returns
The rebuilt curve.
- cvRebuild(numCVs, degree=None, endKnots='Multiple end knots', keepRange='Original', keepControlPoints=False, keepEndPoints=True, keepTangents=False)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.cvRebuild()
:Rebuilds this curve to the specified number of CVs.
- Parameters
degree/d (int) – the degree to build to; defaults to this curve’s (current) degree if omitted
endKnots/end –
An enum index or label:
0: ‘Non Multiple end knots’
1: ‘Multiple end knots’ (the default)
An enum index or label:
0: ‘0 to 1’
1: ‘Original’ (the default)
2: ‘0 to #spans’
keepEndPoints/kep (bool) – keep end points; defaults to True
keepTangents/kt (bool) – keep tangents; defaults to False
- Returns
The rebuilt curve.
- Return type
- cageRebuild()#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.cageRebuild()
:- Returns
A linear curve with the same CVs as this one.
- Return type
- reverse()#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.reverse()
:- Returns
The reversed curve.
- Return type
- blend(otherCurve, weight=0.5)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.blend()
:Blends this curve output towards otherCurve via an
avgCurves
node. You may get unexpected results if the curves don’t match in terms of spans, degree etc.- Parameters
otherCurve (str,
NurbsCurve
) – the curve to blend towardsweight/w (float,
Math1D
) – the blend weight; the other curve will take over fully at 1.0; defaults to 0.5
- Returns
The blended curve.
- Return type
- insertKnot(*parameters, insertBetween=None)#
Note
Attached from plug class. Plug outputs are replaced with shapes. These should be caught, as some operations may entirely replace the original shape instance. History is always preserved.
Documentation from
paya.runtime.plugs.NurbsCurve.insertKnot()
:- Parameters
*parameters (
float
|Math1D
| [float
|Math1D
]) – the parameters at, or between, which to add knotsinsertBetween/ib (bool) – if this is specified, cuts won’t be performed at the specified parameters, but rather between them; this should be a scalar, or a list of scalars (one per internal segment, i.e.
len(parameters)-1
), specifying the number(s) of cuts; defaults toNone
- Returns
The edited curve.
- Return type