O

ObjExport

Description

Exports the selection to a .obj file.

Scripting Syntax

    ObjExport( FileName, FilePerObject, FilePerFrame, StartFrame, EndFrame, StepFrame, Polymsh, Surfmsh, Crvlist, Cloud, CoordinateSystem, Tesselation, Material, UV, UserNormal )

Parameters

Parameter | Type | Description
FileName [in/out] | String | Name of the output .obj file
FilePerObject [in/out] | Integer | Merge obj file per Object or Separate them ( 0 is Merge, 1 is Separate )
FilePerFrame [in/out] | Boolean | 1 obj file per frame ( True or False )
StartFrame [in/out] | Integer | Value for the Start Frame
EndFrame [in/out] | Integer | Value for the End Frame
StepFrame [in/out] | Integer | Value for the Step Frame
Polymsh [in/out] | Boolean | Proceed with Polygon Mesh Object
Surfmsh [in/out] | Boolean | Proceed with Surface Mesh Object
Crvlist [in/out] | Boolean | Proceed with Curves Object
Cloud [in/out] | Boolean | Proceed with Cloud Object
CoordinateSystem [in/out] | Integer | Select type of hierarchy to be import( none / Null as Parent / Model as Parent
Tesselation [in/out] | Boolean | Proceed with Tesselation
Material [in/out] | Boolean | Export Materials
UV [in/out] | Boolean | Export UVs
UserNormal [in/out] | Boolean | Export UserNormals

Examples

VBScript Example

    ' 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)

Autodesk Softimage v7.5