Introduced
7.0
Description
Exports a given material library to a Crosswalk file (dotXSI 6.0). The file will contain a single material library, with all the related materials, shaders, texture layers and image clips including the associated user keywords.
Scripting Syntax
CrosswalkExportMatLib( Filename, MatLib, Binary )
Parameters
|
Parameter |
Type |
Description |
|
Filename |
The path and filename of the file. |
|
|
MatLib |
The script name of the material library to export. |
|
|
Binary |
True to export to a dotXSI file using the Binary format; false to use the ASCII format. Default Value: false |
Return Value
CStatus::OK if successful, and an error code otherwise.
Examples
JScript Example
/* This example shows how to export/import a material library using Crosswalk */ // --------------- // Export: NewScene(null, false); // Add a new material library called "MyMatLib" and make it current CreateLibrary("MyMatLib"); SetCurrentMaterialLibrary("Sources.Materials.MyMatLib"); // Add a material to the MyMatLib library SICreateMaterial("Phong", "Phong", null, null, false); // Export the MyMatLib library CrosswalkExportMatLib("C:\\temp\\MyMatLib.xsi", "MyMatLib", false); // --------------- // Import: NewScene(null, false); // Import the material library CrosswalkImportMatLib("C:\\temp\\MyMatLib.xsi" ); // --------------- // Expected results: // INFO : 70 mSec - cumulative: 70 mSec // INFO : Set version // INFO : 5 mSec - cumulative: 98 mSec // INFO : Converting scene info // INFO : 19 mSec - cumulative: 121 mSec // INFO : Converting environment // INFO : 26 mSec - cumulative: 150 mSec // INFO : Converting image clips // INFO : 3 mSec - cumulative: 163 mSec // INFO : Converting image clip animations // INFO : 2 mSec - cumulative: 170 mSec // INFO : Converting materials // INFO : 117 mSec - cumulative: 294 mSec // INFO : Converting material animations // INFO : 32 mSec - cumulative: 332 mSec // INFO : Writing file // INFO : Parser recognizes a dotXSI file // INFO : 11 mSec - cumulative: 349 mSec // INFO : Export completed // INFO : Parser recognizes a dotXSI file
See Also
Autodesk Softimage v7.5