View Single Post
# 3 11-03-2005 , 02:50 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
if you have a procedure in a file e.g.

global proc alanTest()
{
print("blah\n");
}

you run it with by typing alanTest. However as lori_hunter said you have to source it first. So if I wanted it to pick up my changes each time I ran it I would do this:

source "path to my script";
alanTest;

And then run them togther each time to make sure it's sourced each time. Also the thing lori_hunter said about local memory is true if you declare a variable in the script editor it will stay persistent until you close maya. A good way around this is to encapsulate it in {} brackets. That way it's declared in "scope" and wont affect the global session. Good for testing out stuff.

user added image
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB