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 |
The file to export to. |
|
|
DX_Format |
File format to export to. Default Value: 0 Possible Values: • 0: Text • 1: Binary • 2: Compressed Binary |
|
|
DX_AnimationExport |
Whether or not to export animations to the .x file. Default Value: true |
|
|
DX_AnimationFrameOffset |
The frame at which exported animation should begin. Default Value: 1 |
|
|
DX_AnimationType |
SRT's or Matrix Keys. Default Value: 0 Possible Values: • 0: Matrix Keys • 1: SRT |
|
|
DX_TexturesExport |
Whether or not to export textures to the .x file. Default Value: true |
|
|
DX_TexturesAbsolutePaths |
Export textures using absolute or relative paths. Default Value: false |
|
|
DX_TexturesSequences |
Export animated texture sequences. Default Value: false |
|
|
DX_TexturesCopyTextures |
Whether or not to copy the textures locally to the export folder. Default Value: false |
|
|
DX_TexturesResizeX |
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 |
>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 |
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 |
Whether or not triangulation is performed on geometries during export. Default Value: false |
|
|
DX_OptionsPlotAnimation |
Plots the animation out at each frame, as opposed to keyed frames only. Default Value: false |
|
|
DX_OptionsExportHiddenObjects |
Whether or not objects that are hidden in the viewports will be exported. Default Value: false |
|
|
DX_OptionsChains |
Chooses how to export IK and FK. Default Value: 0 Possible Values: • 0: Plot IK to FK • 1: Preserve FK |
|
|
DX_OptionsCompressMesh |
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
Autodesk Softimage v7.5