Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This script reads a scene and copies all its dependencies to another location

Example

// This script reads a scene and copies all its dependencies to another location

var mxsPath = "C:\scene.mxs";
Maxwell.openMxs( mxsPath );
var nDeps = Scene.getSceneDependenciesCount();
var deps = Scene.getSceneDependencies();
var i;
var targetFolder = "C:\input"
for( i = 0; i < nDeps; i++ )
{
var currentDep = deps[i];
var target = targetFolder + "\" + FileManager.getFileNameAndExtension( currentDep );
Maxwell.print( "Copying dependency: " + currentDep );
var ok = FileManager.copy( currentDep, target );
if( ok == 0 )
{
Maxwell.print( "Error copying dependency" );
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////

  • No labels