Wednesday 26 October 2016

maya.mel.eval() not working

The Problem:
I got these errors when trying to run my batch FBX exporting script today:

global name 'maya' is not defined
# Error: NameError: file <maya console> line 1: name 'maya' is not defined

How annoying. After rummaging through my script I came to the line which was causing me the error, which was the maya.mel.eval() script (whereby you can run MEL commands in python).

The Fix:
Turns out, Maya had turned off all of its plugins and that's what was causing the error. Not sure which one was the correct one to turn on, as I didn't have the time or patience to test it out, so I just turned them all back on under Windows>Preferences>Plug-in Manager and checked the box 'Loaded' under 'Apply to all'.

No comments:

Post a Comment