#include <maya/MIOStream.h>
#include <string.h>
#include <math.h>
#include <maya/MPxNode.h>
#include <maya/MFnNumericAttribute.h>
#include <maya/MFnDependencyNode.h>
#include <maya/MFnPlugin.h>
#include <maya/MString.h>
#include <maya/MTypeId.h>
#include <maya/MPlug.h>
#include <maya/MPlugArray.h>
#include <maya/MVector.h>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
{
public:
affects();
virtual ~affects();
static void* creator();
};
affects::affects() {}
affects::~affects() {}
{
fprintf(stderr,"affects::compute(), plug being computed is \"%s\"\n",
MPlug pA = fnThisNode.findPlug(
"A", &status );
fprintf(stderr,"\t\t... found dynamic attribute \"A\", copying its value to \"B\"\n");
int value = inputData.
asInt();
outputHandle.
set( value );
}
} else {
}
}
void* affects::creator()
{
return( new affects() );
}
{
}
MStatus affects::setDependentsDirty(
const MPlug &plugBeingDirtied,
{
fprintf(stderr,"affects::setDependentsDirty, \"A\" being dirtied\n");
MPlug pB = fnThisNode.findPlug(
"B", &status );
fprintf(stderr,"\t\t... dirtying \"B\"\n");
}
}
}
{
MFnPlugin plugin( obj, PLUGIN_COMPANY ,
"6.0",
"Any");
status = plugin.registerNode( "affects", affects::id, affects::creator,
affects::initialize );
if (!status) {
status.
perror(
"registerNode");
return( status );
}
return( status );
}
{
status = plugin.deregisterNode( affects::id );
if (!status) {
status.
perror(
"deregisterNode");
return( status );
}
return( status );
}