Functionality
The PyMaxwell Python module is a binding of the Maxwell Render SDK. You can get the full documentation for the SDK and its Python correspondences at Maxwell 2.7.
Python-only functions
Furthermore, PyMaxwell provides some extra functions:
Name | Description |
---|---|
getFromPath | Gets all file names given a path and an extension. |
runMaxwell | Runs Maxwell Render with the given parameters. |
getPyMaxwellModuleVersion | Gets the PyMaxwell Python module version. |
Cmaxwell::getMaterialNames | Gets all material names from the scene. |
Cmaxwell::getCameraNames | Gets all camera names from the scene. |
Cmaxwell::readACO | Reads an Adobe Color (.aco) file containing a set of color swatches. |
getFromPath
Obtain all file names from within a directory given its extension.
Syntax |
---|
getFromPath( path, extension ) |
Examples
files = getFromPath('c:/scenes/,'mxs'); for file in files: print(file);
runMaxwell
Runs Maxwell Render with the given parameters.
Syntax |
---|
runMaxwell( parameters ) |
Examples
parameters = []; parameters.append('-mxs:c:/scenes/sphere.mxs'); parameters.append('-o:c:/scenes/sphere-render.exr'); parameters.append('-mxi:c:/scenes/sphere-render.mxi'); parameters.append('-res:1920x1080'); parameters.append('-time:10'); runMaxwell(parameters);
getPyMaxwellModuleVersion
Gets the PyMaxwell Python module version. It always will be > Cmaxwell.getEngineVersion().
Syntax |
---|
getPyMaxwellModuleVersion() |
readACO
Reads an Adobe Color (.aco) file containing a set of color swatches. Supports RGB, CMYK, HSB, Lab and Greyscale colors, but CMYK, HSB, Lab and Grayscale may not be accurate. Better export all swatches to RGB using the script provided with the Maxwell Render plug-in for Photoshop: SaveSwatchesRGB.jsx http://www.maxwellrender.com/index.php/maxwell_render_suite/plugins.
Syntax |
---|
(Crgb16[] colors, str[] names) readACO(filename) |
Examples
See the scene_set_from_photoshop_swatches.py example code at the PyMaxwell examples (Maxwell 2.7) page.