def buildNode( cls, nodeName ): ''' Builds a curve control. @param nodeName: String. Name of the node. ''' # Create the curve. curveNode = CurveControlComponent( nodeName ).createCurveControl( cls( nodeName ).controlName, cls( nodeName ).curveType ) controlName = OpenMaya.MDagPath.getAPathTo( curveNode ).fullPathName() # Set the control to the transform matrix. applyStoredTransforms( nodeName, controlName ) # Get the saved properties and apply them to the curve. cvList = NurbsCurveUtility.readCurveValues( nodeName ) cvPointArray = NurbsCurveUtility.buildCVPointArray( cvList ) NurbsCurveUtility.setCurveCvs( controlName, cvPointArray ) # Color. GeneralUtility.setUserColor( controlName, userColor=cls( nodeName ).controlColor ) # Create the control spacer. transReference = NodeUtility.getNodeAttrSource( nodeName, 'parentName' ) controlSpacer = GeneralUtility.createSpacer( None, inGroupName=cls( nodeName ).controlName, inTargetObject=transReference[0], inDoParent=False, inPrefix='sp' ) cmds.parent( controlName, controlSpacer, relative=True ) return curveNode