Here is my deal. I am initializing my python environment in userSetup.py. I am also running mayapy to batch process export files. When I run Maya normally and attempt to import my packages it works fine. However, when I use subprocess.Popen to run mayapy it doesn’t seem to import my entire package. Following is the output of a dir() of the module in both instances:
Maya normal startup:
DB : <module ‘<<<module>>>’ from ‘<<<path>>>’> > [‘AssetDB’, ‘builtins’, ‘doc’, ‘file’, ‘name’, ‘package’, ‘dirtyAssets’, ‘generateAssetDB’, ‘generateAssetFileList’, ‘generateAssetObjects’, ‘inspect’, ‘loadAssetDB’, ‘os’, ‘projectModule’, ‘re’, ‘shazObject’]
subprocess.Popen startup:
DB : <module ‘<<<module>>>’ from ‘<<<path>>>’> > [‘builtins’, ‘doc’, ‘file’, ‘name’, ‘package’, ‘inspect’, ‘os’, ‘re’, ‘shazObject’]
You’ll note that ‘AssetDB’, ‘dirtyAssets’, ‘generateAssetDB’, ‘generateAssetFileList’, ‘generateAssetObjects’, ‘loadAssetDB’ are not present in the second. These are my class and methods in the module.
What am I missing here?
Here is the call I am using :
subprocess.Popen([‘mayapy’, <<<args>>>], shell=True)
-L