DXExport

Introduced

6.0

Description

Exports the specified information from the current scene to a DirectX .x file.

Scripting Syntax

    DXExport( DX_Filename, [DX_Format], [DX_AnimationExport], [DX_AnimationFrameOffset], [DX_AnimationType], [DX_TexturesExport], [DX_TexturesAbsolutePaths], [DX_TexturesSequences], [DX_TexturesCopyTextures], [DX_TexturesResizeX], [DX_TexturesResizeY], [DX_TexturesFormat], [DX_OptionsTriangulate], [DX_OptionsPlotAnimation], [DX_OptionsExportHiddenObjects], [DX_OptionsChains], [DX_OptionsCompressMesh] )

Parameters

Parameter | Type | Description
DX_Filename | String | The file to export to.
DX_Format | Integer | File format to export to. Default Value: 0 Possible Values: • 0: Text • 1: Binary • 2: Compressed Binary
DX_AnimationExport | Boolean | Whether or not to export animations to the .x file. Default Value: true
DX_AnimationFrameOffset | Integer | The frame at which exported animation should begin. Default Value: 1
DX_AnimationType | Integer | SRT's or Matrix Keys. Default Value: 0 Possible Values: • 0: Matrix Keys • 1: SRT
DX_TexturesExport | Boolean | Whether or not to export textures to the .x file. Default Value: true
DX_TexturesAbsolutePaths | Boolean | Export textures using absolute or relative paths. Default Value: false
DX_TexturesSequences | Boolean | Export animated texture sequences. Default Value: false
DX_TexturesCopyTextures | Boolean | Whether or not to copy the textures locally to the export folder. Default Value: false
DX_TexturesResizeX | Integer | Allows specification of a new size for the texture in X. Default Value: 0 Possible Values: • 0: Original • 1: Auto • 2: 2 • 3: 4 • 4: 8 • 5: 16 • 6: 32 • 7: 64 • 8: 128 • 9: 256 • 10: 512
DX_TexturesResizeY | Integer | >Allows specification of a new size for the texture in Y. Default Value: 0 Possible Values: • 0: Original • 1: Auto • 2: 2 • 3: 4 • 4: 8 • 5: 16 • 6: 32 • 7: 64 • 8: 128 • 9: 256 • 10: 512
DX_TexturesFormat | Integer | Controls conversion of the image format during export. Default Value: 0 Possible Values: • 0: Original • 1: PIC • 2: BMP • 3: PPM • 4: TGA • 5: JPEG
DX_OptionsTriangulate | Boolean | Whether or not triangulation is performed on geometries during export. Default Value: false
DX_OptionsPlotAnimation | Boolean | Plots the animation out at each frame, as opposed to keyed frames only. Default Value: false
DX_OptionsExportHiddenObjects | Boolean | Whether or not objects that are hidden in the viewports will be exported. Default Value: false
DX_OptionsChains | Integer | Chooses how to export IK and FK. Default Value: 0 Possible Values: • 0: Plot IK to FK • 1: Preserve FK
DX_OptionsCompressMesh | Boolean | Whether or not meshes will be compressed. Default Value: true

Return Value

CStatus::OK if successful, and an error code otherwise.

Examples

1. JScript Example

    var exportto = XSIUtils.BuildPath( Application.InstallationPath(siUserPath),
       "Data", "XSI_SAMPLES", "Scenes", "myscene.x" );

    // Export animation, textures, etc.
    DXExport( exportto,
           0,     // format type
           true,  // export anim
           1,     // frame offset
           true,  // type - 0 for Matrix keys, 1 for SRTs
           false, // import textures
           false, // absolute paths
           false, // image sequences
           false, // copy textures
           0,     // Resize X - 0 for don't resize, 1 for auto, ...
           0,     // Resize Y - 0 for don't resize, 1 for auto, ...
           3,     // Image format - 0 for original, ...
           true,  // triangulate
           true,  // plot animation
           true,  // export hidden objects
           0      // compress mesh
       );

2. JScript Example

    var exportto = XSIUtils.BuildPath( Application.InstallationPath(siUserPath),
       "Data", "XSI_SAMPLES", "Scenes", "myscene.x" );
    // Export using all defaults
    DXExport( exportto );

See Also

DXImport

Autodesk Softimage v7.5