SopPRM.h
#include <SOP/SOP_Node.h>
namespace yzh
{
class SopPRM : public SOP_Node
{
public:
SopPRM(OP_Network *net, const char *name, OP_Operator *op);
virtual ~SopPRM();
static PRM_Template myTemplateList[];
static OP_Node *myConstructor(OP_Network*, const char*, OP_Operator *);
protected:
virtual OP_ERROR cookMySop(OP_Context &context);
};
}
SopPRM.cpp
#include "SopPRM.h"
#include <OP/OP_Operator.h>
#include <OP/OP_OperatorTable.h>
#include <UT/UT_DSOVersion.h>
using namespace yzh;
void newSopOperator(OP_OperatorTable *table)
{
table->addOperator(new OP_Operator(
"sop_prm",
"Sop PRM",
SopPRM::myConstructor,
SopPRM::myTemplateList,
0,
0,
nullptr
));
}
SopPRM::SopPRM(OP_Network * net, const char * name, OP_Operator * op):SOP_Node(net,name,op)
{
}
yzh::SopPRM::~SopPRM()
{
}
OP_Node* SopPRM::myConstructor(OP_Network *net, const char *name, OP_Operator *op)
{
return new SopPRM(net, name, op);
}
PRM_Template
SopPRM::myTemplateList[]={
PRM_Template(PRM_XYZ,3,&PRMdirectionName,PRMposDefaults),
PRM_Template(PRM_XYZ_J,3,&PRMdirectionName,PRMposDefaults),
PRM_Template()
};
OP_ERROR SopPRM::cookMySop(OP_Context& context)
{
return error();
}
网友评论