Wednesday 2 November 2011

Context sensitive hotkeys

Want the same hotkey to do different things dependent on which Maya window you're in?

string $panelWithFocus = `getPanel -withFocus`;
if( $panelWithFocus == "polyTexturePlacementPanel1" ){
//we're in the UV Editor!
}
else{
//We're somewhere else
}
Great for having different marking menus under one hotkey.

1 comment:

  1. possible to do this with certain tools in maya? or hotkeys? like or instance I want the + and minus sine to create spans on a cube or a cylinder

    ReplyDelete