From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: Auto Rendering of QT's on jobcomplete
   Date: Tue, 02 Jun 2009 14:47:29 -0400
Msg# 1846
View Complete Thread (17 articles) | All Threads
Last Next
Craig Allison wrote:
> Ok, the retiming of the slate didn't work, Shake still insisted on
> rendering the slate/grey over and over again as it rendered the quicktime.
> 
> Have used to following to submit the two scripts from one submit:
> 
> my $submit = <<"EOF";
> title        $in{JobTitle}
> frames          1
> command         perl $G::self -render $QT_script_to_render
> $in{Verbosity} $in{Retries} $in{RetryBehavior} $in{MaxLogSize}
> $in{PrintEnvironment} $in{Frames} $in{Production} $in{OutputQuicktime}
> $in{ShakeFlags} 
> $submitoptions
> EOF
> 
> my $submit2 = <<"EOF";
> title        $in{JobTitle}
> frames          1
> command         perl $G::self -render $Slate_script_to_render
> $in{Verbosity} $in{Retries} $in{RetryBehavior} $in{MaxLogSize}
> $in{PrintEnvironment} $in{ShakeFlags} 
> $submitoptions
> EOF
> 
>  # ErrorWindow("$submit\n"); # DEBUGGING
>     RushSubmit($submithost, $submit2, $in{JobTitle}, $in{StartIrush});
>     exit(RushSubmit($submithost, $submit, $in{JobTitle}, $in{StartIrush}));
> 
> This works fine, only that when the second job starts, the log for
> $submit2 is overwritten as both jobs share the same directory, not such
> a problem, but may try to iron this out over the coming days.

	This is because both submits are using the same $submitoptions:

my $submit = <<"EOF";
..
$submitoptions
..
EOF

my $submit2 = <<"EOF";
..
$submitoptions
..
EOF

	If you look at the contents of the $submitoptions variable,
	I think you'll understand why you're getting so many settings
	common between the Shake and QT jobs.

	In this case, the $submitoptions contains the 'logdir' and 'frames'
	command from the shake job, and passing that to both jobs is what's
	causing the overlap. ie. thats why the frame range and logdir are
	coming up the same for both.

	What you'll want to do is /not/ include the $submitoptions variable
	in the second job, and just set the frames/logdir commands you want, eg:

### CREATE LOGDIR FOR QT JOB
my $qtlogdir = "${Slate_script_to_render}.log";
if ( ! -d $qtlogdir ) {
    mkdir($qtlogdir, 0777);
    if ( $G::iswindows ) {
        my $dir = $qtlogdir; $dir =~ s%/%\\%g;
	system("cacls $dirname /e /c /g everyone:f");
    }
}

### SUBMIT THE QT JOB
my $submit2 = <<"EOF";
title           $in{JobTitle}_QT
frames          1
command         perl $G::self -render $Slate_script_to_render ..
logdir          $qtlogdir
EOF


	BTW, if you want to see what the first job's $submitoptions is set to,
	you can stick an 'ErrorWindow();' command in there just above the first
	submit, eg:

ErrorWindow("SUBMITOPTIONS IS SET TO:\n$submitoptions\n");

my $submit = <<"EOF";
..

	This way when you submit a test job, you'll see what the variable
	is set to, so you can then determine what you'll need to pass in
	the second job, in case there's more than just 'frames' and 'logdir'.

> As an aside does anyone know a quick way of always resetting to defaults
> for the QT render instead of Rush picking up the last settings every
> time? I assume it's a deletion of a certain local file, but maybe I
> could just reset certain fields which would work much better?

	I'm thinking my answers above should help with that.

	Basically its that same "$submitoptions" variable being
	passed to both jobs.

	Let us know if you have any other questions.

-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)

Last Next