PDA

View Full Version : Execute scipts on file load


GrimPixel
12-04-2006, 05:42 AM
I am aware of the usersetup.mel and being able to execute scripts when Maya loads. However, I was curious if anyone had good suggestions on executing specific scripts on file load. IE if I open up a rig file in our pipeline I would like series of scripts executed, but as the file is passed to an animator I want to have the same scripts execute with different options. Keeping track of who has what in the userestup.mel is hard enough, so it would be nice to just associate certain things on a per file basis. Not necessarily place the entire script into the file, but just the command with the right options.

The only way I thought of doing this is to save everything over as .ma and then insert the calls for the mel by hand or in some form of batch process. Seems like a heck of allot more work then should be required, but it may be the only option.

Any ideas?

Grim

grantimus
12-04-2006, 06:44 AM
Take a look at the documentation for the command `scriptNode`. It was designed for exactly this type of thing, and it is very easy to set up.

CGTalk Moderation
12-04-2006, 06:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.