pymel.core.rendering.sampleImage

sampleImage(*args, **kwargs)

The sampleImage command is used to control parameters of sample images, such as swatches in the multilister. The fast option turns on or off some rendering cheats which speed up the render but may cause edges to look ragged. The resolution option specifies the width in pixels of the image which will be rendered for the specified node. Note that the width of the image is also the height of the image since sample images are square.

Flags:
Long name (short name) Argument Types Properties
fastSample (f) bool ../../../_images/create.gif
 
If fast but rough rendering for sampleImage is to be used
resolution (r) <type ‘int’>, PyNode ../../../_images/create.gif
 

The first argument to this flag specifies a resolution in pixels. The second argument specifies a dependency node. The effect of this flag is that further sample image renderings for the specified node will be made at the specified resolution. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.sampleImage

Example:

import pymel.core as pm

# From now on, render sample images at high quality.
#
pm.sampleImage( f=False )

# Render the sample image associated with lambert1 at a resolution of
# 128 pixels by 128 pixels.
#
pm.sampleImage( r=(128, 'lambert1') )

Previous topic

pymel.core.rendering.roll

Next topic

pymel.core.rendering.setDefaultShadingGroup

Core

Core Modules

Other Modules

This Page