SetThumbnailFromR egion

Introduced

4.0

Description

Saves a thumbnail taken from the render region (if open) and then sets that thumbnail on each object in the specified list. Note: If there is no region open the History Pane displays the error message 'ERROR : "2000-VIEW-SetThumbnailFromRegion - No region is open]] - [line 1]" and the command fails.

Scripting Syntax

    SetThumbnailFromRegion( [InputObjs], [FileName], [Overwrite] )

Parameters

Parameter | Type | Description
InputObjs | String | List of elements (such as objects, models) on which to set the thumbnail Default Value: Selected objects
FileName [in/out] | String | File name (path not needed) of file to write thumbnail (from region) to. Default Value: User is prompted for filename (with path set to the default Thumbnails sub-folder under the current project).
Overwrite | Boolean | Specifies whether to overwrite the thumbnail file if it already exists. Default Value: False

Examples

VBScript Example

    ' This example demonstrates how to use the SetThumbnailFromRegion command by
    ' creating an object, manually creating a RenderRegion, and then setting the
    ' thumbnail from that region.
    '
    ' INSTRUCTIONS:
    ' =============
    ' This example must be run in 3 parts:
    ' 1) Create an object on which to set the thumbnail
    ' 2) User manually creates a render region
    ' 3) Set a thumbnail (from region) onto the object
    '
    ' Run this script normally in the Script Editor.
    NewScene , False
    CreatePrim "Cylinder", "MeshSurface"
    ApplyShader , , , , siLetLocalMaterialsOverlap
    SetValue "cylinder.Material.Phong.diffuse.red", 1
    SetValue "cylinder.Material.Phong.diffuse.green", 0
    SetValue "cylinder.Material.Phong.diffuse.blue", 1
    '
    ' Create a Render Region by pressing Q and drawing a box around the cylinder
    '
    ' Paste this line (uncommented) in the Script Editor and run it to set the actual thumbnail:
    '
    '  SetThumbnailFromRegion "cylinder", "MyThumbnail.jpg"
    '

See Also

SetThumbnail | ClearThumbnail | RenderRegionSave

Autodesk Softimage v7.5