PDA

View Full Version : saving two playblast outputs simultaneously


Flaye
05-15-2007, 04:49 PM
Hi...I'd like to know if it's possible to script the playblast command to output to two separate locations at the same time. I have scripted one version, using the -filename option, but can't seem to get another one running.

Also...I'd like to have one version overwrite the current existing file, while the second one (in the second folder) keep a detailed log with time and date added to the filename.

Any help will be greatly appreciated.

Thanks.

scottiedoo
05-15-2007, 06:55 PM
Your best option is to go ahead and playblast like you already have it and then simply copy that file to the other location. You can also rename the file at the same time as you copy so you could append whatever information to the filename as you like.

Take a look at the sysFile command and that should help you out.

Good luck,
Scott

Flaye
05-15-2007, 09:57 PM
Thanks for the reply....but I'm trying to automate that process. We're rendering hundreds of clips, and it will be a nightmare to go and copy them back and forth and rename them.

I have a MEL script that saves the playblasts in their relevant folder. I want to take that same playblast file and copy it to another folder on the tree.

I've tried using the system and sysFile -copy commands, but unfortunately they didn't work.
Maybe someone can shed some light on it.

Much appreciated.

scottiedoo
05-16-2007, 02:50 AM
Yes, that is what I am saying, you can use the sysFile command in your script to copy and rename at the same time after the playblast here is an example:


// set some paths and names
string $playblastFolder = "c:/";
string $copyToFolder = "c:/temp/";
string $filename = "scene_001";

// get the date and make it legal for a filename
string $rawDate = `about -currentDate`;
string $date = `substituteAllString $rawDate "/" ""`;

// playblast
playblast -filename ($playblastFolder + $filename + ".avi") -forceOverwrite ;

// copy the playblast to the new directory and add the date
sysFile -copy ($copyToFolder + $filename + "_" + $date + ".avi") ($playblastFolder + $filename + ".avi");


You can do the same if you wanted to add the current time as well. Just look at the about command.

I hope that makes sense into what I originally mentioned.

-Scott

Flaye
05-18-2007, 12:55 AM
Scott...If I ever meet you, I'm buying you a beer! Thank you very much for your help. Cheers.

scottiedoo
05-18-2007, 05:28 AM
Haha, sounds good to me! No problem, I'm glad I could help you out. Good luck with your coding..

-Scott

Flaye
05-18-2007, 01:00 PM
the about -currentTime seems to cause a hang up...

Flaye
05-18-2007, 02:13 PM
when using the about -currentTime, it places a colon ":" between the digits, and windows can't parse that...

removed it using the substituteAllString with an empty space.

little annoying thing, but now it finally works.

scottiedoo
05-18-2007, 04:12 PM
Yeah, that is what I had to do with the date is to strip off the "/" that gets put in there. Too bad there wasn't a flag to have a certain format of the date and time but oh well. I'm glad you got it worked out.

-Scott

CGTalk Moderation
05-18-2007, 04:12 PM
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.