pymel.core.rendering.renderSettings¶
- renderSettings(*args, **kwargs)¶
Query interface to the common tab of the render settings
Flags:
Long Name / Short Name Argument Types Properties camera / cam unicode Specify a camera that you want to replace the current renderable camera customTokenString / cts unicode Specify a custom key-value string to use to replace custom tokens in the file name. Use with firstImageName or lastImageName. Basic tokens (Scene, Layer, RenderLayer, Camera, Version, Extension) will be automatically expanded. Any other tokens must be specified here to be expanded. The format of the string is a space separated list of tokens-value pairs. For example, if the file name string is myFile_myToken_myOtherToken_vthen the argument to this flag string should take the form myToken=myTokenValue myOtherToken=myOtherTokenValue. firstImageName / fin bool Returns the first image name fullPath / fp bool Returns the full path for the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName. fullPathTemp / fpt bool Returns the full path for the preview render of the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName. genericFrameImageName / gin unicode Returns the generic frame image name with the custom specified frame index token imageGenericName / ign bool Returns the image generic name lastImageName / lin bool Returns the last image name layer / lyr unicode Specify a render layer name that you want to replace the current render layer leaveUnmatchedTokens / lut bool Do not remove unmatched tokens from the name string. Use with firstImageName or lastImageName. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.renderSettings
Example:
import pymel.core as pm # Get the name of the first and last image for the current layer fl = pm.renderSettings(firstImageName=True, lastImageName=True) print( 'First image is '+fl[0] ) # This is the empty string if the scene is not set for animation if fl[1] == '': print('Not rendering animation'); else: print( 'Last image is '+fl[1] )