ObjImport

Description

Imports a .obj file into the current scene.

Scripting Syntax

    ObjImport( FileName, Group, hrc, Material, UV, UserNormal, UVwrapping )

Parameters

Parameter | Type | Description
FileName | String | Name of the file to import
Group | Integer | Import Group as Clusters or Objects
hrc | Boolean | Select type of hierarchy to be import( none / Null as Parent / Model as Parent
Material | Boolean | Import Materials
UV | Boolean | Import UVs
UserNormal | Boolean | Import UserNormals
UVwrapping | Boolean | Turn on UV wrapping on projection def

Return Value

XSICollection containing the imported objects.

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