現在のシーンに、.obj ファイルを読み込みします。
oReturn = ObjImport( FileName, Group, hrc, Material, UV, UserNormal, UVwrapping ); |
読み込みされたオブジェクトを含む XSICollection。
| パラメータ | タイプ | 説明 |
|---|---|---|
| FileName | 文字列 | 読み込むファイルの名前 |
| Group | Integer | グループをクラスタまたはオブジェクトとして読み込みします。 |
| hrc | Boolean | 読み込みする階層のタイプを選択します(なし/ヌルを親とする/モデルを親とする)。 |
| Material | Boolean | マテリアルを読み込みするかどうかを指定します。 |
| UV | Boolean | UV を読み込みするかどうかを指定します。 |
| UserNormal | Boolean | UserNormal を読み込みするかどうかを指定します。 |
| UVwrapping | Boolean | プロジェクション定義の UV ラッピングをオンにします。 |
' 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) |