create runtime command to open up graph editor with keyboard

create runtime command to open up graph editor with keyboard

stevenfila7
Advocate Advocate
3,255 Views
4 Replies
Message 1 of 5

create runtime command to open up graph editor with keyboard

stevenfila7
Advocate
Advocate

Good day all,

 

Can someone please provide a runtime command mel script to save in the hotkey editor that when you press the "p" key on the keyboard the graph editor automatically opens up on your screen?

 

Please provide screen shots, sorry I am new to this?

 

Thank you,

Steve

0 Likes
Accepted solutions (1)
3,256 Views
4 Replies
Replies (4)
Message 2 of 5

pavelR.
Advocate
Advocate

 

this should get you started:

 

import maya.cmds as mc;
mc.GraphEditor();

 

 

In general you can enable 'echo all commands' within the scripteditor and and see what commands Maya is executing the background.

The Mel version is even simpler:

GraphEditor;

 

0 Likes
Message 3 of 5

stevenfila7
Advocate
Advocate

Hi-

 

I tried the Mel version and I could not get it to work.  Please provide screen shots of steps in order so I can execute it.

 

much thanks,

Steve

0 Likes
Message 4 of 5

stevenfila7
Advocate
Advocate

Hi,

 

I also got an error when I executed the command.  I am sending a screen shot.

 

Please help.  I may be doing something wrong.

0 Likes
Message 5 of 5

pavelR.
Advocate
Advocate
Accepted solution

as the error message implies, you can't use spaces in your runtime-command names.

use something like 'openGraphEditor' or 'doSomething' as name and not 'opens graph editor'

 

and there is also not much to 'screenshot'.. speaking of.. if you use jpeg and maybe lower the quality you can have a smaller image in the 600kb range rather than posting a 8MB png.

 

also you used python code in your runtime command and left the language as MEL.
either use the MEL version or use the python version and also set the runtime command to python.


a good start would be to also look at the documentation: http://help.autodesk.com/view/MAYAUL/2018/ENU/

 

 

 

 

0 Likes