v6.0
Exports the specified information from the current scene to a DirectX .x file.
oCStatus::OK = 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] ); |
CStatus::OK if successful, and an error code otherwise.
Parameter | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DX_Filename | String | The file to export to. | ||||||||||||||||||||||||
DX_Format | Integer | File format to export to.
Default Value: 0
|
||||||||||||||||||||||||
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
|
||||||||||||||||||||||||
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
|
||||||||||||||||||||||||
DX_TexturesResizeY | Integer | >Allows specification of a new size for the texture in Y.
Default Value: 0
|
||||||||||||||||||||||||
DX_TexturesFormat | Integer | Controls conversion of the image format during export.
Default Value: 0
|
||||||||||||||||||||||||
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
|
||||||||||||||||||||||||
DX_OptionsCompressMesh | Boolean | Whether or not meshes will be compressed.
Default Value: true |
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 ); |
var exportto = XSIUtils.BuildPath( Application.InstallationPath(siUserPath), "Data", "XSI_SAMPLES", "Scenes", "myscene.x" ); // Export using all defaults DXExport( exportto ); |