Go to: Synopsis. Return value. Keywords.
Related. Flags.
Python examples.
setRenderPassType([defaultDataType=boolean],
[numChannels=int], [type=string])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
setRenderPassType is undoable, NOT queryable, and NOT
editable.
This command will set the passID of a renderPass node and create
the custom attributes specified by the corresponding render pass
definition. If the render pass node already has a passID assigned
to it, attributes that are no longer required become hidden, and
new attributes are unhidden and/or created as needed. This allows
passIDs to be changed back and forth without losing attribute data.
It also allows common attributes to be transported from one render
pass type to another.
render, layer,, pass
createNode
defaultDataType, numChannels, type
Long name (short name) |
Argument types |
Properties |
type(t) |
string |
 |
|
Specify the pass type to assign to the pass node(s). |
|
defaultDataType(d) |
boolean |
 |
|
If set, the render pass will use its default data type. |
|
numChannels(n) |
int |
 |
|
Specify the number of channels to use in the render pass. Note
that this flag is only valid if there is an implementation
supporting the requested number of channels. |
|
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
# create a render pass for diffuse reflection
#
cmds.createNode( 'renderPass', name='myDiffusePass' );
# Result: myDiffusePass #
cmds.setRenderPassType( 'myDiffusePass', type='diffuse' );
# Result: true #