Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    xpresso quesiton

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 211 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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://developers.maxon.net/forum/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
      `

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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,  😉

        1 Reply Last reply Reply Quote 0
        • First post
          Last post