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 ../../../_images/create.gif
 
Specify a camera that you want to replace the current renderable camera
customTokenString (cts) unicode ../../../_images/create.gif
 

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_v” then the argument to this flag string should take the form “myToken=myTokenValue myOtherToken=myOtherTokenValue”.

firstImageName (fin) bool ../../../_images/create.gif
 
Returns the first image name
fullPath (fp) bool ../../../_images/create.gif
 
Returns the full path for the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName.
fullPathTemp (fpt) bool ../../../_images/create.gif
 
Returns the full path for the preview render of the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName.
genericFrameImageName (gin) unicode ../../../_images/create.gif
 
Returns the generic frame image name with the custom specified frame index token
imageGenericName (ign) bool ../../../_images/create.gif
 
Returns the image generic name
lastImageName (lin) bool ../../../_images/create.gif
 
Returns the last image name
layer (lyr) unicode ../../../_images/create.gif
 
Specify a render layer name that you want to replace the current render layer
leaveUnmatchedTokens (lut) bool ../../../_images/create.gif
 

Do not remove unmatched tokens from the name string. Use with firstImageName or lastImageName.Flag can appear in Create mode of commandFlag 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] )