//////////////////////////////////////////////////////////////////////////////// // Name: pipeScriptOutput.mel // // Description: Acts like the UNIX pipe (">") function in that you can // pipe the output of the script editor to a text file on // disk. Good for debugging and on-the-fly script generation. // Supply command and file path as input. It's a shell now, // UI on the way and some more functionality. // // Created by: Rob O'Neill (oneill@parsons.edu) // // Usage: Place pipeScriptOutput.mel in the scripts directory. // Type pipeScriptOutput at the command line or script editor in Maya // along with the command to run and the file path. // // Use and modify at your own risk. // Comments and suggestions always wanted. //////////////////////////////////////////////////////////////////////////////// global proc pipeScriptOutput(string $userCommand, string $filePath) { cmdFileOutput -o $filePath; eval($userCommand); cmdFileOutput -ca; print ("Output of " + $userCommand + " piped to " + $filePath + "\n"); }