Hi Kenneth, I believe you should be able to use a usercustomize.py which will be loaded just after sitecustomize.py. Also, you can load both a userSetup.mel and a userSetup.py. Mind you, userSetup.py is called later than userSetup.mel and cannot perform all commands that userSetup.mel can perform…
And from python, you can dynamically import other scripts, perhaps based off your machine names… (haven’t tried this myself) import socket moduleNames = [ 'sys', 'os', socket.gethostname() ] modules = map(__import__, moduleNames) By the way, I’ve never gotten around reading up on how the site/usercustomize.py differs from the userSetup.py/mel – and I can’t find any documentation on sitecustomize.py … what’s the main difference? // Fredrik On Mon, Jun 9, 2014 at 9:03 PM, Kenneth Polonski <kpolon...@gmail.com> wrote: Hey everyone, > > So I've recently written a custom menu with some pipeline tools for the > company I work for. Basically my workflow to load it is the following: > > > 1. PYTHONPATH env variable is set with maya wrapper script. > 2. sitecustomize.py file is loaded and appends my module's path to the > sys.path list > 3. global userSetup.py file is read to import the modules and > executeDefered is used to load the menu after maya's initialization > > > This all works perfectly, but the problem comes when a user's personal > userSetup.(py/mel) file will not be executed. > > How would it be possible for me to load the site wide userSetup.py file > and still have the individual user's userSetup files be functional? I > really don't know another way to load the menu without using a userSetup > file so if anyone could tell me another way (or a way to get 2 userSetup > files to work) that would be great! > > Thanks, > > Kenny > > -- > 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/16f93c91-de9d-4593-b9df-fa4e8a2e8a5e%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/16f93c91-de9d-4593-b9df-fa4e8a2e8a5e%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/CAD%3DwhWOquaG%2BmqB6s_DWwE83i84q%3Dbt4Mx_pfowR48YBuWsEhQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.