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 attributes

  • bSpline/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 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

  • 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

NurbsCurve

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 unpacked

  • directionVector/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 errors

  • radius/r (float, Math1D) – for two-point arcs only: the arc radius; defaults to 1.0

  • toggleArc/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 8

  • degree/d (int, Math1D) – the arc degree; defaults to 3

  • guard (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

NurbsCurve

classmethod createFromMacro(macro, **overrides)#
Parameters
  • macro (dict) – the type of macro returned by macro()

  • **overrides – overrides passed-in as keyword arguments

Returns

A curve constructed using the macro.

Return type

NurbsCurve.

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

dict

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.

Parameters
  • worldSpace/ws (bool) – return the world-space length; defaults to False

  • plug/p (bool) – return the length as a plug, not a value; defaults to False

Returns

The local- or world-space length of this curve.

Return type

float | Math1D

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.

Parameters
  • merge/mer (bool) – merge CVs if they overlap within the specified tolerance; defaults to False

  • tolerance/tol (float) – the merging tolerance; defaults to 1e-6

Returns

The clusters.

Return type

[Cluster]

info(reuse=True, plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.info(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.info():

Parameters
  • reuse/re (bool) – where available, retrieve an already-connected node; defaults to True

  • plug/p (bool) – return a curveInfo node rather than information in a dict; defaults to False

Returns

If plug is True, a curveInfo 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

MotionPath

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

MotionPath

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

MotionPath

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
  • param (float, Math1D) – the curve parameter to inspect

  • turnOnPercentage/top (bool) – per the namesake attribute on pointOnCurveInfo, interpret param a percentage ratio within parametric space (note that this is not the same as fractionMode on motion paths; defaults to False

  • reuse/re (bool) – if plug is True, reuse any matching pointOnCurveInfo nodes; 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

return a

pointOnCurveInfo node rather than a dictonary of values; default is auto-configured based on arguments

Returns

If plug is True, a pointOnCurveInfo node; otherwise, a dictionary with the followingk keys: 'position', 'tangent', 'normalizedTangent', 'normal', 'normalizedNormal'

Return type

PointOnCurveInfo, dict

getControlVerts(plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.getControlVerts(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.getControlVerts():

Parameters

plug/p (bool) – return plugs rather than values; defaults to False

Returns

The members of the controlPoints info array for this curve.

Return type

[Vector], [Point]

getControlVert(cvIndex, plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.getControlVert(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.getControlVert():

Alias

pointAtCV

Parameters
  • cvIndex (int) – the index of the CV to inspect

  • plug/p (bool) – return a plug, not just a value; defaults to False

Returns

The position of the specified CV.

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.pointAt():

Dispatches pointAtParam() if parametric=True, otherwise pointAtFraction().

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.pointAtParam():

Parameters
  • param (float, Math1D) – the parameter to sample

  • 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 point at the specified parameter.

Return type

Point, Vector

pointAtLength(length, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.pointAtLength(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.pointAtLength():

Parameters
  • length (float, Math1D) – the length to sample

  • plug/p (bool) – return a plug, not a value; if False, param must be a value; defaults to False

Returns

A point at the specified length.

Return type

Vector

pointAtFraction(fraction, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.pointAtFraction(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.pointAtFraction():

Parameters
  • fraction (float, Math1D) – the fraction to sample

  • 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 point at the specified fraction.

Return type

Vector

nearestPoint(refPoint, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.nearestPoint(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.nearestPoint():

Parameters
  • refPoint (tuple, list, str, Vector) – the reference point

  • 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 closest point on this curve to refPoint.

Return type

Vector

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 to False

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

[Point | Vector]

paramAtStart(plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.paramAtStart(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.paramAtStart():

Parameters

plug/p (bool) – return plugs, not values; defaults to False

Returns

The parameter at the start of this curve.

Return type

float, Math1D

paramAtEnd(plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.paramAtEnd(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.paramAtEnd():

Parameters

plug/p (bool) – return plugs, not values; defaults to False

Returns

The parameter at the end of this curve.

Return type

float, Math1D

knotDomain(plug=False, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.knotDomain(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.knotDomain():

Parameters

plug/p (bool) – return plugs, not values; defaults to False

Returns

The min and max U parameters on this curve.

Return type

(float | Math1D, float | Math1D)

paramAtPoint(point, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.paramAtPoint(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.paramAtPoint():

This is a ‘forgiving’ implementation, and uses the closest point.

Alias

nearestParam

Parameters
  • point (tuple, list, str, Vector, Point) – the reference point

  • 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 nearest parameter to the reference point.

Return type

float, Math1D

paramAtFraction(fraction, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.paramAtFraction(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.paramAtFraction():

Parameters
  • fraction (float, Math1D) – the fraction to sample

  • 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 parameter at the given fraction.

Return type

float, Math1D

paramAtLength(length, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.paramAtLength(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.paramAtLength():

Parameters
  • length (float, Math1D) – the length at which to sample a parameter

  • 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 parameter at the given length.

Return type

float, Math1D

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 to False

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

[float | Math1D]

lengthAtFraction(fraction, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.lengthAtFraction(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.lengthAtFraction():

Parameters
  • fraction (float, Math1D) – the fraction to inspect

  • 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 fraction.

Return type

float | Math1D

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 to False

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 inspect

  • checkDomain/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

Math1D

lengthAtPoint(point, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.lengthAtPoint(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.lengthAtPoint():

This is a ‘forgiving’ implementation, and uses the closest point.

Parameters
  • point (tuple, list, str, Point, Vector) – the point to inspect

  • 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 point.

Return type

Math1D

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 to False

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

[float | Math1D]

fractionAtPoint(point, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.fractionAtPoint(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.fractionAtPoint():

This is a ‘forgiving’ implementation, and uses the closest point.

Parameters
  • point (tuple, list, str, Point, Vector) – the point at which to sample a fraction

  • 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 length fraction at the specified point.

Return type

float | Math1D

fractionAtParam(param, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.fractionAtParam(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.fractionAtParam():

Parameters
  • param (float, str, Math1D) – the parameter at which to sample a fraction

  • 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 length fraction at the specified parameter.

Return type

float | Math1D

fractionAtLength(length, plug=None, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.fractionAtLength(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.fractionAtLength():

Parameters
  • length (float, str, Math1D) – the length at which to sample a fraction

  • 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 length fraction at the specified length.

Return type

float | Math1D

distributeFractions(number, worldSpace=False)#

Note

Adapted from paya.runtime.plugs.NurbsCurve.distributeFractions(); a worldSpace/ws keyword argument has been added, defaulting to False

Documentation from paya.runtime.plugs.NurbsCurve.distributeFractions():

Convenience method. Equivalent to floatRange(0, 1, number).

Parameters

number (int) – the number of fractions to generate

Returns

A uniform list of fractions.

Return type

[float]

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.normalAtParam():

Parameters
  • param (float, Math1D) – the parameter at which to sample the normal

  • normalize/nr (bool) – return the normalized normal; 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

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.normalAtFraction():

Parameters
  • fraction – the fraction at which to sample the normal

  • normalize/nr (bool) – return the normalized normal; 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

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.normalAtLength():

Parameters
  • length – the length at which to sample the normal

  • normalize/nr (bool) – return the normalized normal; 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

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.normalAtPoint():

Parameters
  • point (tuple, list, str, Vector, Point) – the point at which to sample the normal

  • normalize/nr (bool) – return the normalized normal; 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

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.tangentAtParam():

Parameters
  • param (float, Math1D) – the parameter at which to sample the tangent

  • normalize/nr (bool) – return the normalized tangent; 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

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.tangentAtFraction():

Parameters
  • fraction (float, Math1D) – the fraction at which to sample the tangent

  • plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to None

  • normalize/nr (bool) – normalize the output vector; defaults to False

Returns

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.tangentAtLength():

Parameters
  • length (float, Math1D) – the length at which to sample the tangent

  • plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to None

  • normalize/nr (bool) – normalize the output vector; defaults to False

Returns

The sampled vector.

Return type

Vector, Vector

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 to False

Documentation from paya.runtime.plugs.NurbsCurve.tangentAtPoint():

Parameters
  • point (list, tuple, str, Point, Vector) – the point at which to sample the normals

  • normalize/nr (bool) – normalize the output vector; 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

The sampled vector.

Return type

Vector, Vector

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 to False

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 to False

Returns

A list of tangents.

Return type

[Vector] | [Vector]

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 vector

  • plug/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 using createUpVectorSampler(); if this is omitted, then the last sampler created using createUpVectorSampler(setAsDefault=True) will be retrieved; defaults to None

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

CurveUpVectorSampler

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’ on motionPath 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 to None

  • upObject/uo (str, Transform) – if provided on its own, works as an aiming interest (similar to ‘Object Up’ mode on motionPath nodes); if combined with upVector, the object’s world matrix is used to multiply the up vector; defaults to None

  • 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 on curveWarp nodes; defaults to None

  • closestPoint/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

CurveUpVectorSampler

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

[CurveUpVectorSampler]

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 with setAsDefault=True.

Return type

CurveUpVectorSampler

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 a motionPath node, this builds off of a pointOnCurveInfo.

Parameters
  • param (float, str, Math1D) – the parameter at which to construct the 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 on motion path nodes; defaults to None

  • upObject/uo (None, str, Transform) – similar to motion 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 to None

  • 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 on curveWarp nodes; defaults to None

  • 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 using createUpVectorSampler(); defaults to None

  • 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 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 to None

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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 a pointOnCurveInfo <paya.runtime.nodes.PointOnCurveInfo node, this builds off of a motionPath.

Parameters
  • fraction (float, str, Math1D) – the fraction at which to construct the 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 on motion path nodes; defaults to None

  • upObject/uo (None, str, Transform) – similar to motion 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 to None

  • 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 on curveWarp nodes; defaults to None

  • 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 using createUpVectorSampler(); defaults to None

  • 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 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 to None

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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() or matrixAtFraction(). See either of those for full parameter information.

Parameters
  • paramOrFraction (float, str, Math1D) – the parameter or fraction 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’

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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
  • point (tuple, list, Point, Vector) – the reference point

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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 matrix

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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 to False

  • 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 to None

  • 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 on motionPath nodes); if combined with upVector, the vector will be multiplied with the object’s matrix (similar to ‘Object Rotation Up’); defaults to None

  • 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 on curveWarp nodes; defaults to None

  • 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 using createUpVectorSampler(); defaults to None

  • 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 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 to None

  • 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

paya.runtime.data.Matrix, paya.runtime.plugs.Matrix

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 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 to None

  • 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 on motionPath nodes); if combined with upVector, the vector will be multiplied with the object’s matrix (similar to ‘Object Rotation Up’); defaults to None

  • 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 on curveWarp nodes; defaults to None

  • 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 using createUpVectorSampler(); defaults to None

  • 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 to None

  • 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 joints

  • freeze/fr (bool) – zero-out transformations (except translate) at the initial pose; defaults to True

  • decompose/dec (bool) –

    if False, connect to offsetParentMatrix instead of driving the joint’s SRT channels; note that, if freeze is requested, the initial matrix

    will 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

[Joint] | Chain

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

BezierCurve

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

NurbsCurve

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
  • keepRange/kr (int, str, Math1D) –

    An index or enum key for the node’s keepRange` enumerator:

    • 0: ‘0 to 1’

    • 1: ‘Original’ (the default)

    • 2: ‘0 to #spans’

  • tolerance/tol (float, Math1D) – the fit tolerance; defaults to 0.001

Returns

The B-spline.

Return type

NurbsCurve

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
  • minValue (float, Math1D) – a source for the minValue attribute

  • maxValue (float, Math1D) – a source for the maxValue attribute

  • relative/r (bool) – set the node to ‘relative’; defaults to False

Returns

The sub-curve.

Return type

NurbsCurve

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 the inputCurves array will be used on the node.

Parameters
  • *curves (str, NurbsCurve) – one or more curves to attach to this one

  • blend (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.5

  • blendKnotInsertion (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

NurbsCurve

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 curve

  • select/sel – a subset of output indices to include in the return; keep attributes will configured accordingly

Returns

[NurbsCurve]

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
  • length (float, Math1D) – the retraction length

  • atStart/ats (bool) – retract at the start of the curve instead of the end; defaults to False

  • atBothEnds – retract at both ends of the curve; defaults to False

Returns

The modified curve.

Return type

NurbsCurve

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 length

  • atStart/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 instead

  • circular/cir (bool) – ignored if vector was provided; use the ‘circular’ mode of the extendCurve node; defaults to False

  • linear/lin (bool) – ignored if vector was provided; use the ‘linear’ mode of the extendCurve node; defaults to False

  • extrapolate/ext (bool) – ignored if vector was provided; use the ‘extrapolate’ mode of the extendCurve node; defaults to Tru``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
  • length (float, Math1D) – the length to add to the curve

  • 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

NurbsCurve

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
  • vector (list [float], str, Vector, Vector) – the vector along which to extend

  • atStart – extend at the start of the curve; defaults to False

  • useSegment/seg (bool) – uses an attached line segment for the extension; defaults to False

  • multipleKnots/mul (bool) – preserve multiple knots; defaults to True

Returns

This curve output, extended along the specified vector.

Return type

NurbsCurve

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
  • point (list [float], str, Vector, Vector) – the point towards which to extend

  • atStart – extend at the start of the curve; defaults to False

  • useSegment/seg (bool) – uses an attached line segment for the extension; defaults to False

  • multipleKnots/mul (bool) – preserve multiple knots; defaults to True

Returns

This curve output, extended towards the specified point.

Return type

NurbsCurve

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 to None

  • vector (list [float], str, Vector, Vector) – the vector along which to extend; defaults to None

  • point (list [float], str, Vector, Vector) – the point towards which to extend; defaults to None

  • 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

ValueError

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

NurbsCurve

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 be

  • stretchy (str, Math1D) – the user attribute to control how stretchy the output should be

  • globalScale/gs (str, Math1D) – (recommended) an attribute to use as a normalizing factor for length calculations; defaults to None

  • 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

NurbsCurve

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 degree

  • keepRange/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 True

  • keepTangents/kt (bool, str, Math1D) – keep tangents; defaults to True

  • keepControlPoints/kcp (bool, str, Math1D) – keep control points; defaults to False

  • tolerance/tol (float, str, Math1D) – the rebuild tolerance; defaults to 0.01

  • matchCurve/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 None

  • rebuildType/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)

  • keepRange/kr (int, str) –

    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

NurbsCurve

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

NurbsCurve

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

NurbsCurve

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 towards

  • weight/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

NurbsCurve

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 knots

  • insertBetween/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 to None

Returns

The edited curve.

Return type

NurbsCurve