Share

createPreview Method

Creates a preview animation, optionally providing access to the options available on the Make Preview dialog.

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> snippet:<string> \
dspCamViewName:<boolean> autoPlay:<boolean> \
vpPreset:<#highquality | #standard | #performance | #dxmode | #userdefined> \
vpStyle:<#defaultshading | #facets | #flatcolor | #hiddenline | #wireframe | #boundingbox | #ink | #colorink | #acrylic | #tech | #graphite | #colorpencil | #pastel | #clay | #modelassist> 
vpEdgedFaces:<boolean> vpTextures:<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 specified vpPreset and vpStyle options are used (see below).
  • 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.
  • snippet Specifies a snippet of MAXScript code to execute on each frame. The string returned by the snippet is displayed in the rendering output.

These options were added in 3ds Max 2024:

  • dspCamViewName: Controls the display of the camera or viewport name in the Preview animation. Defaults to true.
  • autoPlay: Controls whether the animation automatically plays when the Preview creation is complete. Defaults to true.
  • vpPreset: Controls the Per-View preset applied to the active viewport. Defaults to the current active viewport preset.
  • vpStyle: Controls the viewport style applied to the active viewport. Defaults to the current style of the active viewport.
  • vpEdgedFaces: Controls the display of edged faces in the preview animation. Defaults to true.
  • vpTextures: Controls the display of textures in the preview animation. Defaults to false.

Was this information helpful?