createPreview Method

Prior to 3ds Max 2013, the createPreview() method provided no parameters at all and only triggered the Preview creation using the last settings found in the Make Preview dialog.

In 3ds Max 2013, several keyword arguments were added to provide better control over the Preview making process.

createPreview filename:<string> outputAVI:<boolean> percentSize:<int> \
start:<int> end:<int> skip:<int> fps:<int> \
dspGeometry:<boolean> dspShapes:<boolean> dspLights:<boolean> \
dspCameras:<boolean> dspHelpers:<boolean> dspSpaceWarps:<boolean> dspParticles:<boolean> \
dspBones:<boolean> dspGrid:<boolean> dspSafeFrame:<boolean> dspFrameNums:<boolean> \ 
dspBkg:<boolean> rndLevel:<#smoothhighlights | #smooth | #facethighlights \ 
| #facet | #flat | #hiddenline | #litwireframe | #wireframe | #box> \
useMPCamEffect:<boolean> dspSpaceWarps:<boolean>

Creates a preview animation sequence using either the last settings in the Make Preview dialog or the optional arguments, if provided.

filename: When specified, saves the output to a file with this path and name. When not specified, uses the default "_preview" name and the path in the #preview system directory.

outputAvi: When true, outputs to AVI file with the last selected CODEC. When false, outputs to custom file sequence.

percentSize: Defines the Preview output size as percentage of the current renderWidth and renderHeight values.

start: Defines the first frame of the Preview animation.

end: Defines the last frame of the Preview animation.

skip: Defines the Every Nth frame step of the Preview animation. Corresponds to the "Every Nth Frame" value in the Make Preview Dialog.

fps: Defines the Frame Rate of the Preview animation.

dspGeometry: Controls the display of Geometry objects in the Preview animation (except those handled by other flags like Particles and Bones).

dspShapes: Controls the display of Shape objects in the Preview animation.

dspLights: Controls the display of Light objects in the Preview animation. This applies to the viewport visibility of the light objects, not to their illumination - they will illuminate the scene even if hidden.

dspCameras: Controls the display of Camera objects in the Preview animation.

dspHelpers: Controls the display of Helper objects in the Preview animation.

dspParticles: Controls the display of Particle objects in the Preview animation.

dspBones: Controls the display of Bone objects in the Preview animation.

dspGrid: Controls the display of Home of Custom Grid in the Preview animation.

dspSafeFrame: Controls the display of Safe Frames in the Preview animation.

dspFrameNums: Controls the display of Frame Number counter in the Preview animation.

dspBkg: Controls the display of the Viewport Background in the Preview animation.

rndLevel: Controls the render level when using the Direct3D Driver. When using Nitrous, the current Nitrous settings accessible through NitrousGraphicsManager.GetActiveViewportSetting() are used.

useMPCamEffect: Controls whether multipass camera effects are performed in the Preview animation. If true, and the current viewport is a camera view with a multipass camera effect defined, the effect is evaluated. Available in 3ds Max 2021.1 Update and higher. dspSpaceWarps: Controls the display of Space Warp helper objects in the Preview animation.