Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

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

polycounter lvl 20
Offline / Send Message
SideEffect polycounter lvl 20
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
    Offline / Send Message
    SideEffect polycounter lvl 20
    Welp answered my own question

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


  • Bartalon
    Offline / Send Message
    Bartalon polycounter lvl 12
    1. //MEL
      //Create your custom command here
    2. nameCommand
    3. -annotation "Freeze Transforms"
    4. -command "makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;"
    5. freezeNamedCommand;
    6. //The hotkey calls the named command
    7. hotkey
    8. -k "f"
    9. -alt
    10. -name "freezeNamedCommand";
  • SideEffect
    Offline / Send Message
    SideEffect polycounter lvl 20
    Bartalon said:
    1. //MEL//Create your custom command here
    2. nameCommand
    3. -annotation "Freeze Transforms"
    4. -command "makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;"
    5. freezeNamedCommand;
    6. //The hotkey calls the named command
    7. 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.