#include <maya/MPxNode.h>
#include <maya/MIOStream.h>
#include <maya/MString.h>
#include <maya/MTypeId.h>
#include <maya/MPlug.h>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
#include <maya/MFnNumericAttribute.h>
#include <maya/MFloatVector.h>
#include <maya/MFnPlugin.h>
{
public:
GeomNode();
~GeomNode() override;
SchedulingType
schedulingType()
const override {
return SchedulingType::kParallel; }
static void * creator();
private:
};
#define MAKE_INPUT(attr) \
CHECK_MSTATUS ( attr.setKeyable(true) ); \
CHECK_MSTATUS ( attr.setStorable(true) ); \
CHECK_MSTATUS ( attr.setReadable(true) ); \
CHECK_MSTATUS ( attr.setWritable(true) );
#define MAKE_OUTPUT(attr) \
CHECK_MSTATUS (attr.setKeyable(false) ); \
CHECK_MSTATUS ( attr.setStorable(false)); \
CHECK_MSTATUS ( attr.setReadable(true) ); \
CHECK_MSTATUS ( attr.setWritable(false));
GeomNode::GeomNode()
{
}
GeomNode::~GeomNode()
{
}
void* GeomNode::creator()
{
return new GeomNode();
}
{
MAKE_INPUT(nAttr);
MAKE_INPUT(nAttr);
MAKE_OUTPUT(nAttr);
return MS::kSuccess;
}
{
if((plug != aOutColor) && (plug.
parent() != aOutColor))
return MS::kUnknownParameter;
resultColor.
x = point.
x * scale.
x + offset.
x;
resultColor.
y = point.
y * scale.
y + offset.
y;
resultColor.
z = point.
z * scale.
z + offset.
z;
outColor = resultColor;
return MS::kSuccess;
}
{
const MString UserClassify(
"utility/general" );
MFnPlugin plugin( obj, PLUGIN_COMPANY,
"4.5",
"Any");
GeomNode::creator, GeomNode::initialize,
return MS::kSuccess;
}
{
return MS::kSuccess;
}