我有两行代码如下:
mel.eval('isolateAnimCurve true graphEditor1FromOutliner graphEditor1GraphEd;')
mel.eval('isolateAnimCurve false graphEditor1FromOutliner graphEditor1GraphEd;')
需要放入一个可以切换的函数(python),所以我可以将它用作maya中的热键。
答案 0 :(得分:0)
def hideCurves():
mel.eval('isolateAnimCurve true graphEditor1FromOutliner graphEditor1GraphEd;')
cmds.nameCommand( 'hideAllCurves', annotation='Hide Curves', command='python("hideCurves()")')
cmds.hotkey( k='F5', alt=True, name='hideAllCurves' )
这是纯粹的python方式,但我严重怀疑你想要调查hotkey editor