ExportModel

カテゴリ

ファイル

詳細

モデルを .emdl ファイルに書き出します。

このコマンドは、メイン メニューで[ファイル] > [書き出し] > [モデル]からアクセスできます。

スクリプト構文

ExportModel( Model, FileName, IncludeSubModels, CopyExtFiles );

パラメータ

パラメータ タイプ 詳細
Model 文字列 書き出されるモデル

デフォルト値: 選択されたモデル

FileName 文字列 書き出し先ファイルの名前
IncludeSubModels ブール True を設定すると、サブモデルが含まれます。

デフォルト値: True

CopyExtFiles ブール このモデルに関連する外部ファイルをプロジェクトにコピーします。 コピー先が有効な Softimage プロジェクトでないとファイルはコピーされません。

デフォルト値: True

VBScript の例

'---------------------------------------------------------
' VBScript example : Importing and exporting models using
' the ImportModel/ExportModel commands. Models and submodels
' are created and then exported and imported in this example.
'---------------------------------------------------------
' First create a model, a submodel, and primitives within them.
SICreateModel , "SubModel"
SICreateModel "SubModel", "Model"
CreatePrim  "Torus", "MeshSurface", "MyTorus", "SubModel"
CreatePrim  "Cube", "MeshSurface", "MyCube", "Model"
' Now export the models, once exporting submodels, and once not.
emdlFile = Application.InstallationPath( siUserPath ) & "\Model.emdl"
emdlSubFile = Application.InstallationPath( siUserPath ) & "\Model_with_Submodels.emdl"
ExportModel "Model", emdlFile, False
ExportModel "Model", emdlSubFile, True
' Now delete the models/primitives of the scene (so we can re-import them), 
DeleteObj "Model.SubModel.MyTorus"
DeleteObj "Model.SubModel"
DeleteObj "Model.MyCube"
DeleteObj "Model"
' Now import the exported files. One as a referenced model, the other not.
ImportModel emdlFile, , False, , "Model (no submodels, not referenced)"
ImportModel emdlSubFile, , True, , "Model (with submodels, referenced)"
'---------------------------------------------------------
'INFO : Output from this script:
'INFO : "4152 - Data loaded from file <UserPath>\Model.emdl was created with build number: <build_num> - compatibility version: 300"
'INFO : "4152 - Data loaded from file <UserPath>\Model_with_Submodels.emdl was created with build number: <build_num> - compatibility version: 300"
'INFO : Object: "Model___no_submodels__not_referenced_.MyCube"
'INFO : Object: "Model___with_submodels__referenced_.MyCube"
'INFO : Object: "Model___with_submodels__referenced_.SubModel.MyTorus"
'---------------------------------------------------------

関連項目

ImportModel ExportDotXSI