pymel.core.windows.thumbnailCaptureComponent¶
- thumbnailCaptureComponent(*args, **kwargs)¶
This command is used to generate a thumbnail/playblast sequence from the scene. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties capture / c bool Create a new component to capture a sequence of image for the current scene. capturedFrameCount / cfc bool Query only. Return the number of frames that have been captured. closeCurrentSession / ccs bool Delete the current thumbnail component (preview image will be destroyed). delete / d bool Delete the generated image sequence and preview for the current capture session. endFrame / ef int Set the end captured frame. Only valid when the -c/captureflag is set. If -sf/startFrameis set and not -ef/endFrame, or if endFrame is smaller than startFrame, endFrame will be automatically set to startFrame. fileDialogCallback / fdc unicode MEL only. Set the callback file dialog which is called after the capture component window has been closed. Only valid when the -c/captureflag is set. fileDialogProcessing / fdp bool isSessionOpened / iso bool Returns true if a thumbnail/playblast capture session is currently running (already opened and still not cancelled/saved). launchedFromOptionsBox / lfo bool Returns true if the thumbnail capture component was launched through the options dialog box, else false. previewPath / pp bool Returns the generated preview path (the first frame of generated sequence resized to 100x100 px). removeProjectThumbnail / rpt unicode Remove all captured thumbnail/playblast from the given project file path. save / s unicode Save the generated image sequence for the given file to disk. The file path must be an absolute path. selectedFileName / sfn bool startFrame / sf int Set the start captured frame. Only valid when -c/captureflag is set. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.thumbnailCaptureComponent
Example:
- ::
import pymel.core as pm
import maya.cmds as cmds
# Launch an option box used to capture the scene between frame 20 and 60
pm.thumbnailCaptureComponent(capture=True, startFrame=20, endFrame=60)
# Save the generated image sequence for “mesh.mb”
pm.thumbnailCaptureComponent(save=’C:/maya/projects/default/scenes/mesh.mb’)
# Delete generated thumbnails for current capture session
pm.thumbnailCaptureComponent(delete=True)
# Return the path of generated sequence preview.
pm.thumbnailCaptureComponent(q=True, previewPath=True) # Result: u’’ #