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
    • Register
    • Login

    CommandData submenu item icon

    SDK Help
    0
    3
    909
    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 05/08/2018 at 13:53, xxxxxxxx wrote:

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

      ---------
      Hi!

      Is there a way to set a custom icon to a submenu item created with CommandData::GetSubContainer() ?
      My menu is dynamic, so I can't have a unique plugin id for each item.

      Using the member doc entry as example, how to set the subid 1000 icon?

      [BaseContainer](class_base_container.html) bc;
      bc.[SetString](class_base_container.html#ae460ea6b66f90a8b390239c42092f82b)(1, "Submenu Test");
      bc.[SetString](class_base_container.html#ae460ea6b66f90a8b390239c42092f82b)(1000, "First Entry");
      submenu.[InsData](class_base_container.html#a9d6fd251ff720503b7a11d6b99b74f62)(0, bc);
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 06/08/2018 at 07:47, xxxxxxxx wrote:

        Hi,

        It is only possible to use registered icons in menus. Note menu items IDs doesn't have be unique plugin IDs, only the icons IDs.
        With a given registered icon ID 123456789 , the text for the menu item has to be constructed like this: "Menu Text &i123456789&".

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

          On 07/08/2018 at 17:21, xxxxxxxx wrote:

          Nice trick! How could I miss it?

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