obj ファイルに選択を書き出します。
ObjExport( FileName, FilePerObject, FilePerFrame, StartFrame, EndFrame, StepFrame, Polymsh, Surfmsh, Crvlist, Cloud, CoordinateSystem, Tesselation, Material, UV, UserNormal ); |
| パラメータ | タイプ | 説明 |
|---|---|---|
| FileName | 文字列 | .obj の出力ファイルの名前 |
| FilePerObject | Integer | オブジェクトごとにファイルをマージするか、個別に出力するかを指定します(0: マージ、1: 個別)。 |
| FilePerFrame | Boolean | フレームごとに 1 つの .obj ファイルを作成するかどうかを指定します(True または False)。 |
| StartFrame | Integer | 開始フレームの値 |
| EndFrame | Integer | 終了フレームの値 |
| StepFrame | Integer | ステップ フレームの値 |
| Polymsh | Boolean | ポリゴン メッシュ オブジェクトを処理するかどうかを指定します。 |
| Surfmsh | Boolean | サーフェイス メッシュ オブジェクトを処理するかどうかを指定します。 |
| Crvlist | Boolean | カーブ オブジェクトを処理するかどうかを指定します。 |
| Cloud | Boolean | クラウド オブジェクトを処理するかどうかを指定します。 |
| CoordinateSystem | Integer | 読み込みする階層のタイプを選択します(なし/ヌルを親とする/モデルを親とする)。 |
| Tesselation | Boolean | テッセレーションを処理するかどうかを指定します。 |
| Material | Boolean | マテリアルを書き出しするかどうかを指定します。 |
| UV | Boolean | UV を書き出しするかどうかを指定します。 |
| UserNormal | Boolean | 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) |