我想知道 cmds.scriptCtx 命令究竟是做什么的,因为我试图将它直接从 Autodesk 帮助页面复制并粘贴到我的脚本编辑器中,但没有任何反应。这是 Autodesk 帮助中的脚本:
import maya.cmds as cmds
cmds.scriptCtx( title='Attach Curve', totalSelectionSets=1, fcs="select -r $Selection1; performAttachCrv 0 \"\"", cumulativeLists=True, expandSelectionList=True, setNoSelectionPrompt='Select two curves close to the attachment points', setSelectionPrompt='Select a second curve close to the attachment point', setDoneSelectionPrompt='Never used because setAutoComplete is set', setAutoToggleSelection=True, setSelectionCount=2, setAutoComplete=True, curveParameterPoint=True )
Run Code Online (Sandbox Code Playgroud)
我尝试选择一条曲线和两条曲线,或者根本不选择任何东西,但什么也没发生。我错过了什么?
我正在为这个脚本使用 Maya 2018。
谢谢你们。