/*
---------------------------------------------------------
Demonstrates how to import and export a dotXSI file.
---------------------------------------------------------
*/
NewScene( null, false );
// Create a model, with some primitives.
var ExportRoot = SICreateModel( null , "ExportRoot" )(0);
CreatePrim( "Torus", "MeshSurface", "Torus", ExportRoot );
CreatePrim( "Cube", "NurbsSurface", "Cube", ExportRoot );
// Now specify to export the model to a dotXSI file
var dotXSIFile = Application.InstallationPath( siUserPath ) + "\\MyModel.xsi";
ExportDotXSI( "ExportRoot", dotXSIFile );
// Now delete the primitives and model, and re-import them.
DeleteObj( "ExportRoot.Torus" );
DeleteObj( "ExportRoot.Cube" );
DeleteObj( "ExportRoot" );
// Now import the same model that was just exported.
ImportDotXSI( dotXSIFile );
//---------------------------------------------------------
// Output from this script (user specifies ok on both dialogs):
//INFO : 4004 - Begin: Export .xsi file
//INFO : 4005 - End: Export .xsi file
//INFO : 0360
//INFO : 4002 - Begin: Import .xsi file
//INFO : 4003 - End: Import .xsi file
//---------------------------------------------------------
|