Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Furthermore, PyMaxwell provides some extra functions:

NameDescription
getFromPathGets all file names given a path and an extension.
runMaxwellRuns Maxwell Render with the given parameters.
getPyMaxwellModuleVersionGets the PyMaxwell Python module version.
Cmaxwell::getMaterialNamesGets all material names from the scene.
Cmaxwell::getCameraNamesGets all camera names from the scene.
Cmaxwell::readACOReads an Adobe Color (.aco) file containing a set of color swatches.

Anchor
getfrompath
getfrompath

...

Obtain all file names from within a directory given its extension.

Syntax
getFromPath( path, extension )

Examples

Code Block
languagejavascript
titlePython
files = getFromPath('c:/scenes/,'mxs');
for file in files:
  print(file);  

...

Runs Maxwell Render with the given parameters.

Syntax
runMaxwell( parameters )

Examples

Code Block
languagejavascript
titlePython
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);

...

Gets the PyMaxwell Python module version. It always will be > Cmaxwell.getEngineVersion().

Syntax
getPyMaxwellModuleVersion()

Anchor
readaco
readaco

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.