...
The Maxwell Render scripting engine is based on ECMA standards (like other popular scripting languages such as Javascript and Actionscript), and provides default compatibility with these standards. The script editor in Maxwell Render also contains a Debugger, including breakpoints, searches, info about the variables, and more.
To learn more about the Script language in Maxwell, see the Scripting section.
Wiki Markup |
---|
{center} !maxwell_render_v2_manual_img_70_1.jpg! h6. The Script tab {center} |
...
This simple script accesses all the MXS scenes in a folder and its subfolders, changes the scenes’ render settings, renders them and saves the output image in the specified location. You can change the commands and use the autocomplete help to explore all capabilities.
Code Block | ||
---|---|---|
| ||
// These lines are comments
// Make massive changes in MXS files and launch them to render
// This script allows you to access all the MXS located in the folder "inputFolder" and its subfolders
// Open the scenes, change their SL and resolution and launch the render(s)
// The output of all the images is stored in the folder "outputFolder" in Tiff format.
var inputFolder = "C:\\ set the input folder";
var outputFolder = "C:\\ set the output folder";
var engineVersion = Maxwell.getEngineVersion();
var mxsCount = Maxwell.getNumberOfFilesInBranch( inputFolder, "*.mxs" );
var mxsList = Maxwell.getFilesInBranch( inputFolder, "*.mxs" );
for( var i = 0; i < mxsCount; i++ )
{
var mxsFile = mxsList[i];
Maxwell.print( "rendering Mxs file: " + mxsFile );
Maxwell.openMxs( mxsFile );
Scene.setSamplingLevel( 12 );
Scene.setResX( 1024 );
Scene.setResY( 768 );
var imagePath = outputFolder + "\\" + Maxwell.getFileName( mxsFile ) + "_" + engineVersion + ".tiff";
Scene.setImagePath( imagePath );
Maxwell.startRenderAndWait();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|