Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

CommandData submenu item icon

 Post Reply Post Reply
Author
Message
rsodre View Drop Down
Member
Member


Joined: 2014 Jun 15
Location: Brazil
Online Status: Offline
Posts: 89
Post Options Post Options   Quote rsodre Quote  Post ReplyReply Direct Link To This Post Topic: CommandData submenu item icon
    Posted: 2018 Aug 05 at 1:53pm

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?
bc.SetString(1, "Submenu Test");
bc.SetString(1000, "First Entry");
submenu.InsData(0, bc);
Back to Top
Yannick Puech View Drop Down
Forum Moderator
Forum Moderator


Joined: 2011 Apr 13
Location: Spain
Online Status: Offline
Posts: 1140
Post Options Post Options   Quote Yannick Puech Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Aug 06 at 7:47am
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&".



MAXON
Developer Support
Back to Top
rsodre View Drop Down
Member
Member


Joined: 2014 Jun 15
Location: Brazil
Online Status: Offline
Posts: 89
Post Options Post Options   Quote rsodre Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Aug 07 at 5:21pm
Nice trick! How could I miss it?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.047 seconds.