Search code examples
pythonmethodscomponentsselectionmel

method maya doMenuComponentSelection


I was wondering where to find the source code of the doMenuComponentSelection() method. Thank you

I searched for Maya files but couldn't find them. I just want to see the source of this method.


Solution

  • i found the method on github, https://github.com/elrond79/mayaSettings/blob/master/2009-x64/zooScripts/dagMenuProc.mel#L977

    global proc doMenuComponentSelection(string $item, string $mask)
    //
    // Changes the selection/display state on this object to allow
    // selection of the specified selection mask type.
    {
        string $selectCmd;
    
        if (`selectMode -q -object`) {
            hilite $item;
            selectType -ocm -alc false;
            $selectCmd = "selectType -ocm -" + $mask + " true;";
        } else {
            selectType -ocm -alc false;
            $selectCmd = "selectType -" + $mask + " true;";
            if (!`selectMode -q -preset`) {
                $selectCmd = $selectCmd + "hilite " + $item + ";";
            }
        }
        eval $selectCmd;
    }