CMDS

Table of contents
  1. Flair for Maya
    1. Commands
      1. alpha (a)
      2. benchmark (bch)
      3. channels (ch)
      4. cryptomattes (cry)
      5. environment (env)
      6. forceDistortionBlending (fDB)
      7. listOperations (lsO)
      8. listTargets (lsT)
      9. refresh (r)
      10. reloadOperationShaders (rOS)
      11. render (rnd)
      12. renderOperation (rOp)
      13. renderState (rS)
      14. resolution (res)
      15. state (s)
      16. target (t)
      17. targetsToDistort (tD)
      18. version (v)
      19. vram (vrm)
      20. Examples

The Flair commands allow to directly interact with the C++ plugin mainly to query engine settings and execute renders.

Flair for Maya

Commands

Long name (short name)

Argument types

Properties

alpha (a)

int

C

Toggles different alpha modes.

  • 0 - No alpha
  • 1 - Linear alpha
  • 2 - Premultiplied alpha

benchmark (bch)

int

C

Performs a benchmark for the amount of frames requested.

channels (ch)

list

C

Enables/disables visualization of RGBA channels in Flair.

Note: enabling alpha (A) channel will override all other channels.

cryptomattes (cry)

bool

C

Toggles rendering of cryptomattes in Flair.

environment (env)

bool, string

C

Returns the path to the Flair environment or to a folder within the Flair environment.

forceDistortionBlending (fDB)

list

C

Targets (AOVs) to force alpha blending of distortions onto.

By default, different blending modes are applied depending on the type of data within the AOV–as alpha blending depth, normals or world positions is normally of little use.

This flag can be used to override target-specific blending behavior and force alpha blending onto it.

Note: This flag will only work when set together with the targetsToDistort flag.

listOperations (lsO)

bool

C

Returns the list of render operations currently in use within Flair.

listTargets (lsT)

bool

C

Returns the list of render targets currently in use within Flair.

refresh (r)

bool

C

Reloads (recompiles) all post-processing shaders in Flair, refreshing the style.

reloadOperationShaders (rOS)

int

C

Reloads (recompiles) the shader used by the specified render operation in Flair.

render (rnd)

string

C

Filepath to render (save) image as.

Use in combination with the target flag to specify what targets to render.

renderOperation (rOp)

int

C

Returns if the specified render operation is enabled or disabled.

Use in combination with the state flag to enable/disable operation.

renderState (rS)

bool

C

Toggles the render state of Flair on/off.
Use in combination with the resolution flag to render at different resolutions.

resolution (res)

list

C Q

In query mode: returns the resolution Flair is rendering in (without render scale).

In combination with the renderState flag: Sets the rendering resolution in Flair.

state (s)

bool

C

Used in combination with the renderOperation flag to enable/disable operation.

target (t)

list

C

Targets (AOVs) to render as an image.

Use in combination with the render flag to render the specified targets.

Note: Only “.exr” image format can store more than one target in a single file. If another file format is used, only the first target specified will be rendered.

targetsToDistort (tD)

list

C

Targets (AOVs) to apply distortions onto. By default, only the outputTarget and the cryptomatte targets will have distortions, including TAA. This flag can be used to specify exactly which targets should be distorted.

Note: Exiting the render state (rS) will revert the specified targetsToDistort to their default values.

version (v)

bool

C

Returns the version of Flair.

vram (vrm)

bool

C

Returns the amount of video ram currently in use by Flair.

Examples

1
2
3
4
5
6
7
8
9
10
import maya.cmds as cmds

# get the environment where Flair is installed
cmds.flair(env=True)  # Result: yourdir/flair/maya

# get the "shaders" folder within Flair
cmds.flair(env="shaders")  # Result: yourdir/flair/maya/shaders

# Run a benchmark over 100 frames
cmds.flair(bch=100)