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

Synopsis

getRenderTasks(string, [camera=string], [renderLayer=string])

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

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

Command to return render tasks to render an image source. Image source can depend on upstream image sources that result from renderings of 3D scene, or 2D renderings (e.g. render targets). This command obtains the graph of image source render dependencies, and creates render tasks according to these dependencies. A render task has context, which can be camera, render layer, and resolution, or other, renderer-specific context. Because of image source overrides, the render task context depends on the path through the render dependency graph, with the most upstream override for a context item applied. As there can be multiple paths through a render dependency graph to a render dependency, there can be multiple render tasks for a given render dependency.

Return value

string[] Render tasks (one per string) for argument render target.

Keywords

imageSource, render, task

Flags

camera, renderLayer
Long name (short name) Argument types Properties
camera(c) string create
Camera node to use in the render context for the image source render task.
renderLayer(rl) string create
Render layer to use in the render context for the image source render task.

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

# Return render tasks for myImageSource.
#
import maya.cmds as cmds
tasks = cmds.getRenderTasks('myImageSource', c='myCamera', rl='myRenderLayer')