PDA

View Full Version : Using MEL to save copies of a file


jporter313
09-05-2005, 01:04 AM
Hey all, kind of new to MEL, is there a way to use MEL to save the current file as a copy using a variable as the filename?

Ideally I would like to be able to save a few versions of the current file, but once the script is done have the person still be working on the file they started with, if this isn't possible can I at least use MEL to save the file using a different filename and set the filename using a variable?

Thanks in advance for any help.

jporter313
09-05-2005, 01:59 AM
also, how can I query the names and number of Render layers in a scene?

darkjedi1929
09-05-2005, 02:30 AM
to your first question, the code is:


string $fileName = whatever;
string $path = yourPath;
string $fullName = $fileName + $path;

file -rn $fullName;
file -s;


Over here, its not necessary to set a value to the $fileName variable, but absolutely necessary to set a value to the $path variable.

jporter313
09-05-2005, 02:59 AM
to your first question, the code is:


string $fileName = whatever;
string $path = yourPath;
string $fullName = $fileName + $path;

file -rn $fullName;
file -s;


Over here, its not necessary to set a value to the $fileName variable, but absolutely necessary to set a value to the $path variable.

Cool, that gives me a good starting point for the first question. Any ideas on the second one? I thought this would be an easy answer to find, but I haven't been able to figure it out yet.

Thanks a lot.

CGTalk Moderation
09-05-2005, 02:59 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.