AWS Thinkbox Discussion Forums

Using Draft standalone?

draftFolks,

Hopefully another easy question:

I’ve set up a deadline submitter in After Effects that uses draft to create an mov & do a bunch of stuff to the mov (bink it etc). It works great. Now I want to give users the option to run my draft/publish script as a standalone function – I.e., bypassing Deadline altogether. End users (artists) will want to do this a lot for the short series of images that only take a few seconds to render locally. I took a look around & haven’t been able to find a way to run draft standalone or load/include it into a python script successfully. I tried things like adding:

T:\opt\deadlineRepository\draft\Windows\64bit

… to my python path/copying everything in that folder into my python path & then just running command line. I know that’s a ridiculous hack & it didn’t work. Is there an easy way to do this? Or any way at all? For this particular situation, if there isn’t a way to run draft w/o deadline, I’ll probably switch over to ffmpeg for both the render farm publish and the local publish … but I’d like to use draft standalone if possible.

Cheers,
Raphael

  1. What error messages are you getting? (You can run Draft from the command line, I want to see what the actual issue is… whether it’s not finding Draft, whether it’s not acquiring a licence, or some other script error.)

  2. Have you typed “env” at the command line to make sure the changes to the pythonpath were picked up by the command window you’re using?

  3. Will all those wanting to run the script have the network location mounted as the T: drive? (Double-checking.)

  4. I would suggest adding the Draft location to the search path within the script, because then you won’t have to add to the python path on every user’s machine. Before the line importing Draft in the script, add the following:

import sys sys.path.append( "T:\opt\deadlineRepository\draft\Windows\64bit" )

Hi Andrea,

Thanks for your help! Yes, when setting env vars, I verified that the path. Here’s what is returned when I type “set” into the cmd shell I run my script from:

PYTHONPATH=T:\lib\python27\site-packages;T:\tools\rmatto\python;T:\tools\pub\shotgun\studio\install\core\python;T:\opt\deadlineRepository\draft\Windows\64bit

Here’s the new error:

T:\tools\rmatto\deadline\common\draftTemplates>python aePublish.py
Traceback (most recent call last):
File “aePublish.py”, line 31, in
import Draft
ImportError: DLL load failed: The specified module could not be found.

I got this after I added:

sys.path.append(“T:\opt\deadlineRepository\draft\Windows\64bit”)

to the python path. Before adding that line, I got this error:

T:\tools\rmatto\deadline\common\draftTemplates>python aePublish.py
Traceback (most recent call last):
File “aePublish.py”, line 31, in
import Draft
ImportError: No module named Draft

Yes, all our users have access to the T network drive, thanks!

Cheers,
Raphael

Hi Raphael,

I forgot to check… are you using Python 2.6 to run Draft? We aren’t shipping a Python 2.7 compatible Draft yet.

If yes, could you please run the attached script, and reply with the output? The key part will probably be what follows “imp.find_module =”, but the rest will help me figure out why that might have the wrong information.

Cheers,
Andrea
draftTest.zip (490 Bytes)

Ah! I’ve been trying to run it with python 2.7. Okay, I’ll switch over to python 2.6 tomorrow and give it a shot, thanks!

Welcome! Sorry for forgetting to ask you that bit earlier… I hope it works better for you tomorrow. :slight_smile: Let me know if there’s any other problems you run into.

Cheers,
Andrea

I was trying the same thing in this thread http://forums.thinkboxsoftware.com/viewtopic.php?f=158&t=11517. I got it to work for Windows, but Mac was just too frustrating to get working.

Sorry… I haven’t had a chance to dig into that problem. I do have it on the wishlist, though.

Privacy | Site terms | Cookie preferences