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/44228dad-ed43-4344-a33c-b1645e3ed1ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.