ScriptSpot

Script

Qpreview

By Jonathan de Blok · 2011-05-13

Version
2.0
Version requirement
2008+
Date updated
2011-05-01
Votes
12
Description

This script will make preview renders from the viewport using the default 'make preview' dialog, when completed it renames the preview file to match the camera's name.

This makes it easier to generate preview files for a ruff edit, without having to manually rename the preview files again and again.

Additional Info

Intallation: 1) Drag and Drop script into 3dsMax 2) now in max go to ‘Customize/Customize user interface 3) Select 'JDBgraphics' from the 'categories' dropdown 4) drag 'qPreview' to a toolbar of choice, or assign a hotkey 5) save the interface and close the customize dialog. Updated to 2.0: Added error handling and code clean up
Attachments

Tags: Preview, camera, rename, edit, auto

Comments (1)

Useful Script, Thanks

makco · 2011-10-17

Found a little mistake that didnt let it run. the variable trg was used the first time before being defined, i crossed it below, In anycase it did what i needed it to do, Thanks for sharing.

 

macroScript qPreview category:"JDBgraphics"
(
    src=     ((getDir #preview)+"/_scene.avi") 
    if (doesFileExist src) do
    (   
        deleteFile  trg
    )       
   
    actionMan.executeAction 0 "40033"
   
    if (doesFileExist src) then
    (
        a=getActiveCamera()

        if (a!=undefined) then (
               
            trg=     ((getDir #preview)+"/"+a.name+".avi")
       
            print (src+ " > " + trg)

            if (doesFileExist src) do
            (   
                deleteFile  trg
                renameFile  src trg
                shellLaunch trg  "/play /loop"

            )   
        ) else (
                print "No camera used for preview, default preview name used"
        )
       
    ) else (
        print "Preview Canceled";
    )

)