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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Move Node position in Xpresso menu [SOLVED]

    SDK Help
    0
    3
    273
    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
      Helper
      last edited by

      On 16/11/2015 at 00:33, xxxxxxxx wrote:

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

      ---------
      I created a C++ node-plugin (My_Node) ... by default it is on the menu: New Node -> Xpresso -> General -> My_Node ... How to move node (My_Node) in the menu: New Node -> My Group -> My_Node ?
      http://forums.cgsociety.org/attachment.php?attachmentid=179117

      Example code get on forum
      https://developers.maxon.net/forum/topic/3916/3386_baseobjects-and-objectlinkports&PID=13868#13868

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

        On 16/11/2015 at 02:20, xxxxxxxx wrote:

        Hello,

        please do not cross post on different forums or at least include a link to the other post. Thanks.

        If you want to place your node in a custom class and group you have to add a custom class and group. A custom class is created like this:

          
        static const String* GetGVClassName()  
        {  
         static String mygroup("My Class");  
         return &mygroup;  
        }  
          
        static BaseBitmap* GetGVClassIcon()  
        {  
         return nullptr;  
        }  
          
         static GV_OPCLASS_HANDLER myClass;  
         myClass.class_id = CLASS_ID;  
         myClass.GetName = GetGVClassName;  
         myClass.GetIcon = GetGVClassIcon;  
          
         GvRegisterOpClassType(&myClass, sizeof(myClass));  
        

        and a custom group is created like this:

          
        static const String* GetGVGroupName(void)  
        {  
         static String mygroup("My Group");  
         return &mygroup;  
        }  
          
        static BaseBitmap* GetGVGroupIcon(void)  
        {  
         return nullptr;  
        }  
          
         static GV_OPGROUP_HANDLER myGroup;  
         myGroup.group_id = GROUP_ID;  
         myGroup.GetName = GetGVGroupName;  
         myGroup.GetIcon = GetGVGroupIcon;  
          
         GvRegisterOpGroupType(&myGroup, sizeof(myGroup));  
        

        Then you can use the IDs of the class and group when you register your plugin:

          
        GvRegisterOperatorPlugin(1033969,"My Node",0,MyNode::Alloc,"gvmynode",0,CLASS_ID,GROUP_ID,0,bitmap);  
        

        best wishes,
        Sebastian

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

          On 17/11/2015 at 00:34, xxxxxxxx wrote:

          Thanks.

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