Message 1 of 6
Problems loading Python scripts / plugins in Maya 2013
Not applicable
06-18-2012
07:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had written a plugin consisting of a few Maya DG nodes as well as some python scripts. The various python methods are split across several files (one .py for each DG node, one .py for methods/functions shared by the DG nodes implentations, finally one .py file with the load/unload routines that register each of the plugin DG nodes).
I first developed this plugin for Maya 2009, and the code and its "deployment" (I use the term loosely) worked fine for me and a client/user of the plugin. When I upgraded to Maya 2012 (I skipped 2010/2011 initially), the same deployment no longer loads from the Plugin Manager (or with loadPlugin). The script editor output isn't very revealing:
// Error: SyntaxError: invalid syntax //
// Warning: Failed to run file: D:/Users/Paul/Documents/Maya/pythonPlugins/ImageG/imageG.py //
(No line numbers where errors are encountered, specific type of error)
I've likewise had no luck in Maya 2013 or Maya 2011 (gotten off subscription).
Each of the .py files for the plugin reside in "D:\Users\Paul\Documents\Maya\pythonPlugins\ImageG". A .py while with shared functions lives in "D:\Users\Paul\Documents\Maya\pythonPlugins\ImageG\scripts"
I'll note as well that I have a downloaded plugin from the Internet that is confined to one file (cvShapeInverter) that does load correctly in Maya 2011, 2012, and 2013
Any ideas what's going on or how to proceed ?
This is my Maya.env which worked for 2009:
<<<<<Start Maya.env>>>>
<<<<< End Maya.env>>>
Thanks,
Paul
I first developed this plugin for Maya 2009, and the code and its "deployment" (I use the term loosely) worked fine for me and a client/user of the plugin. When I upgraded to Maya 2012 (I skipped 2010/2011 initially), the same deployment no longer loads from the Plugin Manager (or with loadPlugin). The script editor output isn't very revealing:
// Error: SyntaxError: invalid syntax //
// Warning: Failed to run file: D:/Users/Paul/Documents/Maya/pythonPlugins/ImageG/imageG.py //
(No line numbers where errors are encountered, specific type of error)
I've likewise had no luck in Maya 2013 or Maya 2011 (gotten off subscription).
Each of the .py files for the plugin reside in "D:\Users\Paul\Documents\Maya\pythonPlugins\ImageG". A .py while with shared functions lives in "D:\Users\Paul\Documents\Maya\pythonPlugins\ImageG\scripts"
I'll note as well that I have a downloaded plugin from the Internet that is confined to one file (cvShapeInverter) that does load correctly in Maya 2011, 2012, and 2013
Any ideas what's going on or how to proceed ?
This is my Maya.env which worked for 2009:
<<<<<Start Maya.env>>>>
# Set a base directory location for plugins and scripts
IMAGE_G_PLUGIN_HOME = D:\Users\Paul\Documents\Maya\pythonPlugins\ImageG
CV_SHAPE_INVERTER_PLUGIN_HOME = D:\Users\Paul\Documents\Maya\pythonPlugins\cvShapeInverter
MAYA_PLUG_IN_PATH = C:\Program Files\Autodesk\Maya2013\devkit\plug-ins\scripted\;&#xIM;AGE_G_PLUGIN_HOME%;V;_SHAPE_INVERTER_PLUGIN_HOME%;
# Add the location for ImageG AE Templates
MAYA_SCRIPT_PATH = &#xMA;YA_SCRIPT_PATH%;&#xIM;AGE_G_PLUGIN_HOME%\AETemplates;
PYTHONPATH = &#xIM;AGE_G_PLUGIN_HOME%\scripts;&#xIM;AGE_G_PLUGIN_HOME%;V;_SHAPE_INVERTER_PLUGIN_HOME%\scripts;
<<<<< End Maya.env>>>
Thanks,
Paul