shared by many users\Pc

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2018 shared by many users\Pc

Hi everybody!
I'm working on some custom shelves in python...not a simple thing for me:-)
Is possible to have a single for many pc?...because in there i call the python script with the shelf and i would like it to work for all the users...does any of the maya search path overwrite the default search location for the file?
Thanks Alot!
  02 February 2018 is a user settings file, so you wouldn't want to override that. It's not the right place to put scripts for shelves. Instead, put them in a module and import the module in the shelves.

For example, if your shared directory containing scripts is F:/Scripts, have users add this to

import sys
path = ''F:/Scripts''

to add the script directory to the search path. Then you just import scripts in your shelf scripts:

def run(): 
 import helper_script

to import the F:/Scripts/ module.

Maya modules are a more elegant way of doing it, but this works.
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:05 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.