Getting the selected renderLayers

24 views
Skip to first unread message

md

unread,
Jul 11, 2014, 5:41:24 PM7/11/14
to python_in...@googlegroups.com
I know how to get all my renderLayers using something like :

x = cmds.ls(type='renderLayer')

Is there a way to find out if a renderLayer is selected ?? Since the scene selections does not seem to change when a renderLayer is selected I am at a lost at how to grab the selected renderLayers.

Thanks

M

Tony Barbieri

unread,
Jul 12, 2014, 12:32:52 AM7/12/14
to python_in...@googlegroups.com
Hello md,

You can use:

import maya.cmds as cmds

x = cmds.editRenderLayerGlobals(query=True, currentRenderLayer=True)

It's odd that the command is called editRenderLayerGlobals....

Best,



--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/12c2d6b3-cd90-44a2-889a-f7143eb1d25d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tony
Message has been deleted

md

unread,
Jul 14, 2014, 8:18:17 AM7/14/14
to python_in...@googlegroups.com

Thanks, but this only returns a single layer (current layer) . I want to return all the layers selected in the Layer Editor (if there is a multiselection)
Reply all
Reply to author
Forward
0 new messages