Maya Shelf and Script Netowrk Repository

485 views
Skip to first unread message

md

unread,
Jul 16, 2014, 9:33:56 AM7/16/14
to python_in...@googlegroups.com
Hey Guys,

I am sure this is an RTFM question ... but can anyone point me to instructions on setting up a network repository for scripts and shelves I want to auto-load on all our workstations ?

I will continue to read the docs, but thought someone here might be able to give me direct information.

Thanks

M

Eric Thivierge

unread,
Jul 16, 2014, 9:44:28 AM7/16/14
to python_in...@googlegroups.com
Hey Mike,

Good luck with this. It's an utter cluster fuck. :\

There are two things I think you'll need to manage:

Maya.env
=====================
Location: C:\Users\ethivierge\Documents\maya\2014-x64\Maya.env

File contents:
MAYA_MODULE_PATH=U:\PROD\Creation
Platform\Splice\maya\1.11\FabricSpliceMaya2014SP3;

This is in mine currently. That is pointing to locations with Maya
plugins in them.


userSetup.py
=====================
Location:
C:\Users\ethivierge\Documents\maya\2014-x64\scripts\userSetup.py

File contents:
import sys
sys.path.append("D:\dev")

This adds Python folders to the Maya python path.


Hope that helps. The setup of this kind of configuration is still
confusing to me and I don't fully understand it.

Best,
Eric T.


On Wednesday, July 16, 2014 9:33:56 AM, md wrote:
> Hey Guys,
>
> I am sure this is an*RTFM* question ... but can anyone point me to
> instructions on setting up a network repository for scripts and
> shelves I want to auto-load on all our workstations ?
>
> I will continue to read the docs, but thought someone here might be
> able to give me direct information.
>
> Thanks
>
> M
>
> --
> 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_m...@googlegroups.com
> <mailto:python_inside_m...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/248ba126-108f-4d39-964c-1e1c311ceb14%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/248ba126-108f-4d39-964c-1e1c311ceb14%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Eric Thivierge

unread,
Jul 16, 2014, 9:48:10 AM7/16/14
to python_in...@googlegroups.com
Pardon the language folks. I thought I replied directly to Mike. :\

Tony Barbieri

unread,
Jul 16, 2014, 10:18:53 AM7/16/14
to python_in...@googlegroups.com
Haha, it can be a cluster fuck though :).

As Eric pointed out, the userSetup.py is a good entry point as it gets run every time maya starts.  I don't bother messing with the Maya.env file at all.  If you can at least get a single userSetup.py into to user's PYTHONPATH before startup, you should be good to go from there.  We've solved these issues by having wrapper scripts to startup our applications.  This gives us complete control for setting up the user's environment.  You'll also want to look at the available environment variables Maya offers.  That's where you'll solve your shelf issue.

userSetup.py is run early enough that you can manipulate the environment variables using os.environ.  We also use python scripts to start our applications and feed environment dictionaries into the subprocess.Popen command.

Hope that helps some.

Best,


--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/53C6828D.6060709%40hybride.com.

For more options, visit https://groups.google.com/d/optout.



--
Tony

Gabriele Bartoli

unread,
Jul 16, 2014, 11:20:34 AM7/16/14
to python_in...@googlegroups.com
Hi, this is the code I use for my Maya.env accross multiple machines, to keep stuff in sync using Google Drive. It is not exactly a network repository but it gets the job done :P

// Note: shelves appear to not work properly (load but empty) if MAYA_SHELF_PATH
//is not defined before MAYA_SCRIPT_PATH */


//Windows syntax


//SHARED_PATH = D:\GoogleDrive\Maya\shared_folder
//MAYA_SHELF_PATH = %SHARED_PATH%\shelves
//MAYA_SCRIPT_PATH = %SHARED_PATH%\scripts
//XBMLANGPATH = %SHARED_PATH%\icons
//PYTHONPATH = %SHARED_PATH%\pythonpath


//Mac syntax

SHARED_PATH = /Users/Gabriele/GoogleDrive/Maya/shared_folder
MAYA_SHELF_PATH = $SHARED_PATH/shelves
MAYA_SCRIPT_PATH = $SHARED_PATH/scripts
XBMLANGPATH = $SHARED_PATH/icons
PYTHONPATH = $SHARED_PATH/pythonpath //Required to load custo userSetup.py

Risto Jankkila

unread,
Jul 22, 2014, 4:07:09 PM7/22/14
to python_in...@googlegroups.com
Problem with loading shelves from shared location is that Maya likes to save local copies of them. Usually that means people easily end up using a local copy of the shelf instead of the one in shared location. 

I once had write a Python script for automatically updating shelves from shared location. It took me days to reverse engineer all that mel code from mid 90's and make sure Maya loads the correct shelves, removes local copies, updates optionVars etc. What a nightmare.

Cheers,
Risto



--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b0a0814b-62e8-4787-b89d-b374a4fba2ae%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-------------------------------------------
Risto Jankkila
mob. +44 (0)77 6741 9890 (UK)
mob. +358 (0)40 5422 625 (FI)
ristoj...@gmail.com
-------------------------------------------

Eduardo Grana

unread,
Jul 22, 2014, 9:06:06 PM7/22/14
to python_in...@googlegroups.com
Hello People,
I also did the update local shelves script =(, but what i ended up doing, is creating a shelf layout of my own where i load the shared shelves. Most of the shelf functionality is easy to reproduce, and you can add stuff like selective loading
if you like.
Cheers!
Eduardo



For more options, visit https://groups.google.com/d/optout.



--
Eduardo Graña
www.eduardograna.com.ar
Reply all
Reply to author
Forward
0 new messages