THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/02/2011 at 14:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
---------
I am trying to write and register an xpresso node plugin. Here is what I have so far. I am starting simple just to see if I can get something to compile. I am running in to a problem because under the GvRegisterOperatorPlugin() The fourth argument requires an allocation of some sort. I try MyClass->Alloc() but Alloc() is not a member of GvOperatorData().. Does anyone know what I should put there?
Thanks,
Shawn
#include "c4d.h"
#include "c4d_operatordata.h"
#include "myClass.h"
class MyClass : public GvOperatorData{
public:
virtual Bool Init(GeListNode* node);
};
//Init Function
Bool MyClass::Init(GeListNode *node){
return TRUE;
}
Bool RegisterMyClass(void){
return GvRegisterOperatorPlugin(ID_NPARTICLE_NODE, "MyClass", PLUGINFLAG_SMALLNODE, MyClass::Alloc(), "MyClass", 0, ID_GV_OPCLASS_TYPE_GENERAL, ID_GV_OPGROUP_TYPE_GENERAL, 0, AutoBitmap("MyClass.tif"));
}