美文网首页
SopPRM 最简单的SOP空插件

SopPRM 最简单的SOP空插件

作者: 皿卜土 | 来源:发表于2019-03-20 11:38 被阅读0次

    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();
    }
    
    

    相关文章

      网友评论

          本文标题:SopPRM 最简单的SOP空插件

          本文链接:https://www.haomeiwen.com/subject/xbkzmqtx.html