userSetup.py file from network

userSetup.py file from network

jmartiniLBVRK
Explorer Explorer
980 Views
1 Reply
Message 1 of 2

userSetup.py file from network

jmartiniLBVRK
Explorer
Explorer

I've set an environment variable to point to a scripts folder where i placed userSetup.py along with an __init__.py however the script never seems to run. Here is my configuration.

 

The following env var is set:

MAYA_SCRIPT_PATH = 'Q:Studio\pipeline\apps\maya\scripts'

In this folder i have a python script userSetup.py

import os
import sys
import maya.cmds as cmds
import maya.mel as mel
from maya.utils import executeDeferred
def main(): print('----------main----------') def init(): print('----------executeDeferred----------') main() executeDeferred(init)

When i launch maya i would expect it to show the print statement for the deferred fn. however nothing ever shows. What's wrong here?

 

0 Likes
Accepted solutions (1)
981 Views
1 Reply
Reply (1)
Message 2 of 2

michael--n
Explorer
Explorer
Accepted solution
MAYA_SCRIPT_PATH = 'Q:Studio\pipeline\apps\maya\scripts'

Is that a typo in the post or your maya.env file? You're missing a backslash after 'Q:'