Get renderLayer override attr values?

Get renderLayer override attr values?

Anonymous
Not applicable
401 Views
2 Replies
Message 1 of 3

Get renderLayer override attr values?

Anonymous
Not applicable
Hello, anyone knows how to do just that?

Say I want to get the per render layer render frame range of all my different render layers (that have been set with overrides).
How can I do that *without actually changing currently active layer*, using Mel, Python or PythonAPI?

cheers
fred
0 Likes
402 Views
2 Replies
Replies (2)
Message 2 of 3

burgeso
Alumni
Alumni
Try this MEL script; the procedure will list the overrides for each one of your render layers:

////////////////////////////

global proc renderLayerDiagnose()
{

int $currentLayer = `getAttr renderLayerManager.crl`;
string $renderLayers[] = `listConnections -destination 1 -source 0 -plugs 0 renderLayerManager.renderLayerId`;

for ($rl=0; $rl < `size($renderLayers)`; $rl++)
{
int $id = `getAttr ($renderLayers+".identification")`;
if ($id == $currentLayer)
{
// do your own thing here....
// e.g. this block prints out the overrides that apply to the current layer
string $overrides[] = `listConnections -destination 0 -source 1 -plugs 1 ($renderLayers+".adjs")`;
int $index, $overridesSize;
$overridesSize = `size($overrides)`;
if ($overridesSize!=0)
for ($index=0; $index < $overridesSize; $index++)
{
print ($overrides + "\t");
print `getAttr ($renderLayers+".adjs.value")`;
print "\n";
}
else print ("No overrides on "+$renderLayers+"\n");
}
}
}
///////////////////////////////////////

Owen
Mayastation


Owen Burgess
Maya Support Specialist
Product Support
Autodesk, Inc.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hi Owen,

and and thanks so much for that mel script, that is really very helpful!! 🙂
I hope you didn't write it just now!?

That should be plenty for me to figure out how to do what I want!


thanks again
fred
0 Likes