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

    GvRegisterOpGroupType

    SDK Help
    0
    4
    785
    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

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

      On 29/11/2002 at 09:39, xxxxxxxx wrote:

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

      ---------
      How do I correctly register a new operator group with this function?
      Regards, darf - bhodiNUT

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

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

        On 01/12/2002 at 02:15, xxxxxxxx wrote:

        The following seems to work: (Extended version of the example first posted, and different memory allocation scheme.)

            
            
            const LONG ID_GV_OPGROUP_MY = 1010850;  
            const LONG ID_GV_OPCLASS_MY = 1010851;
            
            
            
            
            static const String* GetMyGroupName()  
            {  
              static String mygroup("My Group");  
              return &mygroup;  
            }
            
            
            
            
            static BaseBitmap* GetMyGroupIcon()  
            {  
              static AutoAlloc<BaseBitmap> icon;  
              if (!icon) return NULL;  
              if (icon->GetBw() == 0)  
              {  
                icon->Init(24, 24);  
                icon->Clear(200, 0, 0);  
              }  
              return icon;  
            }
            
            
            
            
            static const String* GetMyClassName()  
            {  
              static String mygroup("My Class");  
              return &mygroup;  
            }
            
            
            
            
            static BaseBitmap* GetMyClassIcon()  
            {  
              static AutoAlloc<BaseBitmap> icon;  
              if (!icon) return NULL;  
              if (icon->GetBw() == 0)  
              {  
                icon->Init(24, 24);  
                icon->Clear(0, 0, 200);  
              }  
              return icon;  
            }
            
            
            
            
            Bool RegisterGvTest()  
            {  
              static GV_OPGROUP_HANDLER mygroup;  
              mygroup.group_id = ID_GV_OPGROUP_MY;  
              mygroup.GetName = GetMyGroupName;  
              mygroup.GetIcon = GetMyGroupIcon;
            
            
            
            
              GvRegisterOpGroupType(&mygroup, sizeof(mygroup));
            
            
            
            
              static GV_OPCLASS_HANDLER myclass;  
              myclass.class_id = ID_GV_OPCLASS_MY;  
              myclass.GetName = GetMyClassName;  
              myclass.GetIcon = GetMyClassIcon;
            
            
            
            
              GvRegisterOpClassType(&myclass, sizeof(myclass));
            
            
            
            
              return GvRegisterOperatorPlugin(GVTEST_ID, "Gv Test", 0, GvTestData::Alloc, "GVtest", 0,   
                ID_GV_OPCLASS_MY, ID_GV_OPGROUP_MY, 0, NULL);  
            }
        

        I'm not sure why the icons aren't used...

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

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

          On 04/12/2002 at 01:35, xxxxxxxx wrote:

          Icons aren't used at the moment. (All groups and classes are shown with the general icon.)

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

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

            On 04/12/2002 at 08:55, xxxxxxxx wrote:

            Thanks for resaerching that and telling me. It had just become a question.
            Hmm... Telepathic technical support... Rock on!
             
            darf

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