0
votes

I have two lines of code as below:

Hides all the curves not selected:

mel.eval('isolateAnimCurve true graphEditor1FromOutliner graphEditor1GraphEd;')

Brings back all the curves:

mel.eval('isolateAnimCurve false graphEditor1FromOutliner graphEditor1GraphEd;')

Need a to put in a function (python) where it can be toggled, so I can use it as a hotkey in maya.

1

1 Answers

0
votes
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' )

This is pure python way, But I seriously doubt that you want to look into hotkey editor