v1.0
ファイル
Softimage のシーンを、現在のシーンにマージします。 マージされたシーンを保持する新しいモデルを作成します。
新しいモデルが選択され、インスペクトされます。
このコマンドには、メイン メニューの[ファイル] > [マージ]からアクセスできます。
oReturn = MergeScene( [FileName], [Name], [Parent], [ShareOptions] ); |
マージされたシーンのすべてのエレメントを含む、新しいModelオブジェクトを戻します。
| パラメータ | タイプ | 詳細 |
|---|---|---|
| FileName | 文字列 | ロードするシーン ファイルのファイル名
デフォルト値:ファイルブラウザが開きます。 |
| Name | 文字列 | 作成される新しいモデルの名前
デフォルト値:シーンファイル名 |
| Parent | 文字列 | 作成されるモデルの親
デフォルト値: シーン ルート |
| ShareOptions | siImportShareOptions | シーンをマージする際のオブジェクトの共有に関するさまざまなオプションを指定する、Integer型のビットフィールドの値。 モデルを読み込みする際に、イメージ クリップを共有します。 イメージ クリップは、同じイメージ ソースを参照していて、かつすべてのパラメータが同じであれば同一のものです。したがって、パラメータの F カーブは比較時には無視されます。 リファレンス モデルは、リファレンスされるモデルによってロックされているイメージ クリップのみを共有するか、イメージ クリップを使用しません。 標準的なモデルは、まったくロックされていないイメージ クリップのみを共有します。 モデルの読み込み時には必ずイメージ ソースが共有されます。 デフォルト値: siImportShareOptionsAll |
'
' Demonstrates how to use the MergeScene command to merge the current
' scene with another scene file.
'
NewScene , False
' First create an object in the new scene.
SICreateModel , "MyModel"
SICreateModel , "MergeRoot", ""
CreatePrim "Torus", "MeshSurface", "MyTorus", "MyModel"
' Now merge the scene with a sample scene.
scene_file = XSIUtils.BuildPath( _
Application.InstallationPath(siFactoryPath), _
"Data", "XSI_SAMPLES", "Scenes", "Rendering", "Rendertree_Light_Rainbow.scn" _
)
MergeScene scene_file, "Rainbow", "MergeRoot"
RecursiveCheck Application.ActiveSceneRoot, ""
'---------------------------------------------------------
' Output from this script:
' INFO : Scene_Root
' INFO : ...MyModel
' INFO : ...MergeRoot
' INFO : ......Rainbow
'---------------------------------------------------------
' Convenience to write model hierarchy using visual cues
sub RecursiveCheck( in_root, in_indent )
Application.LogMessage in_indent & in_root.Name
for each mdl in in_root.Models(False)
RecursiveCheck mdl, in_indent & "..."
next
end sub
|