Home Technical Talk

[Maya] Adding new custom script hotkeys to hotkey editor via script

polycounter lvl 19
Offline / Send Message
SideEffect polycounter lvl 19
Hey guys,
Anyone know how to add new custom script hotkeys to Maya via python or MEL?
I'm not sure what to look for.
With pymel I'm trying nameCommand() but it doesn't seem to be adding to the list in the hotkey editor.

Replies

  • SideEffect
    Options
    Offline / Send Message
    SideEffect polycounter lvl 19
    Welp answered my own question

    import pymel.core as pmc
    pmc.runTimeCommand("Name", annotation='Description', category="Custom Scripts", command=("print meorp"), showInHotkeyEditor=1)


  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    //MEL
    //Create your custom command here nameCommand -annotation "Freeze Transforms" -command "makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;" freezeNamedCommand; //The hotkey calls the named command hotkey -k "f" -alt -name "freezeNamedCommand";
  • SideEffect
    Options
    Offline / Send Message
    SideEffect polycounter lvl 19
    Bartalon said:
    //MEL//Create your custom command here
    nameCommand
    	-annotation "Freeze Transforms"
    	-command "makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;"
    	freezeNamedCommand;
    
    //The hotkey calls the named command
    hotkey -k "f" -alt -name "freezeNamedCommand";

    errr how the hell do you do code tags on polycount now? haha
    Edit nevermind I learned things today
Sign In or Register to comment.