AWS Thinkbox Discussion Forums

Draft Output Location

Now that im up and running with Draft (Thanks guys), Im wondering how to edit my quicktime locations from draft. Right now, it drops it in a new folder right under the deadline original output location. Im wondering if it is easy enough to make them go up 2 directories, and drop them in a different folder? Keep in mind im new to python…

Fred

[size=150]Change the Output Folder for All Integrated Scripts[/size]

  1. Open the Deadline Monitor.
  2. Enable Tools menu -> Super User Mode
  3. Choose Tools menu -> Configure Event Plugins… In the “Configure Event Plugins” dialog that appears:
    [list=1][*]Choose “Draft” in the left-hand column.
  4. Change the “Draft Output Folder” to the desired relative path. In your case, you’d change it to something like “…/…/mySubfolder”, without the quotes.
    [/*:m][/list:o]

[size=150]Change the Output Folder for One Integrated Script[/size]
The Python path manipulation functions are in the os.path module, so you’ll need to “import path” or “import os.path” at the top of your script to access the functions.

You can find a reference to the os.path functions here: http://docs.python.org/2/library/os.path.html

I think this will do what you want in the script you sent us. Find this line: (outBase, outExt)= os.path.splitext( params['outFile'] )
and replace it with:[code]# Say params[‘outFile’] is “\path\to\my\filename.mov”. This will set outDir = “\path\to\my”, and outFilename = “filename.mov”.
(outDir, outFilename) = os.path.split( params[‘outFile’] )

Set outDir up two directories. os.pardir is the “parent directory”.

outDir = os.path.join( os.path.join( outDir, os.pardir ), os.pardir )

Split “filename.mov” into outStem = “filename” and outExt = “.mov”

(outStem, outExt) = os.path.splitext( outFilename )

Set outBase to “\path\to\my…\filename”, as is needed by your script

outBase = os.path.join( outDir, outStem )[/code]

If you want to place the output up two directories and inside a subfolder:[code]import errno

from: http://stackoverflow.com/questions/273192/python-best-way-to-create-directory-if-it-doesnt-exist-for-file-write

posted by Heikki Toivonen http://stackoverflow.com/users/62596/heikki-toivonen

def ensure_dir_exists( dir ):
try:
os.makedirs( dir )
except OSError as exception:
if exception.errno != errno.EEXIST:
raise

Say params[‘outFile’] is “\path\to\my\filename.mov”. This will set outDir = “\path\to\my”, and outFilename = “filename.mov”.

(outDir, outFilename) = os.path.split( params[‘outFile’] )

Set outDir up two directories. os.pardir is the “parent directory”.

outDir = os.path.join( os.path.join( outDir, os.pardir ), os.pardir )

Reset outDir to a subfolder named “mySubfolder” inside the current outDir

outDir = os.path.join( outDir, “mySubfolder” )

Get the canonical path of outDir. This will change outDir from “\path\to\my…\mySubfolder” to “\path\mySubfolder”.

outDir = os.path.realpath( outDir )

Make sure the outDir exists

ensure_dir_exists( outDir )

Split “filename.mov” into outStem = “filename” and outExt = “.mov”

(outStem, outExt) = os.path.splitext( outFilename )

Set outBase to “\path\mySubfolder\filename”, as is needed by your script

outBase = os.path.join( outDir, outStem )[/code]

Edit: Added “Change the Output Folder for All Integrated Scripts”.

Paul has shown you how to do it programmatically. (Although I think you wanted it in a new folder? You’d need a few more changes for that: add it to the path, then make sure it exists.) Alternately, you can do it by changing the parameter “Output file”… change it to the correct directory before running the script.

Cheers,
Andrea

That’s awesome. I didn’t realize you could use …/ to go up a directory. Is there a way to extract the current date with that simple system? like …/…/#datetime/Subfolder ?

Fred

The “…” notation is standard directory notation. We haven’t added anything special for inserting the current date & time as a directory, you’d need to do that programmatically.

Cheers,
Andrea

Privacy | Site terms | Cookie preferences