Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    1. Maxon Developers Forum
    2. manudin
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    manudin

    @manudin

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    manudin Unfollow Follow

    Latest posts made by manudin

    • Title in dropdown menu

      I found in this topic a code which creates a menu and sub menu but I did not found how to create titles inside menus. something like this:
      40e5f55b-8b78-440d-9aa1-bf89d20694d9-image.png

      import c4d
      from c4d import gui
      
      def EnhanceMainMenu():
          mainMenu = gui.GetMenuResource("M_EDITOR")                 
          pluginsMenu = gui.SearchPluginMenuResource()               
      
      
          menu = c4d.BaseContainer()                                 
          menu.InsData(c4d.MENURESOURCE_SUBTITLE, "My Menu 1")  
          menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(c4d.Ocube))      
          menu.InsData(c4d.MENURESOURCE_SEPERATOR, True);             
          menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(c4d.Osphere))     
          menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(c4d.Oplane))     
      
          submenu = c4d.BaseContainer()
          submenu.InsData(c4d.MENURESOURCE_SUBTITLE, "Menu 2 ")
          submenu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(c4d.Onull))     
          menu.InsData(c4d.MENURESOURCE_SUBMENU, submenu)
      
          if pluginsMenu: mainMenu.InsDataAfter(c4d.MENURESOURCE_STRING, menu, pluginsMenu)
          else: mainMenu.InsData(c4d.MENURESOURCE_STRING, menu)
      
      def PluginMessage(id, data):
          if id==c4d.C4DPL_BUILDMENU:
              EnhanceMainMenu()
      
      
      posted in Cinema 4D SDK python
      M
      manudin