I am in the process of writing edits into the
performExportToBackburner.mel so that a single click can export a
single job per renderable layer. I have successfully created
modifications which submits a job per render layer, however I cannot
get it to retain start/end frame overrides. For some reason it seems in
the method I’m using the start/endframe is pulled from the layer which
the script is run from, and overwrites the start/end frame overrides in
the renderglobals. It’s as if the vaules of the start/end frame are not
being refreshed as the script switches from one render layer to the
other. When run, the (getAttr defaultRenderGlobals.endFrame) command
collects the right info when run by hand while you are on a render
layer with a start/endFrame override. Any help would be greatly
appreciated.
Here’s the basics of the code I’m using:
// Get and store Id numbers of available render layers
float $availLayers[] = `getAttr renderLayerManager.rlmi`;
// Begin loop for available render layers
for ($i=0; $i < size($availLayers); ++$i) {
// Store current render layer Id
int $curLayerId = $availLayers[$i];
// Set current render layer by Id
setAttr renderLayerManager.crl($curLayerId);
// Store current render layer name
string $curLayerName = `editRenderLayerGlobals -q -currentRenderLayer`;
// Check if render is renderable
int $curLayerRen = `getAttr ($curLayerName +".rndr")`;
// Execute if render layer is renderable
if($curLayerRen == 1){
//print(`editRenderLayerGlobals -q -currentRenderLayer`);
// Prep relevent info to render layers
int $sF = (`getAttr defaultRenderGlobals.startFrame`);
int $eF = (`getAttr defaultRenderGlobals.endFrame`);
pause -sec 5;
print (`getenv("USERNAME")` + `date -f "hhmmss-YYMMDD"` + "\_" + $curLayerName);
print ($sF);
print ($eF);
print ("-rl " + $curLayerName);
print ("");
}
}