The problem was I had

C:\PRODUCTION\SCRIPTS\python\userSetup.py

containing

from pymel import *
import sys
sys.path.append('C:/PRODUCTION/SCRIPTS/python')

which was seen by both 2009 and 2011. Since 2009 was using PyMel .9,
and Pymel 1.0 works with "import py.core as py", it was keeping 2011
from opening.

I'm now only using userSetup.py in

C:\Documents and Settings\<User>\My Documents\maya\<Version>

rather than having both Maya versions use the same userSetup file.


On the whole, loving PyMel in 2011. Especially with the new script
editor, which helps catch a lot of mistakes.


On Apr 20, 3:08 pm, John Creson <[email protected]> wrote:
> Nope, that's pertinent.
>
> I imagine the way you are working around this is putting one userSetup.py in
> 2009/scripts and one in 2011/scripts ?
>
> Or are you running a check in your universal userSetup.py before
> loading in PyMel?
>
> There are some nice things about being able to have multiple
> userSetup.py files, this is not one of them...
>
>
>
> On Tue, Apr 20, 2010 at 1:58 PM, Kevin W <[email protected]> wrote:
> > Turns out there was another userSetup.py left over from pymel 0.92 for
> > Maya 2009. When I was launching 2011, it would see two userSetup.py,
> > and try to import pymel 0.92 as well as the pymel 1.0 that comes with
> > 2011. I now have separate userSetup.py for 2009 and 2011, although I
> > should move everything over to 1.0 soon
>
> > Next question will be pertinent, I swear ;)
>
> > On Apr 20, 10:08 am, Chris G <[email protected]> wrote:
> >> You could also try starting mayapy with '-v' verbose flag.
>
> >> On Tue, Apr 20, 2010 at 12:56 PM, John Creson <[email protected]> wrote:
> >> > is there a __init__.py in your 'C:/PRODUCTION/SCRIPTS/python that has
> >> > something inside?
> >> > or perhaps there is a userSetup.py in there that is appending that
> >> > folder infinitely?
>
> >> > On Tue, Apr 20, 2010 at 4:05 AM, Kevin W <[email protected]> wrote:
> >> > > I'm trying to import some custom modules when Maya loads, but it seems
> >> > > to keep maya from loading.
>
> >> > > At first I tried adding a few lines to userSetup.py
>
> >> > > import sys
> >> > > sys.path.append('C:/PRODUCTION/SCRIPTS/python')
>
> >> > > I then tried
> >> > > PYTHONPATH = C:\PRODUCTION\SCRIPTS\python;
>
> >> > > as a environmental variable in Windows 7 as well as a variable in my
> >> > > Maya.env file.
>
> >> > > No matter which way, Maya doesn't finish loading (or start loading,
> >> > > really) and I wind up killing it.
>
> >> > > I tried each method one at a time. I haven't hard any problems with
> >> > > using custom paths for MEL scripts, or using environment variables to
> >> > > use python interactively. When i run the two lines of python, I can
> >> > > then load my modules as expected.
>
> >> > > Any thoughts?
>
> >> > > Thanks,
>
> >> > > Kevin
>
> >> > > --
> >> > >http://groups.google.com/group/python_inside_maya
>
> >> > --
> >> >http://groups.google.com/group/python_inside_maya
>
> >> --http://groups.google.com/group/python_inside_maya
>
> > --
> >http://groups.google.com/group/python_inside_maya
>
> --http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to