#NEWLINE# def compute( self , plug , data ) : #NEWLINE# #INDENT# if ( plug not in ( Circler . outSine , Circler . outCosine ) ) : #NEWLINE# #INDENT# return OpenMaya . MStatus . kUnknownParameter #NEWLINE# #UNINDENT# inputData = data . inputValue ( Circler . input ) #NEWLINE# scaleData = data . inputValue ( Circler . scale ) #NEWLINE# framesData = data . inputValue ( Circler . frames ) #NEWLINE# inputVal = inputData . asFloat ( ) #NEWLINE# scaleFactor = scaleData . asFloat ( ) #NEWLINE# framesPerCircle = framesData . asFloat ( ) #NEWLINE# angle = ( 6.2831853 * ( inputVal / framesPerCircle ) ) #NEWLINE# sinResult = ( math . sin ( angle ) * scaleFactor ) #NEWLINE# cosResult = ( math . cos ( angle ) * scaleFactor ) #NEWLINE# sinHandle = data . outputValue ( Circler . outSine ) #NEWLINE# cosHandle = data . outputValue ( Circler . outCosine ) #NEWLINE# sinHandle . setFloat ( sinResult ) #NEWLINE# cosHandle . setFloat ( cosResult ) #NEWLINE# data . setClean ( sinHandle ) #NEWLINE# return OpenMaya . MStatus . kSuccess