Hello Guys,
- Is it possible to get a full list of command ID ?
For now I understand from different forum posts that the only way is to get it from the command palette (for instance in https://plugincafe.maxon.net/topic/3168/2548_command-id/2)
For now I am doing this kind of recursion to get a list of command from the ui.
The code below shows me two kind of results:
1. IDM_XXX
2. PLUGIN_CMD_${ID}
The first one is a string while the second contains an id but does not corresponds to the targeted command id.
void EnumerateCmds(BaseContainer* item) {
BrowseContainer bc(item);
Int32 id = 0;
GeData* dat = nullptr;
while (bc.GetNext(&id, &dat))
{
switch (id) {
case MENURESOURCE_SUBMENU:
DiagnosticOutput("SUBMENU [");
EnumerateCmds(dat->GetContainer());
DiagnosticOutput("]");
break;
case MENURESOURCE_STRING:
DiagnosticOutput("MENURESOURCE_STRING " + dat->GetString() + "[");
EnumerateCmds(dat->GetContainer());
DiagnosticOutput("]");
break;
case MENURESOURCE_COMMAND:
DiagnosticOutput("MENURESOURCE_COMMAND=" + dat->GetString())
break;
case MENURESOURCE_SEPERATOR:
break;
case MENURESOURCE_SUBTITLE:
DiagnosticOutput("subtitle="+ dat->GetString());
break;
case MENURESOURCE_MENURESOURCE:
DiagnosticOutput("MENURESOURCE_MENURESOURCE=" + dat->GetString() + "[");
EnumerateCmds(dat->GetContainer());
DiagnosticOutput("]");
break;
case MENURESOURCE_SUBTITLE_ICONID:
DiagnosticOutput("MENURESOURCE_SUBTITLE_ICONID id value: " + dat->GetInt32());
break;
case MENURESOURCE_ASSET:
DiagnosticOutput("MENURESOURCE_ASSET" + dat->GetString() + "[");
break;
default:
DiagnosticOutput("error");
break;
}
- Are command's id same for their icon ? Otherwise how could we fetch it?
Thank you in advance for any help
Best