pymel.core.rendering.setRenderPassType

setRenderPassType(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
defaultDataType (d) bool ../../../_images/create.gif
 
If set, the render pass will use its default data type.
numChannels (n) int ../../../_images/create.gif
 

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 commandFlag can have multiple arguments, passed either as a tuple or a list.

type (t) unicode ../../../_images/create.gif
 
Specify the pass type to assign to the pass node(s).

Derived from mel command maya.cmds.setRenderPassType

Example:

import pymel.core as pm

import maya.cmds as cmds

# create a render pass for diffuse reflection
#
pm.createNode( 'renderPass', name='myDiffusePass' );
pm.setRenderPassType( 'myDiffusePass', type='diffuse' );
true