Quantcast
Channel: CGMonks » Tips
Viewing all articles
Browse latest Browse all 4

if maya.env(): return frustration…

$
0
0

So at least to me, the maya.env setup has perpetually been an exercise in frustration. For years, it seemed it would remain shrouded in mystery. Recently as I’ve been making tools and learning I took some time to do some googling and I have a much better understanding of how to make it work  well so you don’t have to!

So, let’s set it up…

Homework first!

  1. Find your maya folder where your maya.env resides
    On a typical pc install, that will be ‘ \My Documents\maya\%version\’. In my case, it’s ‘X:\My Documents\maya\2011-x64′
  2. Remember where you installed the cgmtools repository to

Let’s get to it.
Note – this is for a Windows setup

  1. Make sure Maya is closed
  2. The first thing we wanna add is an inline variable we can call. This doesn’t have to be done but with multiple repositories, I found it easier. We’ll add this to the top
    REPOSPATH = X:/repos/
  3. Then if you already have some paths on Maya_Script_Path or PythonPath, you can amend them by putting the following at the end of each one followed by a ';'
    %REPOSPATH%/cgmtools/mayaTools;
    %REPOSPATH%/cgmtools/mayaTools;
  4. Open up Maya and type the following in a mel command line:
    cgmToolbox

Here's an example of a clean maya.env with no other paths added.

REPOSPATH = X:/repos/

MAYA_SCRIPT_PATH=%REPOSPATH%/cgmtools/mayaTools;

PYTHONPATH=%REPOSPATH%/cgmtools/mayaTools;

...


Viewing all articles
Browse latest Browse all 4

Trending Articles