NurbsSurface

class cgp_maya_utils.scene.NurbsSurface(name)

Bases: cgp_maya_utils.scene.Shape

node object that manipulates a nurbsSurface shape node

count()

the count of cv points

Returns:the count of cv points
Return type:int
countU()

the countU of cv points

Returns:the countU of cv points
Return type:int
countV()

the countV of cv points

Returns:the countV of cv points
Return type:int
classmethod create(positions, transform=None, formU=None, formV=None, degreeU=None, degreeV=None, knotsU=None, knotsV=None, color=None, worldSpace=False, attributeValues=None, connections=None, name=None, **__)

create a nurbsSurface

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

the created nurbsSurface

Return type:

cgp_maya_utils.scene.NurbsSurface

data(worldSpace=False)

data necessary to store the nurbsSurface 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 nurbsSurface
Return type:dict
formU()

the formU of the nurbsSurface

Returns:the formU of the nurbsSurface
Return type:int
formV()

the formV of the nurbsSurface

Returns:the formV of the nurbsSurface
Return type:int
knotsU()

the knotU of the nurbsSurface

Returns:the knotU of the nurbsSurface
Return type:list[int]
knotsV()

the knotV of the nurbsSurface

Returns:the knotV of the nurbsSurface
Return type:list[int]
points()

the cv points of the nurbsSurface

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