CommandData submenu item icon

  • On 05/08/2018 at 13:53, xxxxxxxx wrote:

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


    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);

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


    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&".

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

    Nice trick! How could I miss it?

Log in to reply