ファイル
obj ファイルに選択を書き出します。
ObjExport( FileName, FilePerObject, FilePerFrame, StartFrame, EndFrame, StepFrame, Polymsh, Surfmsh, Crvlist, Cloud, CoordinateSystem, Tesselation, Material, UV, UserNormal ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| FileName | 文字列 | .obj の出力ファイルの名前 |
| FilePerObject | Integer | オブジェクトごとにファイルをマージするか、個別に出力するかを指定します(0: マージ、1: 個別)。 |
| FilePerFrame | ブール | フレームごとに 1 つの .obj ファイルを作成するかどうかを指定します(True または False)。 |
| StartFrame | Integer | 開始フレームの値 |
| EndFrame | Integer | 終了フレームの値 |
| StepFrame | Integer | ステップ フレームの値 |
| Polymsh | ブール | ポリゴン メッシュ オブジェクトを処理するかどうかを指定します。 |
| Surfmsh | ブール | サーフェイス メッシュ オブジェクトを処理するかどうかを指定します。 |
| Crvlist | ブール | カーブ オブジェクトを処理するかどうかを指定します。 |
| Cloud | ブール | クラウド オブジェクトを処理するかどうかを指定します。 |
| CoordinateSystem | Integer | 読み込みする階層のタイプを選択します(なし/ヌルを親とする/モデルを親とする)。 |
| Tesselation | ブール | テッセレーションを処理するかどうかを指定します。 |
| Material | ブール | マテリアルを書き出しするかどうかを指定します。 |
| UV | ブール | UV を書き出しするかどうかを指定します。 |
| UserNormal | ブール | UserNormal を書き出しするかどうかを指定します。 |
' Set up the scene
NewScene , false
set obj1 = ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface" )
Selection.Add obj1
set obj2 = ActiveSceneRoot.AddGeometry( "Torus", "MeshSurface" )
Selection.Add obj2
' Export to an OBJ file
sFilePath = InstallationPath( siProjectPath ) & "\foo.obj"
ObjExport sFilePath, 0, False, 1, 100, 1, True, False, False, False, 0, False, False, False, True
DeleteAll false
' Import from the OBJ file
set rtn = ObjImport( sFilePath, 1, 0, True, True )
for each thing in rtn
logmessage thing.fullname & " (" & typename(thing) & ")"
next
'INFO : sphere,torus
'VERBOSE : Wavefront OBJ Export: <project_path>\foo.obj
'INFO : sphere (X3DObject)
'INFO : torus (X3DObject)
|