xpresso quesiton

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

On 09/03/2011 at 15:37, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   12 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Hey everyone..  I have successfully created an xpresso node that does absolutely nothing right now..  WOO HOO!  And...  when I register it using `ID_GV_OPGROUP_TYPE_GENERAL and ``ID_GV_OPCLASS_TYPE_GENERAL it of course as you would expect shows up under the General xpresso menu...

Now I want to create my own group so that when the user right clicks on the Graph View they see my group under the list.

I have been checking out the following thread to help solve this problem

https://plugincafe.maxon.net/topic/900/218_my-expressonode-example-and-questions&KW=GvRegisterOpGroupType&PID=626#626

Based on that thread I have come up with the following code

  
  
  
  
const LONG ID_MYGROUP_GV_OPGROUP = 1026834;  
const LONG ID_``MYCLASS``_GV_OPCLASS = 1026835;  
    
static const String* GetMyClassName(){  
  static String myclass("My Class");  
  return &myclass;  
}  
  
static const String* GetMyGroupName(){  
  static String mygroup("My Group");  
  return &mygroup;  
}  
  
Bool RegisterMyNode(void){  
  
  static GV_OPCLASS_HANDLER myClass;  
  ``myClass``.class_id = ID_MYCLASS_GV_OPCLASS;  
  ``myClass``.GetName = GetMyClassName;  
  
  if (!GvRegisterOpClassType(&myClass, sizeof(myClass))) return FALSE;  
  
  static GV_OPGROUP_HANDLER myGroup;  
  myGroup.group_id = ID_MYGROUP_GV_OPGROUP;  
  myGroup.GetName = GetMyGroupName;  
  
  if (!GvRegisterOpGroupType(&myGroup, sizeof(myGroup))) return FALSE;;  
  
  return GvRegisterOperatorPlugin(ID_MY_NODE, "``MyNode``", PLUGINFLAG_SMALLNODE, ``MyNode``::Alloc, "``MyNode``", 0, ID_MYCLASS_GV_OPCLASS, ID_MYGROUP_GV_OPGROUP, ID_GV_IGNORE_OWNER, AutoBitmap("MyNode.tif"));  
}  
  

Now,  when I add this code,  it doesn't show up anywhere in the Graph View.   Am I doing something the wrong way.  I'm sure it's obvious that I don't fully understand what I am doing here..   Any help you could offer would be great.

Thanks,,

Shawn
`

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

On 09/03/2011 at 16:39, xxxxxxxx wrote:

okay  I solved the problem.   Apparently you need the icon for the node to show up,  😉