honeypot@pipelinefx.com
PipelineFX
September 06, 2010, 06:18:54 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: See Announcements for latest Qube updates.
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Copy scripts to repository before rendering?  (Read 260 times)
tim.bowman
Jr. Member
**
Posts: 2


WWW
« on: June 07, 2010, 02:51:46 PM »

Hello all --

One of the things we'd like to do with our 2D pipeline is to copy comp scripts to a repository area before rendering to avoid artists changing things during a render. Has anyone done any work in this direction, especially anything that can be shared?

Ideally, we'd also like for the scripts in the repository to be removed when the job is removed from Qube. Is there a callback we could use to do that?

I'd love to hear anyone else's options/advice. Thanks in advance.
Logged
jburk
Administrator
*****
Posts: 149


« Reply #1 on: June 07, 2010, 04:45:14 PM »

If you are building and submitting jobs within a pipeline, I'd suggest creating a callback that triggers when complete, and delete the script in the callback:

job = {}
job['package']['compScript'] = script_repoPath

callback = {}
callback['language'] = 'python'
callback['triggers'] = 'complete-job-self'
callback['code'] = '''import os
os.unlink(%s)
''' % script_repoPath

job['callbacks'] = [callback]

qb.submit(job)

Logged
tim.bowman
Jr. Member
**
Posts: 2


WWW
« Reply #2 on: June 08, 2010, 08:21:31 AM »

Thanks for the callback code, John. I didn't realize writing a callback was so straightforward. That'll be a good reference for me.

What I was really hoping for was a way to hook in to qbremove to delete the script when the job is removed from Qube. We were thinking of using the repository as a sort of short-term storage where you can go back and grab the script from the last working render if you've hopelessly mangled your comp since then. Are there any callbacks exposed for that sort of thing? If not, we'll look for another way of managing this. Maybe could be something for future versions?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!