My favorites | Sign in
Project Home Downloads Wiki
Search
for
SettingUp  
General information about setting up your computer for the workshop
setup, general, howto
Updated Feb 4, 2010 by danro...@gmail.com

Setting Up

As the class time we have is a bit tight, it would be extremelly helpful if everybody would have their computer up and running for the scripting workshop. Here is a list of what you need to to in order to achieve this. Keep in mind that this is a one time process only: once you have everything set up, you can forget all about this.

Installing Maya

You need Maya2008 installed in order to do the workshop. There are versions for Macs and PCs, and they should work fine in most laptops specifications.

Scripts folder

You need now to create a folder where you are going to store all your scripts. I recommend creating a folder in a place easy to find, with a simple and short name, and without spaces in its name.

Mine, for example is simply "Scripts", which in my computer is located on the path D:\Users\Daniel\Documents\Scripts. See that there are no spaces in this path, which is very important for the next step. Here are some other examples of folder names:

Good paths:

  • C:\Scripts
  • D:\Documents\DIAScripting
  • D:\MyName\MyDocuments\SchoolStuff\WS2008\Scripting\Scripts

BAD paths:

  • C:\DIA Scripting
  • D:\Documents and Settings\My Documents\scripting workshop
  • C:\my scripts folder

I guess it is clear enough: simple, without spaces. And remember the path to your folder for the next steps.

System Variables

Maya need to know now where is this folder which you just created. For that, there are two steps to follow, one of which is to setup the System Variables.

Windows:

  1. Go to My Computer > Properties > Advanced > Environment Variables (Windows XP) or Computer > Properties > Advanced System Settings > Environment Variables (Vista)
  2. You'll be presented with a window with 2 panes. On the lower pane (System Variables), click on New...
  3. Type PYTHONPATH in Variable Name
  4. Type the path to your script folder in Variable value (example: C:\Scripts, without quotes)
  5. Click in OK

Mac:

  1. Open the terminal, start python by typing python
  2. type import sys, hit enter
  3. then type sys.path.append(’/Users/You/Documents/’), replace the path in single quotes with your path, hit enter
  4. type print sys.path to check if your path has been appended to the list

OBS: the instructions above may vary a bit from computer to computer.

Maya.env

The second step is to write your path on a file which maya reads everytime it starts. This file is called Maya.env, and is located on the following locations (assuming that you didn't change Maya's installation path during installation):

Windows

  • drive:\Documents and Settings\username\My Documents\maya\2008 (Windows XP)
  • drive:\Users\username\Documents\maya\2008 (Vista)

Mac

  • /Users/username/Library/Preferences/Autodesk/maya/2008

OBS: These paths may vary a bit from computer to computer. In any case, use your operating system's search engine to find either the file itself of Maya's installation path.

In case you don't find the file Maya.env in any of the locations above, you can simply create it by following the next steps.

In case you found it, follow the next steps:

  1. On a simple text editor, open the file Maya.env(or open a new file in case you don't find it)
  2. If you never edited it, it is probably an empty file.
  3. Add the following text:
  4. USER_SCRIPT_PATH = your_path; 
    MAYA_SCRIPT_PATH = $USER_SCRIPT_PATH;
    PYTHONPATH = $USER_SCRIPT_PATH;
  5. Save the file and close the text editor.

Important: Make sure to capitalize the name of the Maya.env file.

It should now be all set.

You can make a test by following the instructions in the wiki page TestingTheSetup

Comment by alicewon...@gmail.com, Nov 5, 2008

Daniel, have you found out what's the problem with mac? why the setup doesn't work for mac?


Sign in to add a comment
Powered by Google Project Hosting