string $panelWithFocus = `getPanel -withFocus`;Great for having different marking menus under one hotkey.
if( $panelWithFocus == "polyTexturePlacementPanel1" ){
//we're in the UV Editor!
}
else{
//We're somewhere else
}
Wednesday, 2 November 2011
Context sensitive hotkeys
Want the same hotkey to do different things dependent on which Maya window you're in?
UV editor marking menus
How do you get a custom Maya marking menu to pop up in the UV editor instead of the viewport? Go to the hotkey editor and change the marking menu script to say:
-parent polyTexturePlacementPanel1Windowinstead of:
-parent viewPanesThis should work with any Maya UI element.
Subscribe to:
Posts (Atom)