Share

Python API

The Flame Family Python API is a tool for any Flame, Flare, and Flame Assist user looking to script their workflow and automate tedious tasks.

The Python API is accessed via the Flame Python Console. This console gives you a place to write and execute code while working in Flame.

The Flame module is the core of the Python API. This module contains all that you need to use the Flame Python API.

The Python API uses Python version 3.11.5, since Flame Family 2025.




New to the flame Python API?

Write Your First Python API Script shows a small and basic example to get you started.

The Flame API Code Samples contains code snippets that should give some ideas on the structure of the API, and how to use it. You will also find examples of scripts in /opt/Autodesk/<flame_version>/python_examples.

Note: Some functions and attributes may not be available in Flare or Flame Assist.



What's New in 2026.2 Update

PyClipNode

Command Type Description
<PyClipNode>.head_media Attribute Used set or get the Head Media option.

One of the following must be passed as the argument when the attribute is set:
  • Repeat First
  • No Media
  • Use Black
<PyClipNode>.gap_media Attribute Used set or get the Gap Media option.

One of the following must be passed as the argument when the attribute is set:
  • No Media
  • Use Black
<PyClipNode>.tail_media Attribute Used set or get the Head Media option.

One of the following must be passed as the argument when the attribute is set:
  • Repeat First
  • No Media
  • Use Black
<PyClipNode>.timing_offset Attribute Used set or get the Timing Offset. An integer number must be passed as an argument.
<PyClipNode>.locked_frame Attribute Used to get or set the Locked frame.

One of the following must be passed as the argument when the attribute is set:
  • None to disabled the Locked Frame option.
  • An integer number representing the frame to be locked.
<PyClipNode>.version_uids Read-Only Property Used to list the versions available for a Clip node.
<PyClipNode>.version_uid Read-Only Property Used to get the current version of a Clip node.
<PyClipNode>.set_version_uid() Function Used to set a version for a clip node. A valid version uid, part of the uids returned in the output of the version_uids read-only property, must be passed as an argument.

Example

# Select a version for the currently clip node
flame.batch.current_node.get_value().set_version_uid("v01")
# Set the Timing Offset of the current clip node to 12 and lock the frame 1005
clip = flame.batch.current_node.get_value()
clip.timing_offset = 12
clip.batch.current_node.get_value().locked_frame = 1005


PyNode

Command Type Description
<PyNode>.cache_range() Function Used to cache frames for a node. Integer numbers can be passed as arguments to define the start and end frames when caching only a range. If no arguments are set, all the frames are cached.

Example

# Set a range of frames to be cached for the currently selected node
flame.batch.current_node.get_value().cache_range(10, 21)


PyRenderNode

Command Type Description
<PyRenderNode>.destination Attribute A third argument representing the destination reel can be set when the mode is set to Reel Groups. One of the following must be passed:
  • Topmost Reel
  • Bottommost Reel
  • The name of a reel present in the selected Reel Groups


Note: "Default Media Panel Option" can also be set to select the default reel defined in the Media Panel System Preferences.

Example

# Set the destination of a new Render node to the bottommost reel of a Reel Groups named "sh010"
rg = flame.projects.current_project.current_workspace.desktop.create_reel_group("sh010")
render = flame.batch.create_node("Render")
render.destination = ("Reel Groups", rg.name.get_value(), "Bottommost Reel")


PySegment

Command Type Description
<PySegment>.version_uids Read-Only Property Used to list the versions available for a timeline segment.
<PySegment>.version_uid Read-Only Property Used to get the current version of a timeline segment.
<PySegment>.set_version_uid() Function Used to set a version for a timeline segment. Two arguments must be passed: version_uid and scope. The former is mandatory, the latter is optional. Follow Source Sharing is applied when the scope is not defined.

version_uid: version_uid must be a valid version uid returned in the output of the version_uids read-only property.

scope: Used to define the scope of the changes.
  • No Sharing: Only the selected segment is affected by the change.
  • Follow Source Sharing: All shared sources are affected by the change.
  • Follow Connected Segments: All connected segments are affected by the change.

Example

# Select a version for the currently selected segment
flame.timeline.current_segment.set_version_uid("v01")


PyTypeLayer

Command Type Description
<PyTypeLayer>.opacity Attribute Used to get or set the layer Opacity. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.

Example

# Create a new layer in Type and set its opacity to 50.0%
ty = flame.batch.create_node("Type")
ty_layer = ty.add_layer("Left")
ty_layer.text = "This was added using the Python API."
ty_layer.opacity = 50.0


PyWriteFileNode

Command Type Description
<PyWriteFileNode>.destination Attribute A third argument representing the destination reel can be set when the mode is set to Reel Groups. One of the following must be passed:
  • Topmost Reel
  • Bottommost Reel
  • The name of a reel present in the selected Reel Groups.


Note: "Default Media Panel Option" can also be set to select the default reel defined in the Media Panel System Preferences.

Example

# Set the destination of the Add to Workspace option of new Write File node to the bottommost reel of a Reel Groups named "sh010"
rg = flame.projects.current_project.current_workspace.desktop.create_reel_group("sh010")
write = flame.batch.create_node("Write File")
write.destination = ("Reel Groups", rg.name.get_value(), "Bottommost Reel")



What's New in 2026.1 Update

PyBatch

Nodes in the User, Project, and Shared bins can be added using the create_node() function of a PyBatch.

Example

# Add the node named MyKey from the User bin.
flame.batch.create_node("MyKey")


PyClrMgmtNode

Command Type Description
<PyClrMgmtNode>.import_transform() Function Used to import a CDL, CTF, LUT, or 3D LUT. The path to a valid file must be passed as an argument.

Example

# Import a CTF into a Colour Management node.
clr_mgmt = flame.batch.create_node("Colour Mgmt")
clr_mgmt.import_transform("/var/tmp/my_colour_transform.ctf")


PyClrMgmtTimelineFX

Command Type Description
<PyClrMgmtTimelineFX>.import_transform() Function Used to import a CDL, CTF, LUT, or 3D LUT. The path to a valid file must be passed as an argument.

Example

# Import a CTF into a Colour Management Timeline FX.
segment = flame.timeline.current_segment
clr_mgmt = segment.create_effect("Colour Mgmt")
clr_mgmt.import_transform("/var/tmp/my_colour_transform.ctf")


PyLensDistortionNode

Command Type Description
<PyLensDistortionNode>.mode Attribute Used set or get the distortion mode.

One of the following must be passed as the argument when the attribute is set:
  • Distort
  • Undistort
<PyLensDistortionNode>.calculate() Function Used to calculate the amount of distorsion based on the position of vertices.

Example

# Set the mode of a Lens Distortion node to Distort and calculate the distortion.
clip = flame.batch.get_node("my_clip")
grid = flame.batch.get_node("grid_clip")
lens_distort = flame.batch.create_node("Lens Distortion")
flame.batch.connect_nodes(clip, "Default", lens_distort, "Front")
flame.batch.connect_nodes(grid, "Default", lens_distort, "Lens Grid")
lens_distort.mode = "Distort"
lens_distort.calculate()


PyOFXNode

Command Type Description
<PyOFXNode>.preserve_input_colour_space Attribute Used to get or set the status of Preserve Input Colour Space

One of the following must be passed as the argument when the attribute is set:
  • True
  • False

Example

# Get the status of the Preserve Input Colour Space setting in an OpenFX node
ofx = flame.batch.create_node("OpenFX")
ofx.change_plugin("OFX Colourspace Full Example")
print(ofx.preserve_input_colour_space)


PyProject

The get_available_colour_spaces() function has been removed as it was used to get the colour spaces available in SynColor, which has been replaced with OCIO in the 2026 version.

Command Type Description
<PyProject>.description Read-Only Property Used to get the description of the current project.

Example

# Get the Description of a Project
print(flame.projects.current_project.description)


PyTimewarpNode

Command Type Description
<PyTimewarpNode>.mode Attribute Used to get or set the Timewarp mode.

One of the following must be passed as the argument when the attribute is set:
  • Speed
  • Timing
<PyTimewarpNode>.frame_interpolation_mode Attribute Used to get or set the Frame Interpolation mode.

One of the following must be passed as the argument when the attribute is set:
  • Motion
  • Trails
  • Mix
  • ML(2026)
  • ML(2025.1)
<PyTimewarpNode>.sample_mode Attribute Used to get or set the Sample Mode being for the Mix and Trails frame interpolation modes.

One of the following must be passed as the argument when the attribute is set:
  • Start
  • Middle
  • End
<PyTimewarpNode>.mix_amount Attribute Used to get or set the Amount for the Mix frame interpolation mode. A float number between 0.0 and 1000.0 must be passed as an argument when the attribute is set.
<PyTimewarpNode>.get_speed() Function Used to get the Speed value at the requested frame. A float number representing the frame must be passed as the argument.
<PyTimewarpNode>.get_timing() Function Used to set the Timing value at the requested frame. A float number representing the frame must be passed as the argument.
<PyTimewarpNode>.get_speed_timing() Function Used to get the Timing value for the current frame while in the Speed mode. A float number representing the frame must be passed as the argument.
<PyTimewarpNode>.get_duration_timing() Function Used to get the Timing value for the current frame while in the duration mode. A float number representing the frame must be passed as the argument.
<PyTimewarpNode>.set_speed() Function Used to set the Speed value at the requested frame.

Two arguments must be set:
  • A float number representing the frame.
  • A float number representing the new speed value.
<PyTimewarpNode>.set_timing() Function Used to set the Timing value at the requested frame.

Two arguments must be set:
  • A float number representing the frame.
  • A float number representing the new timing value.

Example

# Create a Timewarp node, apply a 50% speed change, and use a Machine Learning model on a clip node named MyClip.
clip = flame.get_node("my_clip")
tw = flame.batch.create_node("Timewarp")
flame.batch.connect_nodes(MyClip, "Default", tw, "Front")
tw.mode = "Speed"
tw.set_speed(1, 50.0)
tw.frame_interpolation_mode = "ML(2026)"


PyTimewarpTimelineFX

Command Type Description
<PyTimewarpTimelineFX>.mode Attribute Used to get or set the Timewarp mode.

One of the following must be passed as the argument when the attribute is set:
  • Speed
  • Timing
  • Duration
<PyTimewarpTimelineFX>.duration Attribute Used to get or set the Duration value for timeline segment. An integer number must be passed as the argument when the attribute is set.
<PyTimewarpTimelineFX>.duration_speed Attribute Used to get the Speed value for the current frame while in the Duration mode.
<PyTimewarpTimelineFX>.frame_interpolation_mode Attribute Used to get or set the Frame Interpolation mode.

One of the following must be passed as the argument when the attribute is set:
  • Motion
  • Trails
  • Mix
  • ML(2026)
  • ML(2025.1)
<PyTimewarpTimelineFX>.sample_mode Attribute Used to get or set the Sample Mode being for the Mix and Trails frame interpolation modes.

One of the following must be passed as the argument when the attribute is set:
  • Start
  • Middle
  • End
<PyTimewarpTimelineFX>.mix_amount Attribute Used to get or set the Amount for the Mix frame interpolation mode. A float number between 0.0 and 1000.0 must be passed as an argument when the attribute is set.
<PyTimewarpTimelineFX>.get_speed() Function Used to get the Speed value at the requested frame. A float number representing the frame must be passed as the argument.
<PyTimewarpTimelineFX>.get_timing() Function Used to set the Timing value at the requested frame. A float number representing the frame must be passed as the argument.
<PyTimewarpTimelineFX>.get_speed_timing() Function Used to get the Timing value for the current frame while in the Speed mode. A float number representing the frame must be passed as the argument.
<PyTimewarpTimelineFX>.get_duration_timing() Function Used to get the Timing value for the current frame while in the Duration mode. A float number representing the frame must be passed as the argument.
<PyTimewarpTimelineFX>.set_speed() Function Used to set the Speed value at the requested frame.

Two arguments must be set:
  • A float number representing the frame.
  • A float number representing the new speed value.
<PyTimewarpTimelineFX>.set_timing() Function Used to set the Timing value at the requested frame.

Two arguments must be set:
  • A float number representing the frame.
  • A float number representing the new timing value.


PyTypeNode / PyTypeTimelineFX

The following attributes, functions, and read-only properties apply to both the PyTypeNode and PyTypeTimelineFX.

Command Type Description
<PyTypeNode>.selected_layers Attribute Used to access the attributes, functions, and read-only properties of the selected layers.
<PyTypeNode>.current_layer Attribute Used to access the attributes, functions, and read-only properties of the current layer.
<PyTypeNode>.swaa Attribute Used to get or set the amount of software anti-aliasing samples.

One of the following must be passed as the argument when the attribute is set:
  • SWAA 1x
  • SWAA 4x
  • SWAA 9x
  • SWAA 16x
  • SWAA 25x
  • SWAA 36x
  • SWAA 49x
  • SWAA 64x
<PyTypeNode>.use_hwaa Attribute Used to get or set the status of Use HWAA

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeNode>.motion_blur Attribute Used to get or set the status of Motion Blur

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeNode>.motion_blur_samples Attribute Used to get or set the amount of motion blur samples. An integer number between 2 and 100 must be passed as an argument when the attribute is set.
<PyTypeNode>.motion_blur_phase Attribute Used to get or set the motion blur phase. A float number between -1.0 and 1.0 must be passed as an argument when the attribute is set.
<PyTypeNode>.motion_blur_shutter Attribute Used to get or set the motion blur shutter. A float number between 0.10 and 50.0 must be passed as an argument when the attribute is set.
<PyTypeNode>.resolution_mode Attribute Used to get or set the resolution mode.

One of the following must be passed as a string to set the mode:
  • Resolution List
  • Adaptive
  • Scaling Presets
<PyTypeNode>.scaling_presets_value Attribute Used to get or set the Scaling Presets value. A float must be passed as an argument to set the value. The value represents the scaling percentage.
<PyTypeNode>.adaptive_mode Attribute Used to get or set the Adaptive mode.

One of the following must be passed as a string to set the mode:
  • Width based on Ratio
  • Height based on Ratio
<PyTypeNode>.layers Read-Only Property Returns the list of layers.
<PyTypeNode>.add_layer() Function Used to create a new PyTypeLayer.

One of the following must be passed as an argument to set the Layer type:
  • Left
  • Centre
  • Right
  • Roll
  • Crawl
<PyTypeNode>.append_type_setup() Function Used to append a file setup to the existing Type setup.

A file path including the filename must be passed as an argument.


PyTypeLayer

A Type layer as its own set of attributes and read-only property.

Command Type Description
<PyTypeLayer>.hidden Attribute Used to get or set the visibility status of a Layer.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.text Attribute Used to get or set the characters of a Layer. A string must be passed as an argument to change the characters.
<PyTypeLayer>.font Attribute Used to get or set the characters font. A tuple with a maximum of three values between Font Family, Font Style, and Project Font Index is returned when getting the current font.

When the attribute is set, one of the following values can be used:
  • Font Family: A string representing the name of the Font Family
  • Font Style: A string representing the name of the Font Style
  • Font Path: A string representing the path to a font
  • Project Font Index: An integer number representing the index of the Font in the Project Fonts table.


One of the following combinations must used when the attribute is set:
  • (Font Family, Font Style)
  • (Font Family, Font Style, Project Font Index)
  • (Font Path, Font Style)
  • Font Path
  • Project Font Index
<PyTypeLayer>.font_size Attribute Used to get or set the characters Size. A float number between 0.0 and 2000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.fill Attribute Used to get or set the status of the Fill Active button.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.fill_colour Attribute Used to get or set the Fill Colour of the characters. A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
<PyTypeLayer>.fill_opacity Attribute Used to get or set the characters Opacity. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.italic_angle Attribute Used to get or set the characters Italic angle. A float number between -60.0 and 60.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.kerning Attribute Used to get or set the characters Kerning. A float number between -100000.0 and 10000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.tracking Attribute Used to get or set the characters Tracking. A float number between -100000.0 and 10000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.underline Attribute Used to get or set the status of the Underline Active button.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.underline_width Attribute Used to get or set the Underline Width. A float number between -9999.0 and 9999.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.underline_offset_y Attribute Used to get or set the Underline Y Offset. A float number between -9999.0 and 9999.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.outline Attribute Used to get or set the status of the Outline Active button.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.outline_colour Attribute Used to get or set the Outline Colour of the characters. A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
<PyTypeLayer>.outline_width Attribute Used to get or set the Outline Width. A float number between 1.0 and 500.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.outline_join Attribute Used to get or set the Outline Join mode.

One of the following must be passed as the argument when the attribute is set:
  • Round Join
  • Square Join
  • Bevel Join
  • Miter Join
<PyTypeLayer>.outline_miter_limit Attribute Used to get or set the Outline Miter Limit. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.case Attribute Used to get or set the characters Case.

One of the following must be passed as the argument when the attribute is set:
  • Original
  • Uppercase
  • Lowercase
  • Title Caps
  • Small Caps
<PyTypeLayer>.superscript Attribute Used to get or set the status of the Superscript option.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.subscript Attribute Used to get or set the status of the Subscript option.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.strikeout Attribute Used to get or set the status of the Strikeout option.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.mask_mode Attribute Used to get or set the Mask mode.

One of the following must be passed as the argument when the attribute is set:
  • Disabled
  • Top
  • Bottom
  • Left
  • Right
<PyTypeLayer>.mask_position Attribute Used to get or set the Mask Position. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.background Attribute Used to get or set the status of the Background Active button.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.background_colour Attribute Used to get or set the Background Colour. A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
<PyTypeLayer>.background_opacity Attribute Used to get or set the Background Opacity. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.background_radius Attribute Used to get or set the Background Radius. A float number between 0.0 and 1.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.background_offset Attribute Used to get or set the Background Offset. Float numbers for the X and Y values must be passed as arguments when the attribute is set.
<PyTypeLayer>.background_scale Attribute Used to get or set the Background Scale. A tuple with two float values (X, Y) must be passed as an argument when the attribute is set.
<PyTypeLayer>.background_outline Attribute Used to get or set the status of the Background Outline.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.background_outline_colour Attribute Used to get or set the Background Outline Colour. A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
<PyTypeLayer>.background_outline_width Attribute Used to get or set the Background Outline Width. A float number between 1.0 and 500.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.background_outline_join Attribute Used to get or set the Background Outline Join mode.

One of the following must be passed as the argument when the attribute is set:
  • Round Join
  • Square Join
  • Bevel Join
  • Miter Join
<PyTypeLayer>.background_outline_miter_limit Attribute Used to get or set the Background Outline Miter Limit. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow Attribute Used to get or set the status of the Shadow Active button.

One of the following must be passed as the argument when the attribute is set:
  • True
  • False
<PyTypeLayer>.shadow_colour Attribute Used to get or set the Shadow Colour of the characters. A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
<PyTypeLayer>.shadow_opacity Attribute Used to get or set the Shadow Opacity. A float number between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow_blur Attribute Used to get or set the Shadow Blur. A tuple with two float values (X, Y) between 0.0 and 100.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow_position Attribute Used to get or set the Shadow Position. A tuple with two float values (X, Y) between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow_scale Attribute Used to get or set the Shadow Scale. A tuple with two float values (X, Y) between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow_shear Attribute Used to get or set the Shadow Shear. A tuple with two float values (X, Y) between -60.0 and 60.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shadow_rotation Attribute Used to get or set the Shadow Rotation. A float number between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.position Attribute Used to get or set the Layer Position. A tuple with two float values (X, Y) between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.scale Attribute Used to get or set the Layer Scale. A tuple with two float values (X, Y) between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.shear Attribute Used to get or set the Layer Shear. A tuple with two float values (X, Y) between -60.0 and 60.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.rotation Attribute Used to get or set the Layer Rotation. A float number between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.centre Attribute Used to get or set the Layer Centre. A tuple with two float values (X, Y) between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.axis_alignment Attribute Used to get or set the Layer Axis Alignment.

One of the following must be passed as the argument when the attribute is set:
  • Bottom / Right
  • Bottom
  • Bottom / Left
  • Right
  • Centre
  • Left
  • Top / Right
  • Top
  • Top / Left
<PyTypeLayer>.width Attribute Used to get the Layer Width.
<PyTypeLayer>.justification Attribute Used to get or set the Layer Justification.

One of the following must be passed as the argument when the attribute is set:
  • Left
  • Centre
  • Right
  • Justified
<PyTypeLayer>.leading Attribute Used to get or set the Layer Leading. A float number between -1000000.0 and 1000000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.separation Attribute Used to get or set the Layer Separation. A float number between -999.0 and 999.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.indent Attribute Used to get or set the Layer Indent. An integer number between 0 and 1000.0 must be passed as an argument when the attribute is set.
<PyTypeLayer>.type Read-Only Property Returns the layer type.

Examples

# Create a Type node, add a left-justified layer containing the sentence "This was added using the Python API.", and change some attributes
ty = flame.batch.create_node("Type")
ty_layer = ty.add_layer("Left")
ty_layer.text = "This was added using the Python API."
ty_layer.font = ("Discreet","Bold")
ty_layer.size = 75.0
# Get the layer type of all layers in the setup of a Type node named my_type.
ty = flame.batch.get_node("my_type")
for layer in ty.layers:
    print(layer.text)
    print(layer.type)
    print("=====")



What's New in 2026

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

Examples

# Set the Shot Name of the selected Clip in the Media Panel
flame.media_panel.selected_entries[0].shot_name = "sh010_<user>"
# Get the Tokenized Shot Name of the selected Clip in the Media Panel
print(flame.media_panel.selected_entries[0].tokenized_shot_name)
# Enable Dynamic in the Rename Shot dialog window
flame.media_panel.selected_entries[0].dynamic_shot_name = True


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

Examples

# Set the Shot Name of the selected Clip in the Media Panel
flame.batch.current_node.get_value().shot_name = "sh010_<user>"
# Get the Tokenized Shot Name of the selected Clip in the Media Panel
print(flame.batch.current_node.get_value().tokenized_shot_name)
# Enable Dynamic in the Rename Shot dialog window
flame.flame.batch.current_node.get_value().dynamic_shot_name = True


PyClrMgtNode

Command Type Description
<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
<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.

Example

# Create a Colour Management node and define its different attributes
clr1 = flame.batch.create_node("Colour Mgmt")
clr1.mode = "Input Transform"
clr1.tagged_colour_space = "ACEScct"
clr1.working_space = "ACEScg"
clr1.bit_depth = 32

clr2 = flame.batch.create_node("Colour Mgmt")
clr2.mode = "View Transform"
clr2.display = "sRGB - Display"
clr2.view = "ACES 2.0 - SDR 100 nits (Rec.709)"
clr2.tagged_colour_space = "ACEScg"
clr2.invert = True
clr2.context_variables_from_project = False
clr2.set_context_variable("SHOT", "0004")


PyClrMgmtTimelineFX

Command Type Description
<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
<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.

Example

# Create a Colour Management Timeline FX on the selected segment and define its different attributes
clr = flame.timeline.current_segment.create_effect("Colour Mgmt")
clr.mode = "Input Transform"
clr.tagged_colour_space = "ACEScct"
clr.working_space = "ACEScg"


PyNode

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

Example

# Set the Shot Name of a newly created OpenFX node in Batch
ofx = flame.batch.create_node("OpenFX")
ofx.shot_name = "Sh010"


PyProject

Command Type Description
<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>.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>..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.

Examples

# Reload the OCIO config of the current project
flame.projects.current_project.reload_ocio_config(True)
# Get the OCIO context variables of the current project, as a dictionary
flame.projects.current_project.get_context_variables()
# Set the value of an OCIO context variable for the current project
flame.projects.current_project.set_context_variable("SHOT", "0001")
# Reset the values of the OCIO context variables for the current project
flame.projects.current_project.reset_context_variables()
# Export the OCIO config of the current project
flame.projects.current_project.export_ocio_config("My Config", "/usr/tmp", False, False, False)

# In this example, the last three arguments are, in order, setting the status of the overwrite_existing, export_as_locked, and generate_ocioz attributes to False.
# Get the Project Home, Setups, and Media Cache locations
prj = flame.projects.current_project
print(prj.project_folder)
print(prj.setups_folder)
print(prj.media_folder)

Was this information helpful?