#include <maya/MDataHandle.h> 
#include <maya/MFnNumericAttribute.h> 
#include <maya/MFnPlugin.h> 
#include <maya/MIOStream.h>
#include <maya/MGlobal.h>
#include <maya/MMatrix.h>
#include <maya/MPxMotionPathNode.h> 
#include <maya/MQuaternion.h> 
#include <maya/MStatus.h> 
#include <maya/MTransformationMatrix.h>
#include <maya/MTypeId.h>
 
#define ALMOST_ZERO 1.0e-5
#define TWO_PI      ( 2.0 * 3.1415927 )
{
public:
                        motionPathNode();
    virtual             ~motionPathNode(); 
    static  void*       creator();
    
    
private:
};
MObject motionPathNode::wobbleRate;
 
MTypeId motionPathNode::id( 0x0008002D );
 
motionPathNode::motionPathNode()
{
}
motionPathNode::~motionPathNode()
{
}
{
    double  f;
    
    
    
    
    if ( fractionModeVal ) {
        f = uVal;
    } else {
        f = parametricToFractional( uVal, &status );
    }
    
    
    
    
    f = wraparoundFractionalValue( f, &status );
    MPoint location = position( data, f, &status );
 
    
    
            &worldUp ) );
    
    
    
    if ( followVal && bankVal ) {
                bankScaleVal, bankThresholdVal, &status );
        side = front ^ up;
    }
    
    
    
    if ( fabs( offsetVal ) > ALMOST_ZERO
                && fabs( wobbleRateVal ) > ALMOST_ZERO ) {
        double wobble = offsetVal * sin( TWO_PI * wobbleRateVal * f );
        location += tmp;
    }
    
    
    if ( followVal ) {
                up, frontAxisVal, upAxisVal, &status );
        double  rot[3];
                rot, ro );
    }
    
}
void* motionPathNode::creator()
{
    return( new motionPathNode() );
}
MStatus motionPathNode::initialize()
 
{
    
    
    
    
    offset = nAttr.
create( 
"offset", 
"o",
    addAttribute( offset );
    wobbleRate = nAttr.
create( 
"wobbleRate", 
"w",
    addAttribute( wobbleRate );
    
    
    
    
}
{
}
{ 
    status = plugin.registerNode( "motionPathNode",
            motionPathNode::id,
            motionPathNode::creator,
            motionPathNode::initialize,
    if (!status) {
        status.
perror(
"registerNode");
        return( status );
    }
    return( status );
}
{
    status = plugin.deregisterNode( motionPathNode::id );
    if (!status) {
        status.
perror(
"deregisterNode");
        return( status );
    }
    return( status );
}