You're right, it just has to be importable, so sys.path. I think I got my 
maya / python brains crossed there.

Also glad it got worked out!

On Tuesday, November 24, 2015 at 2:20:55 PM UTC-6, Justin Israel wrote:
>
>
>
> On Wed, Nov 25, 2015 at 8:47 AM Robert White <robert....@gmail.com 
> <javascript:>> wrote:
>
>> So I just tested that in Maya2016 and it seemed to work fine. Remember 
>> that anything printed in a userSetup.py will most likely end up in the 
>> output window (which is minimized by default in 2016), and not in the 
>> script editor window once Maya is done loading. This is because 
>> userSetup.py is run before the various GUI elements have actually been spun 
>> up and initialized.
>>
>> Just in case, double check that the env variable MAYA_SKIP_USERSETUP_PY 
>> isn't set, and obviously that your userSetup.py is on the PYTHONPATH.
>>
>
> I didn't think it had to be on the PYTHONPATH if you use one of the 
> standard Maya location. Doesn't it just need to live in a maya "scripts" 
> directory? Either in the "shared/scripts" or "<version>/scripts" locations?
>
>
>>
>> On Tuesday, November 24, 2015 at 1:15:19 PM UTC-6, Aren Voorhees wrote:
>>>
>>> Hey everyone,
>>>
>>> I'm trying to use the userSetup.py to do some imports whenever Maya is 
>>> started up (ex. import pymel.core as pm, import maya.cmds as cmds, etc).  
>>> However I can't seem to get the file to run on Maya's startup.  I know I've 
>>> done this before on a different computer without issue.  Even boiling it 
>>> down to something as simple as putting: print "Hello World" in userSetup.py 
>>> doesn't do anything.  
>>>
>>> Inside of Maya I've tried doing: 
>>>
>>> import sys
>>>
>>>
>>> for p in sys.path:
>>>     print p
>>>
>>>
>>> Of course that gives me a list of paths...I've tried putting the 
>>> userSetup.py in many different of those places and still no luck.
>>>
>>> I also tried:
>>>
>>> print cmds.internalVar(usd=True)
>>>
>>> and putting userSetup.py there (which I had already tried earlier, but 
>>> hey, why not).
>>>
>>> I've also tried blowing away my maya.env file to make sure that wasn't 
>>> doing anything weird.  
>>>
>>> Any ideas?
>>>
>>> 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+unsubscr...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/86384880-5b5f-4c85-b60c-669b961c308d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/86384880-5b5f-4c85-b60c-669b961c308d%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/b2eca0f5-d20d-4aef-9566-4d5adda208fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to