Discussion:
[Maya-Python] Python Maya 2018 hotkeys Linux and Windows issue
'ninu' via Python Programming for Autodesk Maya
2018-11-03 18:38:32 UTC
Permalink
Hi there,

I am having a issue. I created a hotkey with Python in maya 2018. It works
great on Linux but on windows it doesn't run or gives any error. Can
someone think of a reason why Maya would behave differently with its native
cmds.




Here is the sample code. works fine on Linux but not on windows.



import maya.cmds as cmds
cmds.nameCommand( 'hotkeyTest', ann='Hotkey Test',
c='python("cmds.polyCube()")')
cmds.hotkey( keyShortcut='1', altModifier=True, name='hotkeyTest')





Thanks
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f1059f64-e9d4-4304-a06a-8e8e2d90795f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tim Fowler
2018-11-04 15:35:22 UTC
Permalink
Hmm, yeah that looks like a bug. I gave it a shot and was able to
reproduce it at first, but I eventually got it working. I think it has
something to do with changes for the new hotkey editor, like maybe if you
set up a new hotkey set then it'll start working? That could explain the
difference between your Linux and Windows Maya's...maybe you had some
hotkey's set up a certain way already on Linux but not Windows and that's
why it works there?

On Sat, Nov 3, 2018 at 2:38 PM 'ninu' via Python Programming for Autodesk
Post by 'ninu' via Python Programming for Autodesk Maya
Hi there,
I am having a issue. I created a hotkey with Python in maya 2018. It works
great on Linux but on windows it doesn't run or gives any error. Can
someone think of a reason why Maya would behave differently with its native
cmds.
Here is the sample code. works fine on Linux but not on windows.
import maya.cmds as cmds
cmds.nameCommand( 'hotkeyTest', ann='Hotkey Test',
c='python("cmds.polyCube()")')
cmds.hotkey( keyShortcut='1', altModifier=True, name='hotkeyTest')
Thanks
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/f1059f64-e9d4-4304-a06a-8e8e2d90795f%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/f1059f64-e9d4-4304-a06a-8e8e2d90795f%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CALKD2Wo-AWuwOBM7LMTw2CORSXO5TVXoDozE1RjxAqbHMkwxtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...