|
Do you know wich flag to set via Command.SetFlag()? I tried siSupportsKeyAssignment, but this one is ON by default for any Custom Command.
I had a hotkey defined for my custom command Alt+E, but no hotkey gets appeared in the Custom Menu. Is there any other flag I should call in the command Init()?
XSIPLUGINCALLBACK CStatus FileExportGameData_Init( CRef& in_ctxt ) {
// Construct a Context from the CRef
Context ctxt( in_ctxt );
// Get the Command object from the Context
Command oCmd;
oCmd = ctxt.GetSource();
// Set some basic command properties
oCmd.PutDescription(L"File Export Game Data");
oCmd.PutTooltip(L"FileExportGameData");
// The command returns a value
oCmd.EnableReturnValue(true);
oCmd.SetFlag(siSupportsKeyAssignment, true);
oCmd.Update();
// Add an argument
ArgumentArray oArgs;
oArgs = oCmd.GetArguments();
oArgs.Add(L"Arg0");
return CStatus::OK; }
Unfortunately, there is no sample code and no description how to add hotkeys in custom menus, within Softimage SDK.
Author: Bunkai.Satori
|