pymel.core.rendering.editRenderLayerGlobals¶
- editRenderLayerGlobals(*args, **kwargs)¶
Edit the parameter values common to all render layers. Some of these paremeters, eg. baseId and mergeType, are stored as preferences and some, eg. currentRenderLayer, are stored in the file.
Flags:
Long Name / Short Name Argument Types Properties baseId / bi int Set base layer ID. This is the number at which new layers start searching for a unique ID. currentRenderLayer / crl PyNode Set current render layer. This will will update the renderLayerManger and all DAG objects to identify them as members of the render layer. This flag may also be used in conjunction with useCurrentto automatically add new DAG objects to the active layer. The isCurrentRenderLayerChangingcondition can be used to determine when the current layer is being changed and adjustments are being applied to the scene. enableAutoAdjustments / eaa bool Set whether or not to enable automatic creation of adjustments when certain attributes (ie. surface render stats, shading group assignment, or render settings) are changed. mergeType / mt int Set file import merge type. Valid values are 0, none, 1, by number, and 2, by name. useCurrent / uc bool Set whether or not to enable usage of the current render layer as the destination for all new nodes. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.editRenderLayerGlobals
Example:
import pymel.core as pm pm.editRenderLayerGlobals( currentRenderLayer='layer1' ) pm.editRenderLayerGlobals( query=True, currentRenderLayer=True ) # Result: layer1 pm.editRenderLayerGlobals( query=True, baseId=True ) # Result: 1 pm.editRenderLayerGlobals( useCurrent=True ) # Enable automatic creation of adjustments pm.editRenderLayerGlobals( enableAutoAdjustments=True )