Oh and sorry, I forgot to point out that this is ONLY in the case that
you've created layer overrides per render layer (which is what I figured
you did since you'd just simply check defaultRenderGlobals.currentRenderer
otherwise).
On Tuesday, March 8, 2016 at 2:53:32 PM UTC-5, Andres Weber wrote:
>
> Didn't test this out very thoroughly...but you can check all of the
> adjustments (layer overrides) for any layer using this (if you're using
> pymel):
>
> pm.PyNode('layer1').listAdjustments()
>
> then if you find an adjustment you like that's connected to the
> defaultRenderGlobals.currentRenderer:
> adjustment.get()
>
> That will give you what you're looking for I believe.
>
> On Tuesday, March 8, 2016 at 1:23:08 PM UTC-5, Leonardo Bruni wrote:
>>
>> Hi guys,
>> i'm tryng to get the renderer used by each renderLayer, there's something
>> that i don't understand.
>> normally without renderLayers the command is simple:
>>
>> cmds.getAttr('defaultRenderGlobals.currentRenderer')
>>
>> My wrong logic said: "ok, just get each renderLayer and get the
>> currentRenderer"
>>
>> so:
>>
>> import sys
>> import maya.cmds as cmds
>> import maya.mel as mel
>>
>> render_layers = cmds.ls(type = 'renderLayer')
>> for rl in render_layers:
>> print cmds.getAttr('%s.currentRenderer' % rl)
>>
>> But is not the way apparently...
>> So the question is: how i can get for each renderLayer the current render
>> engine ?
>>
>> Thanks in advance
>>
>> Leo
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/92f6ce13-2828-4a22-b667-d702dd514d29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.