方法maya doMenuComponentSelection

2024-04-26 02:29:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我想知道在哪里可以找到doMenuComponentSelection()方法的源代码。谢谢

我搜索了玛雅文件,但找不到。我只想看看这个方法的来源


Tags: 文件方法源代码来源domenucomponentselection
1条回答
网友
1楼 · 发布于 2024-04-26 02:29:52

我在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;
}

相关问题 更多 >