NurbsCurve

class cgp_maya_utils.scene.NurbsCurve(name)

Bases: cgp_maya_utils.scene.Shape

node object that manipulates a nurbsCurve shape node

count()

the count of cv points

Returns:the count of cv points
Return type:int
classmethod create(positions, transform=None, form=None, degree=None, color=None, worldSpace=False, attributeValues=None, connections=None, name=None, **__)

create a nurbsCurve

Parameters:
  • positions (list[list[int, float]]) – positions of the points of the nurbsCurve
  • transform (str or cgp_maya_utils.scene.Transform) – transform under which the shape will be parented
  • form (str) – form of the nurbsCurve - default is cgp_maya_utils.constants.ShapeFormType.OPEN
  • degree (str) – degree of the nurbsCurve - default is cgp_maya_utils.constants.GeometryDegree.CUBIC
  • color (list[int, float]) – color of the nurbsCurve
  • worldSpace (bool) – True : creation is in worldSpace - False : creation is in local
  • attributeValues (dict) – attribute values to set on the nurbsCurve
  • connections (list[tuple[str]]) – connections to set on the nurbsCurve
  • name (str) – name of the nurbsSurface
Returns:

the created nurbsCurve

Return type:

cgp_maya_utils.scene.NurbsCurve

data(worldSpace=False)

data necessary to store the nurbsCurve node on disk and/or recreate it from scratch

Parameters:worldSpace (bool) – True : shape position is in worldSpace - False : shape position is in local
Returns:the data of the nurbsCurve
Return type:dict
isOpened()

check if the curve is opened or closed

Returns:True : shape is opened - False : shape is closed
Return type:bool
points()

the cv points of the nurbsCurve

Returns:the cv points of the nurbsCurve
Return type:list[str]