Hi guys.
I am trying to make my tool open up pop up menu by RMBClick in viewport.
Is there any ways to do that via C++ API etc ?
A know that RCTools have it in .js files.
But i think that maybe there is something more native for XSI ?
Simple "RegisterMenu" add menus to already exist custom menus and as i understand can not be invoked in custom Tool by RMBClick.
Simple pop up menu for Tool
-
- Posts: 19
- Joined: 03 Nov 2013, 07:02
Simple pop up menu for Tool
Last edited by Bravlin Pechatnik on 24 Oct 2015, 21:18, edited 1 time in total.
-
- Posts: 19
- Joined: 03 Nov 2013, 07:02
Re: pywin debug
since its a Tool callback this context menu available only for Tools
more universal context menu can be created via WINAPI as in XSI Xpop plugin
Code: Select all
CStatus MenuInit( ToolContext &in_ctxt )
{
Menu oMenu;
oMenu = in_ctxt.GetSource();
MenuItem oNewItem;
oMenu.AddCommandItem(L"MX_Roundish",L"Applymx_Roundish",oNewItem);
return CStatus::OK;
}
#define DECLARE_TOOL_CALLBACK(TOOL,CALLBACK) \
SICALLBACK TOOL##_##CALLBACK( ToolContext& in_ctxt ) { \
TOOL *l_pTool = (TOOL *)(CValue::siPtrType)in_ctxt.GetUserData(); \
return ( l_pTool ? l_pTool->CALLBACK( in_ctxt ) : CStatus::Fail ); }
DECLARE_TOOL_CALLBACK( mxRoundishTool, MenuInit );
Who is online
Users browsing this forum: No registered users and 10 guests