Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

editRenderLayerMembers([fullNames=boolean], [noRecurse=boolean], [remove=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

editRenderLayerMembers is undoable, queryable, and NOT editable.

This command is used to query and edit memberships to render layers. Only transform and geometry nodes may be members. At render time, all descendants of the members of a render layer will also be included in the render layer.

Return value

intNumber of objects added to the layer
string[]Query: List of objects in layer

In query mode, return type is based on queried flag.

Keywords

renderLayer, render, layer, member, relationship

Related

createRenderLayer, editRenderLayerGlobals

Flags

fullNames, noRecurse, remove
Long name (short name) Argument types Properties
fullNames(fn) boolean query
(Query only.) If set then return the full DAG paths of the objects in the layer. Otherwise return just the name of the object.
noRecurse(nr) boolean create
If set then only add selected objects to the render layer. Otherwise all descendants of the selected objects will also be added. This flag may be applied to adding or removing objects from the layer.
remove(r) boolean create
Remove the specified objects from the render layer.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.editRenderLayerMembers( 'layer1', 'sphere1', 'cone1' )
# Result : 4
cmds.editRenderLayerMembers( 'layer1', query=True )
# Result : sphere1 sphere1Shape cone1 cone1Shape
cmds.editRenderLayerMembers( 'layer1', 'expression1', 'sphere2' )
# Result : 2
cmds.editRenderLayerMembers( 'layer1', 'sphere1', remove=True)
# Result : 2