#include "testNucleusNode.h"
#include <maya/MIOStream.h>
#include <maya/MPlug.h>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
#include <maya/MGlobal.h>
#include <maya/MTime.h>
#include <maya/MFnMesh.h>
#include <maya/MFnMeshData.h>
#include <maya/MFnUnitAttribute.h>
#include <maya/MFnNumericAttribute.h>
#include <maya/MFnTypedAttribute.h>
#include <maya/MFnIntArrayData.h>
#include <maya/MFnComponentListData.h>
#include <maya/MFnSingleIndexedComponent.h>
#include <maya/MDagPath.h>
#include <maya/MPoint.h>
#include <maya/MFloatPointArray.h>
#include <maya/MItMeshVertex.h>
#include <maya/MFnPlugin.h>
#include <math.h>
#include "stdio.h"
const MTypeId testNucleusNode::id( 0x85002 );
#include <maya/MFnNObjectData.h>
#include <maya/MnCloth.h>
MObject testNucleusNode::startState;
MObject testNucleusNode::currentState;
MObject testNucleusNode::nextState;
MObject testNucleusNode::currentTime;
{
if ( !stat )
{
cout<<msg<<"\n";
}
}
{
if ( plug == nextState )
{
if(currTime.
value() <= 0.0) {
}
else {
}
inputNData.getObjectPtr(nObj);
unsigned int ii;
for(ii=0;ii<points.
length();ii++) {
points[ii].y = (float) sin(points[ii].x + currTime.
value()*4.0f*(3.1415f/180.0f));
}
delete nObj;
}
else if ( plug == currentState )
{
}
else if (plug == startState) {
}
else {
stat = MS::kUnknownParameter;
}
return stat;
}
MStatus testNucleusNode::initialize()
{
statCheck(stat, "failed to create startState");
statCheck(stat, "failed to create currentState");
statCheck(stat, "failed to create nextState");
addAttribute(startState);
addAttribute(currentState);
addAttribute(nextState);
addAttribute(currentTime);
attributeAffects(startState, nextState);
attributeAffects(currentState, nextState);
attributeAffects(currentTime, nextState);
}
{
MFnPlugin plugin(obj,
"Autodesk - nCloth Prototype 4",
"8.5",
"Any");
status = plugin.registerNode ( "testNucleusNode", testNucleusNode::id,testNucleusNode ::creator, testNucleusNode::initialize );
if ( !status )
{
status.
perror(
"registerNode");
return status;
}
return status;
}
{
status = plugin.deregisterNode(testNucleusNode::id);
if ( !status )
{
status.
perror(
"deregisterNode");
return status;
}
return status;
}