Home Technical Talk

[Autodesk Maya] Create a shortcut on "selection highlighting".

polycounter lvl 7
Offline / Send Message
Worldevour polycounter lvl 7

Hello,


I want to create a toggle shortcut for this button, I can't find a way to do it. Even if I copy the mel script, its not a toggle.


Replies

  • tsungyuw
    Offline / Send Message
    tsungyuw polycounter lvl 8

    string $currentPanel = `getPanel -withFocus`;

    int $checkHL = `modelEditor -q -sel $currentPanel`;

    if ($checkHL == 0){

      modelEditor -e -sel 1 $currentPanel;

      

    }

    else{

       modelEditor -e -sel 0 $currentPanel;

    };


    drag it to your shelf or assign it to a hotkey

  • ScareArchives
    tsungyuw said:

    string $currentPanel = `getPanel -withFocus`;

    int $checkHL = `modelEditor -q -sel $currentPanel`;

    if ($checkHL == 0){

      modelEditor -e -sel 1 $currentPanel;

      

    }

    else{

       modelEditor -e -sel 0 $currentPanel;

    };


    drag it to your shelf or assign it to a hotkey

    Thank you soo much, finally a solution! Had the same question. Thx!
Sign In or Register to comment.