Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
createRenderLayer([empty=boolean], [g=boolean], [makeCurrent=boolean], [name=string], [noRecurse=boolean], [number=int])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
createRenderLayer is undoable, NOT queryable, and NOT editable.
Create a new render layer. The render layer number will be assigned
based on the first unassigned number not less than the base index number
found in the render layer global parameters. Normally all objects and
their descendants will be added to the new render layer but if '-noRecurse'
is specified then only the objects themselves will be added. Only transforms
and geometry will be added to the new render layer.
string | Name of render layer node that was created |
renderLayer, 2d3d, layer, color, playback, render
editRenderLayerGlobals, editRenderLayerMembers
empty, g, makeCurrent, name, noRecurse, number
Long name (short name) |
Argument types |
Properties |
empty(e)
|
boolean
|
|
|
If set then create an empty render layer. The global flag or specified
member list will take precidence over use of this flag.
|
|
g(g)
|
boolean
|
|
|
If set then create a layer that contains all DAG objects in the scene. Any
future objects created will also automatically become members of this layer.
The global flag will take precidence over use of the empty flag or specified
member list.
|
|
makeCurrent(mc)
|
boolean
|
|
|
If set then make the new render layer the current one.
|
|
name(n)
|
string
|
|
|
Name of the new render layer being created.
|
|
noRecurse(nr)
|
boolean
|
|
|
If set then only add specified objects to the render layer. Otherwise all
descendants will also be added.
|
|
number(num)
|
int
|
|
|
Number for the new render layer being created.
|
|
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.
|
import maya.cmds as cmds
# Add nut and nutShape to a new render layer
#
cmds.select( 'nut' )
cmds.createRenderLayer()
# Result: renderLayer1 #
# Add only bolt to a new render layer
#
cmds.createRenderLayer( 'bolt', noRecurse=True )
# Result: renderLayer2 #
# Add washer to the new render layer 'assembly'.
#
cmds.createRenderLayer( 'washer', noRecurse=True, name='assembly' )
# Result: assembly #
# Create a layer that will always contains everything
#
cmds.createRenderLayer( g=True )
# Result: renderLayer3 #