// Copyright (C) 2004-2006 Geronimo Post&Design. // // // // Geronimo Post&Design Script File // MODIFY THIS AT YOUR OWN RISK // // // // By: Diego Prilusky // diego@geronimo.co.il // // Creation Date: February 2006 // // Procedure Name: // dp_SaveScenePlus // // Description: // Saves the current file as new file, incrementing the file version. // If there is no version, the string _v01 will be added at the end of the file name. // If the file already have some kind of numbering, it will save the file as a new file with // the new version. // // Input Arguments: // None. // // Return Value: // None. // global proc dp_SaveScenePlus() { string $dp_arrayPathName[] = `file -q -l`; string $dp_arrayFileName[] = stringToStringArray($dp_arrayPathName[0], "." ); $_existFile = eval("file -q -ex \""+$dp_arrayPathName[0]+"\""); if($_existFile && size($dp_arrayFileName)>1) { string $extension, $overWrite, $version[], $filePrefix[], $SofixFileName, $PREFIXfileName, $newFileName, $remove[], $pathString; int $endString, $in = 0, $flag = 0, $count = 0, $existFile, $offset; clear $filePrefix; clear $version; switch ($dp_arrayFileName[size($dp_arrayFileName)-1]) { case "ma": $extension = "mayaAscii"; break; case "mb": $extension = "mayaBinary"; break; } for($i=0;$i