Go to: Synopsis. Return value. Keywords. Flags. Python examples.

Synopsis

renderSettings([camera=string], [customTokenString=string], [firstImageName=boolean], [fullPath=boolean], [fullPathTemp=boolean], [genericFrameImageName=string], [imageGenericName=boolean], [lastImageName=boolean], [layer=string], [leaveUnmatchedTokens=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

renderSettings is NOT undoable, NOT queryable, and NOT editable.

Query interface to the common tab of the render settings

Return value

string[]Command result

Keywords

render, settings

Flags

camera, customTokenString, firstImageName, fullPath, fullPathTemp, genericFrameImageName, imageGenericName, lastImageName, layer, leaveUnmatchedTokens
Long name (short name) Argument types Properties
camera(cam) string create
Specify a camera that you want to replace the current renderable camera
customTokenString(cts) string create
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) boolean create
Returns the first image name
fullPath(fp) boolean create
Returns the full path for the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName.
fullPathTemp(fpt) boolean create
Returns the full path for the preview render of the image using the current project. Use with firstImageName, lastImageName, or genericFrameImageName.
genericFrameImageName(gin) string create
Returns the generic frame image name with the custom specified frame index token
imageGenericName(ign) boolean create
Returns the image generic name
lastImageName(lin) boolean create
Returns the last image name
layer(lyr) string create
Specify a render layer name that you want to replace the current render layer
leaveUnmatchedTokens(lut) boolean create
Do not remove unmatched tokens from the name string. Use with firstImageName or lastImageName.

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.

Python examples

import maya.cmds as cmds

# Get the name of the first and last image for the current layer
fl = cmds.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] )