SetThumbnailFromRegion

導入

v4.0

詳細

開いているレンダ領域から取得されたサムネイルを保存し、そのサムネイルを指定リスト内の各オブジェクトに設定します。 注: 開いている領域がない場合、[ヒストリ]ペインに「ERROR : "2000-VIEW-SetThumbnailFromRegion - No region is open]] - [line 1]」というエラー メッセージが表示され、コマンドは失敗します。

スクリプト構文

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

パラメータ

パラメータ タイプ 説明
InputObjs 文字列 サムネイルを設定する対象のエレメント(オブジェクト、モデルなど)のリスト

デフォルト値: 選択されたオブジェクト

FileName 文字列 レンダ領域のサムネイルを書き込むファイルの名前(パスは不要)。

デフォルト値:ユーザにファイル名を問い合わせます(現在のプロジェクトの下の Thumbnails サブフォルダがデフォルト設定です)。

Overwrite Boolean すでに存在するサムネイル ファイルを上書きするかどうかを指定します。

デフォルト値: False

VBScript の例

' 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"

'

関連項目

SetThumbnail ClearThumbnail RenderRegionSave