What's New in Previous Releases
This topic covers updates to the Python API, by release.
- What's New in 2024.2
- New PyObject: PyResolution
- Updated PyObject: PyExport
- Updated Commands: Batch
- Command:
<PyNode>.mode
- Command:
<PyNode>.colour
- Command:
<PyNode>.luminance
- Command:
<PyNode>.bars_softness
- Command:
<PyNode>.gradient_mode
- Command:
<PyNode>.gradient_direction_mode
- Command:
<PyNode>.gradient_circular_mode
- Command:
<PyNode>.bi_gradient_colour_one
,<PyNode>.bi_gradient_colour_two
- Command:
<PyNode>.quad_gradient_colour_top_left
,<PyNode>.quad_gradient_colour_top_right
,<PyNode>.quad_gradient_colour_bottom_left
,<PyNode>.quad_gradient_colour_bottom_right
- Command:
- Update Commands: Resize
- New Commands for Subtitles
- Command:
<PySequence>. import_subtitles_file()
- Command:
<PySequence>.subtitles
- Command:
<PySequence>. subtitles_track
- Command:
<PySubtitleTrack>.parent
- Command:
<PySequence>. create_subtitle()
- Command:
<PySubtitle>.name
- Command:
<PySubtitleTrack>. segments
- Command:
<PySegment>. create_effect("Subtitle")
- Command:
flame.delete (PySubtitleTrack)
- Command:
<PySubtitleTrack>. export_as_srt_file()
- Command:
- What's New in 2024.1
- What's New in 2024
- What's New in 2023.2
- What's New in 2023.1
- What's New in 2023
- What's New in 2022
- What's New in 2021.2
- What's New in 2021.1
- What's New in 2021
- Batch - Clip
- Batch - General
- Batch - Write File
- Project
- What's New in 2020.2
- What's New in 2020.1
- What's New in 2020
- What's New in 2019.2
- What's New in 2019.1
- What's New in 2019
What's New in 2024.2
New PyObject: PyResolution
A new PyObject named PyResolution can be used to get and set the resolution of a node.
Command: flame.PyResolution()
Type: Constructor
Description: Used to define a resolution unit.
The following arguments can be passed:
resolution
One of the following values must be set:- The string corresponding to a resolution in the Resolution List.
- “Custom Resolution"
- "Project Resolution"
width
An integer value must be set.height
An integer value must be set.bit_depth
One of the following must be set:- 8
- 10
- 12
- 16
- 32
frame_ratio
A float value must be set.scan_mode
One of the following must be set:- F1
- F2
- P
It is not possible to set only the desired parameters directly in the constructor. One of three predefined constructors must be used.
flame.PyResolution()
In this scenario, the individual attributes can be set afterward. If no attributes are set the Project Resolution is used.flame.PyResolution(resolution)
flame.PyResolution(width, height, bit_depth, frame_ratio, scan_mode)
Command: <PyNode>.resolution
Type: Attribute
Description: Used to get or set the resolution of a node in Batch, Batch FX, and Modular Keyer.
Examples:
# Print the resolution of a node
print(flame.batch.get_node("resize78").resolution.get_value().resolution)
# Copy the resolution settings between nodes
res = flame.batch.get_node("col78").resolution.get_value()
flame.batch.get_node("col83").resolution = res
# Set the resolution of a node using a preset
res = flame.PyResolution("HD 1080 16:9 (1920 x 1080")
resize = flame.batch.get_node("resize01")
resize.resolution = res
# Set the resolution of a node using individual values
res = flame.PyResolution()
res.width = 1920
res.height = 1080
res.bit_depth = 16
res.frame_ratio = 1.778
res.scan_mode = "P"
resize = flame.batch.get_node("resize01")
resize.resolution = res
Updated PyObject: PyExport
Attributes have been added to the PyExport Object to control how to deal with the Subtitles of a clip.
Command: flame.PyExporter.include_subtitles
Type: Attribute
Description: Used to set if the Subtitles must be included in an exported clip. One of the following values must be set:
- True
- False
Command: flame.PyExporter.export_subtitles_as_files
Type: Attribute
Description: Used to select the Subtitles Export mode between Export as Files and Burn in Image. One of the following values must be set:
- True (the Export as Files option is selected)
- False (the Burn in Image option is selected)
Command: flame.PyExporter.export_all_subtitles
Type: Attribute
Description: Used to select if a file will be created for the current Subtitle track or all Subtitle tracks. One of the following values must be set:
- True (the All Subtitles Track option is selected)
- False (the Current Subtitle Track option is selected)
Updated Commands: Batch
Most settings in the Colour Source nodes are now available as attributes in the Python API.
Command: <PyNode>.mode
Type: Attribute
Description: Used to get or set the mode in the Colour Source node. One of the following values must be passed as a string to set the mode:
- Colour
- Colour Noise
- Gradient
- Noise
- PAL Bars
- SMPTE Bars
Examples:
# Set the mode of a Colour Source node to Gradient
cs = flame.batch.create_node("Colour Source") cs.mode = "Gradient"
Command: <PyNode>.colour
Type: Attribute
Description: Used to get or set the colour in the Colour Source node. The colour is used in the Colour mode.
A tuple with three values (Red, Green, and Blue) must be passed to set the colour.
Examples:
# Set the colour of a Colour Source node to black
cs = flame.batch.create_node("Colour Source")
cs.mode = "Colour"
cs.colour = (0.0, 0.0, 0.0)
Command: <PyNode>.luminance
Type: Attribute
Description: Used to get or set the luminance in the Colour Source node. The luminance is used in all modes but Gradient. One of the following values must be passed as an argument to set the luminance:
- 75
- 100
Examples:
# Set the luminance of a Colour Source node to 75%
cs = flame.batch.create_node("Colour Source")
cs.luminance = 75
Command: <PyNode>.bars_softness
Type: Attribute
Description: Used to get or set the bars softness in the Colour Source node. The luminance is used in the SMPTE Bars and PAL Bars mode. An int value between 0 and 100 must be passed as an argument to set the bars softness.
Examples:
# Set the colour bars softness of a Colour Source node to 3
cs = flame.batch.create_node("Colour Source")
cs.mode = "SMPTE Bars"
cs.bars_softness = 3
Command: <PyNode>.gradient_mode
Type: Attribute
Description: Used to get or set the gradient mode in the Colour Source node. The gradient mode is used in the Gradient mode. One of the following values must be passed as a string to set the gradient mode:
- 2
- 4
Examples:
# Set the gradient mode of a Colour Source node to 4 Pots.
cs = flame.batch.create_node("Colour Source")
cs.mode = "Gradient"
cs.gradient_mode = 4
Command: <PyNode>.gradient_direction_mode
Type: Attribute
Description: Used to get or set the gradient direction in the Colour Source node. The gradient direction is used in the Gradient mode. One of the following values must be passed as a string to set the gradient direction mode:
- Circular
- Horizontal
- Vertical
Examples:
# Set the gradient direction mode of a Colour Source node to Vertical.
cs = flame.batch.create_node("Colour Source")
cs.mode = "Gradient"
cs.gradient_direction_mode = "Vertical"
Command: <PyNode>.gradient_circular_mode
Type: Attribute
Description: Used to get or set the gradient circular mode in the Colour Source node. The gradient circular mode is used in the Gradient mode. One of the following values must be passed as a string to set the gradient circular mode:
- Diagonal
- Height
- Width
Examples:
# Set the gradient circular mode of a Colour Source node to Height.
cs = flame.batch.create_node("Colour Source")
cs.mode = "Gradient"
cs.gradient_direction_mode = "Circular"
cs.gradient_circual_mode = "Height"
Command: <PyNode>.bi_gradient_colour_one
, <PyNode>.bi_gradient_colour_two
Type: Attribute
Description: Used to get or set the gradient colours in the Colour Source node. The colours are used in the Gradient mode set to 2 Pots. A tuple of three values (Red, Green, and Blue) must be passed to set a colour.
Examples:
# Set the colours of a Colour Source node's bi-gradient.
cs = flame.batch.create_node("Colour Source")
cs.mode = "Gradient"
cs.gradient_mode = 2
cs.bi_gradient_colour_one = (1.0, 0.0, 0.0)
cs.bi_gradient_colour_one = (0.0, 1.0, 0.0)
Command: <PyNode>.quad_gradient_colour_top_left
, <PyNode>.quad_gradient_colour_top_right
, <PyNode>.quad_gradient_colour_bottom_left
, <PyNode>.quad_gradient_colour_bottom_right
Type: Attribute
Description: Used to get or set the gradient colours in the Colour Source node. The colours are used in the Gradient mode set to 4 Pots. A tuple of three values (Red, Green, and Blue) must be passed to set a colour.
Examples:
# Set the colours of a Colour Source node's bi-gradient.
cs = flame.batch.create_node("Colour Source")
cs.mode = "Gradient"
cs.gradient_mode = 4
cs.quad_gradient_colour_top_left = (1.0, 0.0, 0.0)
cs.quad_gradient_colour_top_right = (0.0, 1.0, 0.0)
cs.quad_gradient_colour_bottom_left = (1.0, 0.0, 1.0)
cs.quad_gradient_colour_bottom_right = (1.0, 1.0, 1.0)
Update Commands: Resize
The Resolution List, Adaptive, and Scaling Presets resizing modes can be set on the following nodes: Action, Colour Source, Clip, Gradient, Matchbox, Pybox, Render, Resize, Text, and Write File.
Command: <PyNode>.resolution_mode
Type: Attribute
Description: 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
Examples:
# Set the Resolution mode of a node
resize = flame.batch.create_node("Resize")
resize.resolution_mode = "Scaling Presets"
Command: <PyNode>.scaling_presets_value
Type: Attribute
Description: Used to get or set the Scaling Presets value. A float between must be passed as an argument to set the value. The value represents the scaling percentage.
Examples:
# Set the Scaling Presets value of a node
resize = flame.batch.create_node("Resize")
resize.resolution_mode = "Scaling Presets"
resize.scaling_presets_value = 50.0
Command: <PyNode>.adaptive_mode
Type: Attribute
Description: 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
Examples:
# Set the Resolution of a node using the Adaptive mode
res = flame.PyResolution()
res.width = 1920
res.frame_ratio = 1.778
resize = flame.batch.create_node("Resize")
resize.resolution_mode = "Adaptive"
resize.adaptive_mode = "Height based on Ratio"
resize.resolution = res
New Commands for Subtitles
A PySubtitleTrack object has been added, allowing subtitles to be imported or exported and the Timeline FX to be created. The following functions were already available, but updated for PySubtitleTrack.
The <subtitles name>
token can be used in the file_name argument of the export_as_srt_file() function.
Command: <PySequence>. import_subtitles_file()
Type: Function
Description: Used to import a Subtitles file in a Sequence. The following arguments must be passed:
file_name (mandatory)
The path and name of the file to import.- A string must be passed.
file_type
The file type must be specified for files that do not have the .srt or .txt extension.- A string must be passed.
align_first_event_to_clip_start
Force the first event to be aligned with the clip start. True or False must be passed.- True: The first subtitle event is aligned to the first video event.
- False (default value): The first subtitle event is set to its specified time value inside the file.
convert_from_frame_rate
The frame rate of the imported file (for txt files only).- A valid FCM must be passed in a string.
Examples:
# Import a Subtitle file to the current sequence
seq = flame.timeline.clip
seq.import_subtitles_file(file_name = "/tmp/mySubtitleFile.srt")
Command: <PySequence>.subtitles
Type: Read-Only Property
Description: Return a list of PySubtitleTrack object.
Examples:
# Return how many Subtitles tracks a sequence has
print(len(flame.media_panel.selected_entries[0].subtitles))
Command: <PySequence>. subtitles_track
Type: Attribute
Description: Used to get or set the current Subtitles track of a Sequence. A PySubtitleTrack object must be passed to the attribute to set it as current.
None can be passed to disable the visibility of all Subtitles track.
Examples:
# Set the Subtitles visibility to the Subtitles 1 track
flame.timeline.clip.subtitles_track = flame.timeline.clip.subtitles[0]
# Disable the visibility of all Subtitles tracks
flame.timeline.clip.subtitles_track = None
Command: <PySubtitleTrack>.parent
Type: Read-Only Property
Description: Return the parent object of a Subtitles track. The parent object is always a PyClip or PySequence.
Examples:
# Get the parent object of a Subtitle track
parent = flame.timeline.clip.subtitles[0].parent
Command: <PySequence>. create_subtitle()
Type: Function
Description: Used to create a Subtitles track.
Examples:
# Create a Subtitles track
flame.timeline.clip.create_subtitle()
Command: <PySubtitle>.name
Type: Attribute
Description: Used to get or set the name of a Subtitles Track. A string must be passed to the attribute to change the name.
Examples:
# Change the name of a Subtitles track
flame.timeline.clip.subtitles[0].name = "New Name"
Command: <PySubtitleTrack>. segments
Type: Read-Only Property
Description: Return a list of PySegments located on a Subtitles track.
Examples:
# Return how many segments a Subtitles track has
print(len(flame.media_panel.selected_entries[0].subtitles[0].segments))
Command: <PySegment>. create_effect("Subtitle")
Type: Function
Description: Used to add a Subtitle Timeline FX to a Timeline Segment. "Subtitle" must be passed as the argument to the function.
Examples:
# Create a Subtitle FX on the currently selected segment.
flame.timeline.current_segment.create_effect("Subtitle")
Command: flame.delete (PySubtitleTrack)
Type: Function
Description: Used to delete a PySubtitleTrack. A <PySubtitleTrack>
object must be passed as the argument to the function.
Examples:
# Delete the first Subtitles track in the current Sequence.
flame.delete(flame.timeline.clip.subtitles[0])
Command: <PySubtitleTrack>. export_as_srt_file()
Type: Function
Description: Used to export a Subtitles Track as a file. The following arguments must be passed:
file_name
(mandatory) The path and name of the file to write. A string must be passed.character_based_attributes
Export the bold, italic, and underline attributes information. True of False must be passed- True (default value): The attributes information is exported.
- False: No attributes information is exported.
export_colours
Export the text colours information. True of False must be passed.- True: The text colours information is exported.
- False (default value): No text colours information is exported.
exclude_colour
Specify a colour to ignore. A CSS colour or value in hex must be passed as a string.use_original_colours
Reuse the hexadecimal or CSS colour names from the imported file. True of False mut be passed.- True: The colours information from the original file are not exported.
- False (default value): The colours information from the original file are not exported.
use_original_alignment
Reuse the alignment tokens from the imported file. True of False must be passed.- True: The alignments information from the original file are not exported.
- False (default value): The alignments information from the original file are not exported.
export_alignments
Export the alignment information. True of False must be passed.- True: The alignment information is exported.
- False (default value): No alignment information is exported.
alignment_type
Set the alignment style tokens.a
oran
must be passed as a string.exclude_alignment
Specify an alignment to ignore. One of the default alignments must be passed as a string.
Examples:
# Export the current Subtitles track from the current sequence
for subtitle_track in flame.timeline.clip.subtitles:
subtitle_track.export_as_srt_file(file_name = "/tmp/<subtitles name>.srt", character_based_attributes = True, export_colours = False)
What's New in 2024.1
Now that you can burn a Metadata Overlay on media exported by a Batch Write File node, you can also enable and disable it using the Python API. For more details on Metadata Overlay in Batch, see the What's New in 2024.1.
Command | Type | Description |
---|---|---|
<PyWriteFileNode>.metadata_overlay |
Attribute | Used to enable or disable the Overlay button of a Write File node. One of the following must be passed as an argument:
Enable the Metadata Overlay for a Write File node:
|
<PyWriteFileNode>.metadata_overlay_context |
Attribute | Used to select the node that provides the information for the Metadata Overlay. One of the following must be passed as an argument:
Enable the Metadata Overlay for a Write File node:
|
What's New in 2024
The Start Frame information is now available in Python Hooks as startFrame.
Command | Type | Description |
---|---|---|
![]() <PyNode>.smart_replace |
Attribute | Used to get or set the status of the Smart Replace setting in the Render and Write File nodes. |
Start Frame Workflow
These new properties and functions allow control over the start frame.
Command | Type | Description |
---|---|---|
<PySegment>.start_frame <PyClip>.start_frame |
Read-Only Property | Used to get the Start Frame information of a PyClip or PySegment. Get the Start Frame information from a Clip
|
<PySegment>.change_start_frame() <PyClip>.change_start_frame() |
Function | Used to set the Start Frame information of a PyClip or PySegment. The following attributes can be passed:
Set the Start Frame information of a clip
|
What's New in 2023.2
Renamed Python Directories
The new directory /opt/Autodesk/<version>/python_utilities
replaces the old /opt/Autodesk/<version>/python_examples
directory. It contains a scripts
directory for useful custom actions, and an examples
directory for examples of python API uses.
Custom Layout in the Context Menu
You now have more control over the placement of custom actions in context menus.
You can now place custom actions at the first level of a context menu or inside a submenu hierarchy.
You can now set the
order
attribute on a submenu or an action set the order in which they are displayed. Custom actions that do not have an order attribute are sorted alphabetically.
Use the
separator
attribute to add a separator between custom actions or submenus. Make sure to set theabove
orbelow
attribute for each separator.
You can find a custom layout example in /opt/Autodesk/<version>/python_utilities/examples
.
minimumVersion
attribute to 2023.2.0.0 on your actions so the new structure only applies to this version and not previous releases.Directory as arg
You can now pass a directory as an argument to flame.import_clips()
.
- If the destination is a Library, the directory structure is imported as-is.
- If the destination is a Reel, every clip found in the hierarchy is loaded at the first level of the Reel.
Changes to flame.batch.create_group()
You no longer have to set the duration argument for the flame.batch.create_group()
function.
- If you set the duration, it is set as the Batch group duration.
- If you do not set the duration, the Batch group has a duration of 100 up until a clip is added to the Schematic: this sets the duration to that of the clip's.
New Attributes and Functions
Command | Type | Description |
---|---|---|
<PyWriteFileNode>.add_to_workspace |
Attribute | Used to enable or disable the new Add to Workspace button available in the Write File node. One of the following must be set as an argument:
Enable the Add to Workspace option in a Write File node
|
![]() <PyRenderNode>.in_mark ![]() <PyRenderNode>.out_mark |
Attribute | Used to set the in_mark and out_mark on a Render node. A frame or timecode information must be passed as an argument. This can be done by passing the information from another node or using a PyTime. Set the Render node In Mark based on a Clip's In Mark Set the Render node Out Mark using a PyTime
|
![]() <PyBatch>.current_iteration_number ![]() <PyBatchIteration>.iteration_number |
Read-Only Property | Used to get only the number part of a Batch Iteration name. Get the current iteration number of the current Batch Group
|
![]() <PyWriteFileNode>.get_resolved_media_path() |
Function | Used to get the media path of a write file node with resolved tokens. Three arguments can be set:
Get the system disk path set in a selected Write File node
|
<PyNode>.set_channel_name() |
Function | Used to set the name of a channel in the Render and Write File nodes. The following must be passed as arguments:
Change the first two channels of a Write File node
Change the first two channels of a Render node
|
<PyNode>.channels |
Read-Only Property | Used to print a tuple of the current channels present in a Render and Write File nodes. Print the name of channels present in a Write File node
|
What's New in 2023.1
You can now use the Python API to display Flame browser for users to select files. The PyBrowser object is used to set a file selection and settings as variables to be used by other functions like flame.import_clips()
. The advantage of using a PyBrowser over a Qt dialog box is user interface consistency and access to features such as bookmarks.
API New Attributes and Functions
Flame Family includes updates to the API in the following components:
- Batch
- MediaHub
- Clips and Segments
- Look node
- Media Panel
- Timeline
- Transitions
General
Command | Type | Description |
---|---|---|
![]() flame.messages.show_in_dialog() |
Function | Used to open a message dialog box and offer options to users. The following arguments can be passed:
Example: Display a Dialog offering default colours for a new Reel.
|
flame.messages.show_in_console() |
Function |
An example of how to use these functions are available in /opt/Autodesk/<version>/python_examples. |
flame.messages.clear_console() |
Function | Used to clear the content of the message console. |
Batch
Command | Type | Description |
---|---|---|
flame.batch.import_clips() |
Function | Allow to import multiple clips at once, as opposed to flame.batch.import_clip() which always imports the frames found in a path as a single clip node. |
File Browser
You can now use the Python API to open a Flame file browser for users to select files. The PyBrowser
object itself is only used to set a file selection and settings as variables that can be used by other functions like flame.import_clips()
. The advantage of using a PyBrowser
over a Qt dialog box is user interface consistency and access to features such as the Flame bookmarks.
Command | Type | Description |
---|---|---|
flame.browser.show() |
Function | Used to open a <PyBrowser> window. The Resolution dropdown is set to Same as Source by default. The Width, Height, and Ratio settings are disabled when the resolution is set to Same as Source. In this scenario None is returned for Width, Height, and Ratio. The following arguments can be passed:
|
flame.browser.selection |
Read-Only Property | Returns a list of the selected files/directories. |
flame.browser.resolution |
Read-Only Property | Returns a resolution preset name. |
flame.browser.width |
Read-Only Property | Returns the width set in the Resolution controls. |
flame.browser.height |
Read-Only Property | Returns the height set in the Resolution controls. |
flame.browser.bit_depth |
Read-Only Property | Returns the bit depth set in the Resolution controls. |
flame.browser.frame_ratio |
Read-Only Property | Returns the frame ratio set in the Resolution controls. |
flame.browser.scan_mode |
Read-Only Property | Returns the scan mode set in the Resolution controls. |
flame.browser.colour_space |
Read-Only Property | Returns the colour space set in the Resolution controls. |
flame.browser.resize_mode |
Read-Only Property | Returns the resizing mode set in the Resolution controls. |
flame.browser.resize_filter |
Read-Only Property | Returns the resizing filter set in the Resolution controls. |
flame.browser.sequence_mode |
Read-Only Property | Returns the state of the Sequences / Frames button in the file browser. |
MediaHub
Command | Type | Description |
---|---|---|
flame.mediahub.files.options.set_tagged_colour_space |
Attribute | Used to set the MediaHub's Colour Space to Tag Only with the defined colour space. |
flame.mediahub.files.options.resize_mode |
Attribute |
Used to get or set the MediaHub's Resizing mode. One of the following value must be passed as an argument when the attribute is set:
|
flame.mediahub.files.options.resize_filter |
Attribute |
Used to get or set the MediaHub's Resizing filter. One of the following value must be passed as an argument when the attribute is set:
|
flame.mediahub.files.options.resolution |
Attribute |
Used to get or set the MediaHub's Resolution. One of the following value must be passed as an argument when the attribute is set:
|
flame.mediahub.files.options.width |
Attribute | Used to get or set the MediaHub's Resolution width. An integer value between 24 and 16384 must be passed when the attribute is set. |
flame.mediahub.files.options.height |
Attribute | Used to get or set the MediaHub's Resolution height. An integer value between 24 and 16384 must be passed when the attribute is set. |
flame.mediahub.files.options.frame_ratio |
Attribute | Used to get or set the MediaHub's frame ratio. A float value between 0.01 and 100.00 must be passed when the attribute is set. |
flame.mediahub.files.options.pixel_ratio |
Attribute | Used to get or set the MediaHub's pixel ratio. This attribute is only used when the Resolution is set to "Same as Source" One of the following value must be passed as an argument when the attribute is set.
|
flame.mediahub.files.options.bit_depth |
Attribute |
Used to get or set the MediaHub's Bit Depth. One of the following value must be passed as an argument when the attribute is set.
|
flame.mediahub.files.options.scan_mode |
Attribute |
Used to get or set the MediaHub's Scan Mode. One of the following value must be passed as an argument when the attribute is set.
|
flame.mediahub.files.options.sequence_mode |
Attribute |
Used to set the MediaHub's sequence mode to File Sequence or Frame. One of the following must be passed as an argument:
|
![]() flame.import_clips() |
Function |
Use one of the following to import a file sequence as a single clip:
|
Clip & Segment
Command | Type | Description |
---|---|---|
<PyClip>.get_colour_space |
Function |
Used to get the colour space of a frame in time. A PyTime can be passed as an argument to get the colour space at a specific time. If no PyTime is specified the positioner is used fo the PyClip and the first frame is used for the PySegment. |
Transitions
Command | Type | Description |
---|---|---|
<PyTransition>.set_dissolve_to_from_colour() |
Function |
Used to transform a dissolve into a To/From Colour transition. RGB values must be passed as an argument. |
<PyTransition>.set_fade_to_from_silence() |
Function | Used to transform an audio fade into a To/From Silence transition. |
Look
Command | Type | Description |
---|---|---|
<PyNode>.slope_red |
Attribute |
Used to get or set the RGB Slope values. A float number must be passed as an argument when the attribute is set. |
<PyNode>.offset_red |
Attribute | Used to get or set the RGB Offset values. A float number must be passed as an argument when the attribute is set. |
<PyNode>.power_red |
Attribute | Used to get or set the RGB Power values. A float number must be passed as an argument when the attribute is set. |
<PyNode>.saturation |
Attribute | Used to get or set the Saturation value. A float number must be passed as an argument when the attribute is set. |
<PyNode>.style |
Attribute | Used to get or set the Style value. One of these must be passed as an argument when the attribute is set:
|
<PyNode>.invert |
Attribute | Used to get or set the Invert value. One of these must be passed as an argument when the attribute is set:
|
Media Panel
Command | Type | Description |
---|---|---|
![]() <PyArchiveEntry>.clear_colour() |
Function | Used to remove the colour coding on every entry of the Media Panel that can be colour coded. |
Timeline
Command | Type | Description |
---|---|---|
<PyClip>.cut() |
Function | Used to create a cut on one or all tracks of a clip. Example: Create a cut on all tracks on the 10th frame
Create a cut on a single track at 10:00:01:00
|
<PySegment>.clear_colour() |
Function | Used to remove the colour coding on a Timeline Segment. |
PyClip.create_container() |
Function |
Used to create a Container. The following methods are used in order:
|
PySegment.container_clip() |
Read-Only Property | Returns the content of a container in the form of a PyClip object so some modifications normally made on a PyClip are accessible. |
PyClip.open_container() |
Function | Used to open a Container tab. |
PyClip.close_container() |
Function | Used to close a Container tab. |
<PySequence>.padding_start |
Attribute | Used to add a gap before or after the first/last Timeline segment of a Sequence. A PyTime defined up to which frame the gap must be extended must be passed as an argument. Example: Add a gap from 09:59:00:00 to 10:00:00:00 for a clip starting at 10:00:00:00
|
<PySegment>.create_unlinked_segment() |
Function |
Used to turn a Gap into an unlinked media segment. The following arguments can be passed:
|
<PySegment>.source_audio_track |
Read-Only Property | Used to get the audio track from the source media. |
Transitions
Command | Type | Description |
---|---|---|
<PyTrack>.insert_transition() |
Function |
Used to create a transition on a <PyTrack>. The following arguments can be passed:
Example: Create a new up to cut transition at frame 24 in a Sequence
|
<PyTransition>.set_transition() |
Function | Used to set attributes on an existing transition. The following arguments can be passed:
Example: Change an existing cut into a dissolve
|
<PyTransition>.slide() |
Function |
Used to slide a transition. The following arguments can be passed:
|
<PyTransition>.name |
Attribute | Used to get or set the transition name. A string must be passed as an argument when the attribute is set. |
<PyTransition>.duration |
Attribute | Used to get or set the transition duration. An integer number must be passed as an argument when the attribute is set. |
<PyTransition>.alignment |
Attribute | Used to get or set the transition alignment. One of the following value must be passed as an argument when the attribute is set.
|
<PyTransition>.selected |
Attribute | Used to get or set the transition selection status. |
<PyTransition>.type |
Attribute | Return the transition type. |
<PyTransition>.record_time |
Read-Only Property | Returns the record time of the cut. |
<PyTransition>.in_offset |
Read-Only Property | Returns the offset between the record_time (cut point) and the start time of the transition. |
<PyTransition>.parent |
Read-Only Property | Return the PyTrack on which the transition is located. |
<PyClip>.selected_transitions |
Read-Only Property | Used to get or set the selected transitions of a clip. |
<PyTimeline>.current_transition |
Read-Only Property | Returns a PyTransition if the current element of the timeline is a transition. |
What's New in 2023
Flame Family now installs and uses Python 3.9.7 instead of version 3.7.9 used in Flame Family 2022.
The app_started
python hook has been removed. Use the Python hook app_initialized
instead.
GMask Tracer & Image
Python hook get_action_custom_ui_actions
, used by the Action family nodes to add custom actions, is now available in Image and GMask Tracer.
API New Attributes and Functions
Flame Family includes updates to the API in the following components:
- MediaHub
- Media Panel
- Sequence
- Timeline
MediaHub
Command | Type | Description |
---|---|---|
![]() flame.mediahub.files.options.multi_channel_mode |
Attribute | Sets the Multi-Channel mode in the MediaHub. The possible modes are:
Example: Set the multi-channel mode
|
flame.mediahub.files.options.cache_mode |
Attribute | Set the Media Cache mode in the MediaHub. The possible modes are:
Example: Set the media caching mode
|
flame.mediahub.files.options.proxies_mode |
Attribute | Set the Media Proxies mode in the MediaHub. The possible modes are:
Example: Set the media proxies mode
|
flame.mediahub.files.options.cache_and_proxies_all_versions |
Attribute | Set the Clip Version mode in the MediaHub. The possible modes are:
Example: Set the clip version mode
|
Media Panel
Command | Type | Description | |
---|---|---|---|
<PyReelGroup>.save() |
Function | Saves a PyReelGroup to the current Destination in the Library. The function was previously available for other PyObjects present in the Desktop but was not for the PyReelGroup. Example: Save a Reel Group to the destination Library
|
|
|
Read-Only Property | Returns True if a Batch Group or Library is opened and False if it's closed. |
Sequence
Command | Type | Description |
---|---|---|
|
Function | Inserts or Overwrites a source clip in a Sequence. The following arguments can be set:
Examples Overwrite the selected clip inside a sequence
Insert an Audio Track inside a sequence
|
|
Function | Copy the selected segments to a destination in the Media Panel. The following arguments can be set:
Example: Copy the selected segment to the Media Panel
|
Timeline
Command | Type | Description | |
---|---|---|---|
flame.delete(<PySegment>) |
Function | Deletes a Timeline segment. This call produces the same result as the Lift shortcut: the segment is deleted and the other segments are not rippled. Example: Delete a segment in the Timeline
|
|
flame.timeline.type |
Attribute | Focuses a Timeline tab in the user interface. The possible arguments are:
Example: Focus the sequence tab in the Timeline
|
|
flame.timeline.clip |
Read-Only Property | Returns the PyClip or PySequence associated to the clip shown in the Timeline. Useful when running scripts in the Python Console. Example: Rename the clip currently shown in the Timeline
|
|
|
Read-Only Property | Returns a PySegment, PyMarker, or a PyTimelineFX depending on what is selected in the current clip. Useful when running scripts in the Python Console. Example: Rename the selected segment in the Timeline
|
|
|
Function | Turns a gap into a colour source segment and modifies the colour of an existing colour source segment. Red, Green, and Blue values arguments must be set. Example: Turn the selected gap to a colour source in the Timeline
|
|
|
Function | Matches a segment from the current sequence to a destination. Contrary to the Match operation performed using the user interface or the keyboard shortcut a new clip is always created. 5 arguments can be set:
Example: Match a Timeline segment to a Reel
|
|
|
Function | Replaces a Timeline segment with a source clip. A PyClip must be specified.
Example: Replace the media of a Timeline segment
|
|
|
Function | Applies Trim, Slip, and Slide editorial operations. The following arguments can be set:
Example: Trim the head of a Timeline segment
|
|
|
Function | Applies the Slide Keyframe editorial operation. The following arguments can be set:
Example: Slide keyframes of a Timeline segment
|
|
<PyVersion>.copy_to_media_panel()
<PyAudioTrack>.copy_to_media_panel()
|
Function | Creates a new clip into the specified destination in the Media Panel. The following arguments can be set:
Example: Copy a segment to a Reel
|
|
|
Read-Only Property | The following PyClip/PySequence information can be obtained through the PySegment properties. PySegment (source, gap, bfx):
PySegment with source media:
PySegment on an audio track:
Example: Get the Width and Height of the current segment
|
|
|
Read-Only Property | Return the lists of RGB and Matte channels. |
|
|
Read-Only Property | Return the current RGB and Matte channels. |
|
|
Read-Only Property | Return the Matte mode. The possible values are:
|
|
|
Function | Set the RGB and Matte channels using the channel names or indexes. The following arguments can be set for the RGB and Matte channels:
Also the matte_mode can be set for the Matte channel. The modes are:
|
|
|
Attribute | The tokenized attributes can be used to set the name and comment of a PySegment or PyMarker using tokens. A string must be passed as an argument. The dynamic attributes can be used to enabled or disable the Dynamic button in the Rename and Comment dialog boxes. True or False must be passed as an argument. Example: Set the name of a timeline segment using tokens
Enable the Dynamic setting in the Marker's comment field
|
What's New in 2022
Moving to Python 3.7
Flame, Flare and Flame Assist now use Python 3.7. This means that you need to convert your Python 2 scripts to Python 3.
The process for converting your scripts from Python 2 to Python 3 is outside the scope of this documentation. But here a few pointers for doing just that.
- Read the Python Software Foundation Porting Python 2 Code to Python 3 documentation. Get familiar with the process of porting your scripts to Python 3, and with Python 3 differences from Python 2.
- Update your scripts to Python 3 using Futurize or Modernize.
Futurize and Modernize cannot fix everything automatically: you still need to verify your script compiles correctly.
To test to see if your script compiles and will run in Python 3:
From the command line, run:
python3 -m compileall <your_script>
In the shell, look at the compilation feedback:
- If there are no compilation errors, chances are your script is fine. Try running it in Flame.
- If the compiler complains, you'll need to go in and fix your script.
Python Console Update
The Python console, Flame menu > Python > Python Console, now benefits from the following improvements:
- Modify the indentation of multiple lines: select the lines and then press Tab (increase indent) or Shift-Tab (decrease indent).
- Comment and uncomment multiple lines with Control + / (Linux) or Command + / on (macOS).
- New lines start at the same indentation level as the previous one.
- New lines after a : character start with a 4-space indentation.
- Indentation made with Tab are converted to spaces.
- Saved scripts now default to the
.py
extension. - The new colour scheme improves legibility.
Python API Updates
Expanded PyActionNode
Reach
Every functions, attributes, and properties available in the PyActionNode
object are now available in GMask Tracer and Image.
New Sample Script
The script path_of_selected_clips.py
shows how to get the path and file name of a media file in MediaHub.
Support for //
The //
operator is now supported in the Python API. Python 3 differentiates between /
(float division) and //
(integer division).
New in Action
Command | Type | Description | Example |
---|---|---|---|
<PyActionNode>.object_dual_mode
|
Attribute |
Set the Object menu display mode to Single or Dual. One of the following must be passed as an argument:
|
Set the Object menu to Dual display mode.
|
|
Read-only property |
Get a list of tabs currently displayed in the Object menu.
|
Get the list of tabs currently displayed in the Left panel of the Object menu set in Dual mode.
|
|
Attribute |
Set a tab as current in the Object menu.
The name of a tab must be passed as an argument. |
Select the Default Camera tab in the Object menu's single panel mode.
|
New in Action/Image/Gmask Tracer
Command | Type | Description |
---|---|---|
flame.duplicate(<PyObject>)
|
Function |
The standard |
New in Media Panel
Command | Type | Description | Example |
---|---|---|---|
|
Read-only property |
Get a list of children <PyObjects> located under the specified <PyObject> in the Media Panel Hierarchy. |
Get a list of children located under the Desktop.
|
|
Function |
The Duplicate Name Check dialog is now bypassed when the copy and move functions are used. The `duplicate_action` argument can be set to either add or replace. The Add option will be executed if the argument is not set. |
Replace a clip while moving another clip with the same name to that Reel.
|
|
Read-only property |
Used to get a Reel's type. The possible type are:
|
Print a Reel's type.
|
New in Timeline
Command | Type | Description |
---|---|---|
<PySegment>.create_connection()
|
Function |
Used to create a connected segment connection on a segment. Only works for segments inside a Reel Group. |
<PySegment>.remove_connection()
|
Function |
Used to remove a connected segment connection on a segment. Only works for segments inside a Reel Group. |
<PySegment>.sync_connected_segments()
|
Function |
Used to sync the connected segments. Only works for segments inside the same Reel Group. |
<PySegment>.connected_segments()
|
Function |
Returns a list of connected segments. Only works for segments inside the same Reel Group. |
<PySegment>.duplicate_source()
|
Function |
Used to duplicate the source media of a segment. |
<PySegment>.shared_source_segments()
|
Function |
Returns a list of segments sharing the same source media. |
New TimelineFX
Command | Type | Description |
---|---|---|
<PyTimelineFx>.sync_connected_segments()
|
Function |
Used to sync a specific Timeline FX on connected segments inside the same Reel Group. This cannot be called on a Timewarp. |
What's New in 2021.2
New in the Python API for Flame Family 2021.2 Update:
New functions for MediaHub: set or get MediaHub file or archive paths.
New attributes for the following Batch nodes:
- Deinterlace
- Difference Matte
- Exposure
- Monochrome
- Write File
MediaHub
Command | Type | Description |
---|---|---|
flame.mediahub.files.get_path() flame.mediahub.files.set_path() flame.mediahub.archives.get_path() flame.mediahub.archives.set_path() |
Function | Used to get or set the path of the MediaHub in the Files and Archives tabs. A path must be passed as an argument when the path is set. |
Batch - Deinterlace
Command | Type | Description |
---|---|---|
<PyNode>.dominance | Attribute | Used to get or set the dominance. One of the following must be passed as an argument to set the attribute:
|
<PyNode>.interpolation | Attribute | Used to get or set the interpolation. One of the following must be passed as an argument to set the attribute:
|
Batch - Difference Matte
Command | Type | Description |
---|---|---|
<PyNode>.tolerance_red <PyNode>.tolerance_green <PyNode>.tolerance_blue <PyNode>.tolerance_y <PyNode>.tolerance_u <PyNode>.tolerance_v |
Attribute | Used to get or set the Tolerance values. A number must be passed as an argument when the attribute is set. |
<PyNode>.softness_red <PyNode>.softness_green <PyNode>.softness_blue <PyNode>.softness_y <PyNode>.softness_u <PyNode>.softness_v |
Attribute | Used to get or set the Softness values. A number must be passed as an argument when the attribute is set. |
<PyNode>.gain_rgb |
Attribute | Used to get or set the Gain value. A number must be passed as an argument when the attribute is set. |
<PyNode>.lift_rgb <PyNode>.lift_yuv |
Attribute | Used to get or set the Lift value. A number must be passed as an argument when the attribute is set. |
<PyNode>.channel_red |
Attribute | Used to get or set the status of a channel. One of the following must be passed as an argument to set the attribute:
|
<PyNode>.space_rgb | Attribute | Used to select the colour space. One of the following must be passed as an argument to set the attribute:
|
Batch - Exposure
Command | Type | Description |
---|---|---|
<PyNode>.input_data_type |
Attribute | Used to get or set the input data type. One of the following must be passed as an argument to set the attribute:
|
<PyNode>.exposure_red <PyNode>.exposure_green <PyNode>.exposure_blue |
Attribute | Used to get or set the red, green and blue exposure values. A number between -10 000 and 10 000 must be passed as an argument when the attribute is set. |
<PyNode>.contrast_red <PyNode>.contrast_green <PyNode>.contrast_blue |
Attribute | Used to get or set the red, green and blue contrast values. A number between -10 000 and 10 000 must be passed as an argument when the attribute is set. |
<PyNode>.pivot_red <PyNode>.pivot_green <PyNode>.pivot_blue |
Attribute | Used to get or set the red, green and blue pivot values. A number between 0.0 and 1.0 must be passed as an argument when the attribute is set. |
Batch - Monochrome
Command | Type | Description |
---|---|---|
<PyNode>.channel |
Attribute | Used to get or set the channel. One of the following must be passed as an argument to set the attribute:
|
Batch - Write File
Command | Type | Description |
---|---|---|
<PyNode>.level |
Attribute | Used to get or set the Png compression level of the Write File node. A number between 0 and 9 must be passed as an argument when the attribute is set. |
What's New in 2021.1
The Python API is augmented with additional methods and properties in the Flame module, Action, Batch, and Timeline groups and segments.
Flame
Command | Type | Description | Example |
---|---|---|---|
| Function | Get the currently selected tab. | Print which tab is currently selected in the software:
|
| Function | Open the tab. One of the following can be passed as an argument:
| Go to the Timeline Tab:
|
Action
Command |
Type |
Description |
Example |
---|---|---|---|
|
Read-only Property |
Get the list of parent nodes for a node. One of the following must be passed as the link type:
Returns an empty list if there is no parent for the given link. |
Print the name of the parent nodes:
|
|
Read-only Property |
Get the list of children for a node. One of the following must be passed as the link type:
Returns an empty list if there are no children for the given link. |
Print the name of the children nodes:
|
|
Function |
Break a link between two Action nodes. Three arguments must be passed:
One of the following must be passed as the link type:
|
Disconnect a link between two nodes in Action:
|
Batch
Command |
Type |
Description |
Example |
---|---|---|---|
|
Function |
Disconnect the links from a node's input sockets. |
Disconnect a single input link from a node:
Disconnect all input links from a node:
|
Timeline Groups
Command |
Type |
Description |
Example |
---|---|---|---|
|
Function |
Create a group in a clip or sequence. A string must be passed as an argument to define the name of the group. |
Create a group in a clip:
|
|
Read-only Property |
Get the list of groups available in a clip or sequence. |
Print the list of groups of a Clip:
|
|
Read-only Property |
Get the list of timeline segments that are part of a group. |
Print all the segments included in a group:
|
|
Read-only Property |
Get the parent clip or sequence object of a group. |
Print the name of a group's parent clip:
|
|
Attribute |
Get or set the same of a group. A sting must be passed as an argument when the name is set. |
Rename a Group:
|
|
Function |
Add a segment to a group. One of the following can be passed as an argument:
|
Add a Timeline segment to a group:
|
|
Function |
Remove a segment from a group. One of the following can be passed as an argument:
|
Remove a Timeline segment from a group:
|
|
Read-only Property |
Get a list of groups a timeline segment is part of. |
Print the name of all the groups a segment is part of:
|
Timeline Segments
Command |
Type |
Description |
Example |
---|---|---|---|
|
Read-only Property |
Get the type of a PySegment object. One of the following is returned:
|
Print the type of a Timeline segment:
|
|
Read-only Property |
Get the number of head of tail frames of a PySegment object. |
Print the head and tail information of all segments on a track:
|
What's New in 2021
The Python API is augmented with additional methods in Action, Batch, and Project management.
Action
<PyActionNode>.selected_nodes
can now be used to deselect all nodes in Action by passing an empty list as argument.
Command | Type | Description | Example |
---|---|---|---|
<PyCoNode>.pos_x <PyCoNode>.pos_y |
Attribute | Used to set or get the position of a node in the Action schematic. Requires an integer. | Set the position of a node in the Action Schematic:axis = <PyActionNode>.create_node("Axis") axis.pos_x = 100 axis.pos_y = 50 |
<PyActionNode>.cursor_position |
Read-Only Property | Return a list that provides the cursor position in the Action Schematic. The first value is the x position. The second value is the y position. This is useful in the context of the custom actions as it is now possible to add nodes in the desired location. | Add a node under cursorcursor = <PyActionNode>.cursor_position axis = <PyActionNode>.create_node("Axis") axis.pos_x = cursor[0] axis.pos_y = cursor[1] |
Batch - Clip
Command | Type | Description | Example |
---|---|---|---|
<PyClipNode> |
Read-Only Property | <PyClip> properties accessible from the Media Panel are now accessible from its corresponding <PyClipNode> object in the Batch Schematic. |
Get the bit depth information from a Clip nodeclip = flame.batch.get_node("clip99").clip print(clip.bit_depth) |
Batch - General
Command | Type | Description | Example |
---|---|---|---|
flame.batch.cursor_position |
Read-Only Property | Returns a list that provides the cursor position in the Batch Schematic. The first value is the x position. The second value is the y position. This is useful in the context of the custom actions as it is now possible to add nodes in the desired location. | Add a node under cursorcursor = flame.batch.cursor_position mux = flame.batch.create_node("Mux") mux.pos_x = cursor[0] mux.pos_y = cursor[1] |
Batch - Write File
Command | Type | Description | Example |
---|---|---|---|
<PyNode>.compress_mode |
Attribute | Used to set or get the Compress mode of a Write File node. One of the following options must be passed as an argument: Uncompressed, RLE, LZW, Scanline, Multi_Scanline, PIZ, PXR24, B44, B44A, DWAA, DWAB, PIXSPAN, Packed. | Set a Write Node's Compress modewf = flame.batch.create_node("Write File") wf.compress_setting = "PIZ" |
<PyNode>. colour_type |
Attribute | Used to set or get the DPX Colour Type of a Write File node. One of the following options must be passed as an argument: Printing Density, Unspecified, SMPTE 274M, CCIR 709-4, CCIR 601 (625), CCIR 601 (525), NTSC, PAL | Set a Write Node's DPX Colour Type wf = flame.batch.create_node("Write File") wf.colour_space = "CCIR 601 (625)" |
Project
Command | Type | Description | Example |
---|---|---|---|
flame.project.current_project.nickname |
Read-Only Property | Returns the Project's Nickname. | Print the Project's Nicknameprint(flame.project.current_project.nickname) |
What's New in 2020.2
Here are the updates to the Python API for this 2020.2 Update release.
Attributes for the Comp and Burn-In Letterbox Timeline FX can now be modified on a timeline segment.
Python functions can be executed asynchronously at an undetermined time in Flame's idle loop using the
flame.schedule_idle_event()
.- The software automatically triggers the Flame idle loop when it doesn't register any activity (pointer movement, playback, rendering, etc.) for a given period of time. Everything waiting for the software to be in idle mode will be executed the moment the next idle loop starts.
- You cannot interact with the software until the script finishes its execution. You'll have to wait if the script takes a long time to run.
- A script named
watch_folder.py
shows how to use this function. You can find it in the python examples directory,/opt/Autodesk/flame_2020.2/python_examples
.
<PyTimelineFx>.save_setup()
: Save a Timeline FX setup.<PyTimelineFx>.load_setup()
: Load a Timeline FX setup.
What's New in 2020.1
Here are the updates to the Python API for this 2020.1 Update release.
flame.execute_shortcut()
: Execute the specified keyboard shortcut.
Updates to Action:
<PyNodeObject>.cache_range()
: You can now cache range on Z-Depth and Normals map, in addition to the previously accessible Motion Vectors map.- Compass Node: Use a Compass node in Action. Create it with
<PyCoNode>.encompass_nodes
.
Updates to Batch:
flame.batch.create_node()
: Create Matchbox, Pybox, or Sparks nodes, specifying the shader, handler, or Spark as required.<PyNode>.shader_name
: Get the name of the shader loaded in a Matchbox node.<PyNode>.handler_name
: Get the name of the handler loaded in a Pybox node.<PyNode>.sparks_name
: Get the name of the Spark loaded in a Sparks node.<PyOpenFX
: Create an OpenFX node and then load an Open FX plug-in.<PyNode>.bypass
: Bypass nodes in the Batch schematic.MUX improvements:
- MUX.before_range: Set the Before setting of the MUX's FX Range.
- MUX.after_range: Set the After setting of the MUX's FX Range.
More control over the Media Panel:
<PyObject>.selected
: Objects derived from PyArchiveEntry now have theselected
property used to select the object.PyMediaPanel
controls the state and contents of the Media Panel.<PyMediaPanel>.move()
: Move a media panel entry to a different location.<PyMediaPanel>.copy()
: Copy a media panel entry to a different location.<PyMediaPanel>.selected_entries
: Set or get the list of selected entries in the Media Panel.- Additional attributes allow you to set the layout of the Media Panel.
Changes to the PyProject object:
flame.projects
is now equivalent toflame.project
.
Now with User (Profile) management:
Deprecated Entities
The property <PyProject>.current_name
is now deprecated and replaced with <PyProject>.name
.
What's New in 2020
We've augmented the Python API with the following:
<PyObject>.parent
: Get the parent of the object.- flame.import_clips(): Import a clip to a specified PyReel, PyLibrary, PyFolder or PySharedLibrary.
New Batch Nodes are now available with the Python API:
To support the import of UDIM textures, some <PyActionNode>
functions are augmented:
<PyActionNode>.import_fbx
: Newis_udim
parameter.<PyActionNode>.create_node
: Newis_udim
andtile_resolution
parameters.<PyActionNode>.export_fbx
: New function to export an action scene to FBX.
To help you implement these new features, the following examples have been added to the /opt/Autodesk/<application_version>/python_examples
folder:
- clean_batch_iteration.py
- cache_motion_vectors.py
- import_using_qt_file_dialog.py
What's New in 2019.2
New Classes:
- PyMarker: Get and set information on Markers and Segment Markers.
- PySegment: Access a sequence's segment, adding Timeline FX or read its source path.
- PyTime: Define a time in frame or timecode that can then be used in a variety of attributes and functions.
- PyTimelineFX: Get a Timeline FX, or bypass it.
Notable updates to classes:
- PyBatch : The Render Node supports for bit depth and render destination.
- PyClip now has the same properties and attributes as the PySequence class, and you can reformat or render it.
- PyCoNode now gives you access to the 3D camera.
- PySequence can now manage tracks.
Also, a new look for the Flame module documentation, as well as some Flame API Code Samples.
What's New in 2019.1
General Improvements
Arguments passed for an attribute or a function are no longer case sensitive if they reference an option in the Flame user interface.
You can now pass float values (between 0.0 and 1.0) to attributes that require R, G and B arguments. Setting R, G, and B arguments can still be done with integer values, but getting the colour values always returns floating point values.
Action Scriptability
With the Python API, you create scripts to:
- Create nodes
- Manage the Action schematic
- Assign media
- Manage render passes
- Manage PBR parameters of shaders nodes
- Manage Transform parameters of an axis node
- Manage Light, Projector, and Camera
- Trigger motion vectors caching
Media Management
You can now create a sequence with PyReel.create_sequence()
,PyLibrary.create_sequence()
, and PyFolder.create_sequence()
.
You can now find clip by name, UID, or wiretap node ID.
Import & Export
You can now import (flame.import_clips()
) or export clips (using the new PyExporter
class).
What's New in 2019
Media Panel Scriptability
You can now script the Media Panel.
Scriptable Media Panel components:
- Workspace
- Desktop
- Reel Groups and Reels
- Batch Groups and Iterations
- Libraries and Folders
The API has also been augmented with additional Batch commands.
Catching Exception
Exceptions can now be caught in a Python script. For example, the following will now work:
from flame import batch
try:
batch.import_clip("bad_path", "bad_reel_name")
except Exception as e:
print(str(e))
Additional Python API Improvements
- The address of a python object is now preserved, allowing for two variables to share a single address pointing to the same python object.
- The default names defined for the Render and Write File nodes set using the Preferences or Python Hooks are now respected when one of these nodes is created using <PyBatch>.create_node.
- flame.project is now available, but no Flame project attributes can be modified using the Python API. It is only used to store the current Project and Workspace in variables.