ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

Pymel with Maya2013 #275

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I tried to run pymel through mayapy (It worked fine through maya -prompt 
by the way), I saw the following issue: 

c:\Program Files\Autodesk\Maya2013\bin>mayapy Python 2.6.4 (r264:75706, May 19 
2011, 13:53:43) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", 
"credits" or "license" for more information. 

>>> import pymel.core as pm Warning: file: c:/Program 
Files/Autodesk/Maya2013/scripts/startup/initialStartup.mel line 192: Y-axis is 
already the Up- axis pymel.internal.startup : ERROR : could not perform Maya 
initialization sequence: failed on namedCommandSetup.mel: 
Error occurred during execution of MEL script 

Any idea?

Thanks!
Michael

@ What Version of Maya are you using? Maya 2013 International

@ On what operating system? Windows Vista SP2 Business Edition

@ What Version of PyMEL are you using? Whatever comes with Maya 2013

Original issue reported on code.google.com by templar...@gmail.com on 24 May 2012 at 10:00

GoogleCodeExporter commented 9 years ago
Does it fail for all users? or, alternatively, if you temporarily move your 
maya settings files (from, say, C:\Users\YOUR_USER\maya to 
C:\Users\YOUR_USER\maya.bak), does it still happen?

Original comment by elron...@gmail.com on 22 Jun 2012 at 12:18

GoogleCodeExporter commented 9 years ago
Yes, the problem persists...

Original comment by templar...@gmail.com on 22 Jun 2012 at 12:34

GoogleCodeExporter commented 9 years ago
i've got the same problem here.

is there any solution for this?
and does anyone know, what the negative influence of this error is?
because ipymel seems to be working without problems so far...

renaming the maya-folder changes nothing here...

thank you for your help!
Janosch

@ What Version of Maya are you using? Maya 2013 International

@ On what operating system? Windows 7 Professional

@ What Version of PyMEL are you using? Whatever comes with Maya 2013

Original comment by koehler....@gmail.com on 25 Oct 2012 at 12:35

GoogleCodeExporter commented 9 years ago
I noticed this at work, using mayapy from Maya 2013 x64 SP1 on Windows 7.  But 
at home, using mayapy from 2013 x64 SP1 on OSX 10.6.8, the ERROR doesn't seem 
to happen, although the Warning still does.  I'm new to Maya and PyMEL, so I 
don't know if these were being thrown in earlier versions, but these seem to be 
two separate issues.

1) The Warning is being  thrown in Autodesk's 
"scripts/startup/initialStartup.mel" script, where it executes "upAxis -axis 
`optionVar -q upAxisDirection` -rv;" - presumably the upAxis has already been 
set earlier.  Poking around, it seems that maya.standalone.initialize() sets 
this to "Y"- maya.OpenMaya.MGlobal.isYAxisUp() returns a "kFailure:Object does 
not exist" runtime error before the standalone initialize(), but True 
afterwards.  PyMEL calls standalone.initialize() before running various MEL 
startup scripts, it would appear, so the UpAxis gets set to Y.  PyMEL then runs 
initialStartup.mel (in internal.startup.finalize), and if the user preference 
is also Y, the upAxis call gives the warning.  You wouldn't get the warning if 
the user preference was Z (since the call would change it from Y to Z), and the 
warning would seem harmless anyway.  

I don't think there is much PyMEL can do - Autodesk could change 
initialStartup.mel to only make the upAxis call if the user preference is 
different from the current setting.  They actually DO this in 
scripts/startup/syncPreferencesOptVars.mel, noting correctly in a comment that 
"For some weird reason upAxis gives a warning if you set it to the current 
value"!  I'm not sure if the upAxis is uninitialized when Maya is run in GUI or 
batch mode, and so initialStartup.mel sets it for the first time, or if the 
warning is being thrown then too.  Print/warning commands at that point in the 
Maya application startup don't seem to be going either to the console or to the 
script editor window.

2) For the ERROR, presumably something is causing the namedCommandSetup.mel 
script to fail when PyMEL calls it, which appears only to happen when running 
in kLibraryApp mode (i.e. mayapy).  Since the error it doesn't seem to occur on 
my Mac setup at home, I'll have to wait until next week to get access to the 
Windows setup again, and I'll post if I see anything of interest in what is 
actually throwing the error.  namedCommandSetup.mel seems to some funky stuff 
with menus and commands, so I don't know if the problem is Windows-related, or 
because of user changes to menu options, or what.  Because it fails, PyMEL's 
startup.py will probably skip the rest of its list of MEL startup files to 
execute (userNamedCommands.mel, pluginPrefs.mel), but that may not 
significantly affect mayapy usage?

Original comment by davidobe...@gmail.com on 1 Jan 2013 at 8:04