GvOperatorData

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

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/02/2011 at 14:37, xxxxxxxx wrote:

Maybe I can only repeat myself but search the forum. there is a full example available (if not several).

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/02/2011 at 15:33, xxxxxxxx wrote:

Maybe i wasn't clear.  I HAVE searched the forums and all results show to use GvOperatorData::Alloc for that argument  or more specifically the class which inherits GvOperatorData.   I am doing that but it doesn't work.

I was trying to use this example:

https://plugincafe.maxon.net/topic/3916/3386_baseobjects-and-objectlinkports&KW=GvRegisterOperatorPlugin&PID=13868#13868

but the sdk for r12 says that there is no Alloc() in GvOperatorData. 
This is why I am asking.  :)

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/02/2011 at 16:22, xxxxxxxx wrote:

Any other examples that use GvRegisterOperatorPlugin() use the GvOperatorData::Alloc() for that argument so My question is, has this changed in the SDK?  Or is there a different way to do it?

Thanks,

Shawn

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/02/2011 at 16:35, xxxxxxxx wrote:

Problem Solved.

My mistake..  I cut out too much when shelling out my simple example...

I left out...
static NodeData* Alloc(void) { return gNew MyClass; }

to the class methods.  :)

The problem is solved.

Proof still that my forum searching skills are still in tact.  :)