Share

Python API (What's New in 2026)

The following additions have been made to the Python API.


PyClip

Command Type Description
<PyClip>.shot_name Attribute Used to get or set the Shot Name of a source clip.
A string must be passed as an argument when the shot name is set.
<PyClip>.tokenized_shot_name Attribute Used to get or set the Tokenized Shot Name of a source clip.
Use tokenized_shot_name to get the string with the tokens in use rather than the tokens being resolved.
<PyClip>.dynamic_shot_name Attribute Used to enabled or disable the Dynamic button in the Rename Shot dialog window.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button

PyClipNode

Command Type Description
<PyClipNode>.shot_name Attribute Used to get or set the Shot Name of a Clip node. The associated clip must be a source, not a sequence.
A string must be passed as an argument when the shot name is set.
<PyClipNode>.tokenized_shot_name Attribute Used to get or set the Tokenized Shot Name of a Clip node. The associated clip must be a source, not a sequence.
Use tokenized_shot_name to get the string with the tokens in use rather than the tokens being resolved.
<PyClipNode>.dynamic_shot_name Attribute Used to enabled or disable the Dynamic button in the Rename Shot dialog window.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button

PyClrMgtNode

Command Type Description
<PyClrMgtNode>.get_context_variables() Function Used to get the OCIO context variables in a dictionary.
<PyClrMgtNode>.set_context_variable() Function Used to set the value for the specified OCIO context variable.
<PyClrMgtNode>.reset_context_variables() Function Used to reset the OCIO context variables to the ones defined at the project level.
<PyClrMgmtNode>.mode Attribute Used to get or set the current colour management mode.
One of the following must be passed as the argument when the attribute is set:
  • Colour Transform
  • Input Transform
  • Tag Only
  • View Transform
<PyClrMgmtNode>.view Attribute Used to get or set the View in View Transform mode.
<PyClrMgmtNode>.tagged_colour_space Attribute Used to get or set the Tagged Colour Space in Tag Only, View Transform, and Colour Transform modes.
Used to get or set the Input Colour Space in Input Transform mode.
<PyClrMgmtNode>.display Attribute Used to get or set the Display in View Transform mode.
<PyClrMgmtNode>.working_space Attribute Used to get or set the Working Space in Input Transform mode.
<PyClrMgmtNode>.bit_depth Attribute Used to get / set the bit depth in all modes.
One of the following must be passed as the argument when the attribute is set:
  • 8
  • 10
  • 12
  • 16
  • 32
<PyClrMgmtNode>.invert Attribute Used to enable/disable the Invert parameter in View Transform, Input Transform, and Colour Transform (Custom) modes.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button
<PyClrMgmtNode>.custom Attribute Used to enable/disable the Custom parameter in Colour Transform mode.
Note: It is not possible to set the values of the rows in Custom mode with the Python API.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button
<PyClrMgmtNode>.context_variables_from_project Attribute Used to enable/disable the From Project parameter for the OCIO Context tab.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button

PyClrMgmtTimelineFX

Command Type Description
<PyClrMgmtTimelineFX>.get_context_variables() Function Used to get the OCIO context variables in a dictionary.
<PyClrMgmtTimelineFX>.set_context_variable() Function Used to set the value for the specified OCIO context variable.
<PyClrMgmtTimelineFX>.reset_context_variables() Function Used to reset OCIO the context variables to their initial state from the OCIO config.
<PyClrMgmtTimelineFX>.mode Attribute Used to get or set the current colour management mode.
One of the following must be passed as the argument when the attribute is set:
  • Colour Transform
  • Input Transform
  • Tag Only
  • View Transform
<PyClrMgmtTimelineFX>.view Attribute Used to get or set the View in View Transform mode.
<PyClrMgmtTimelineFX>.tagged_colour_space Attribute Used to get or set the Tagged Colour Space in Tag Only, View Transform, and Colour Transform modes.
Used to get or set the Input Colour Space in Input Transform mode.
<PyClrMgmtTimelineFX>.display Attribute Used to get or set the Display in View Transform mode.
<PyClrMgmtTimelineFX>.working_space Attribute Used to get or set the Working Space in Input Transform mode.
<PyClrMgmtTimelineFX>.invert Attribute Used to enable/disable the Invert parameter in View Transform, Input Transform, and Colour Transform (Custom) modes.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button
<PyClrMgmtTimelineFX>.custom Attribute Used to enable/disable the Custom parameter in Colour Transform mode.
Note: It is not possible to set the values of the rows in Custom mode with the Python API.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button
<PyClrMgmtTimelineFX>.context_variables_from_project Attribute Used to enable/disable the From Project parameter for the OCIO Context tab.
One of the following must be passed as the argument when the attribute is set:
  • True to enable the button
  • False to disable the button

PyNode

Command Type Description
<PyNode>.colour_space Read-Only Property Used to get the colour space name of the primary output of a node.
<PyNode>.shot_name Attribute Used to get or set the Shot Name of an OpenFX or a Pybox node.

PyProject

Command Type Description
<PyProject>.reload_ocio_config Function Used to reload the OCIO config of the project.
A boolean argument must be passed to set the value for the dialog related to deleting the custom colour spaces, roles, and rules of the project. The default is False.
<PyProject>.project_folder Read-Only Property Used to get the Project Home location of the current project.
<PyProject>.setups_folder Read-Only Property Used to get the Project Setups location of the current project.
<PyProject>.media_folder Read-Only Property Used to get the Project Media Cache location of the current project.
<PyProject>..get_context_variables() Function Used to get the OCIO context variables of the current project as a dictionary.
<PyProject>.set_context_variable() Function Used to set the value of an OCIO context variable of the current project.
<PyProject>.reset_context_variables() Function Used to reset the values of the OCIO context variables of the current project.
<PyProject>.export_ocio_config() Function Used to export the OCIO config of the current project.
The following must be passed as the arguments:
  • Name for the config
  • Destination folder
  • Export as Locked (True or False)
  • Overwrite existing config(True or False)
  • Generate OCIOZ (True or False)
Note: flame.project was changed to flame.projects in the 2020.1 Update version. Both syntaxes are supported for compatibility reasons, but we encourage the use of the latter instead of the former.

Was this information helpful?