February 20, 2010

Open Script

Quick little script for opening files in the current folder, good little trick if you work like I do, and if you hate getting distracted everytime you have to go hunting for the file you want to open.


string $file = "_ANIM.mb";
file -save;
string $scenename = `file -q -sceneName`;
$filename_arr= stringToStringArray($scenename, "/");
stringArrayRemoveAtIndex((size($filename_arr)-1), $filename_arr);
$filename_arr[size($filename_arr)] = $file;
string $filename = stringArrayToString($filename_arr, "/");
file -o -f $filename;


Of course replacing the $file with as many different files as you want. In each shot I'll have an _ANIM, _CAM, _ENV, _LIGHTING, & _RENDER at least, so I can quickly zap between them using duplicates of this script.

No comments:

Post a Comment