Share
 
 

Python API (What's New in 2024.2)

The Python API supports Subtitles, resolution lists, and more.

Indicates a feature suggested and voted up by users on the Flame Feedback portal.

Subtitles

A PySubtitleTrack object has been added, allowing subtitles to be imported or exported and the Timeline FX to be created. Some of the following functions were already available, but updated for PySubtitleTrack.

  • <PySequence>.import_subtitles_file()
  • <PySequence>.subtitles
  • <PySequence>.subtitles_track
  • <PySubtitleTrack>.parent
  • <PySequence>.create_subtitle()
  • <PySubtitle>.name
  • <PySubtitleTrack>.segments
  • <PySegment>.create_effect("Subtitle")
  • flame.delete(PySubtitleTrack)
  • <PySubtitleTrack>.export_as_srt_file()

The <subtitles name> token can be used in the file_name argument of the export_as_srt_file() function.

More Improvements

The maximum number of export presets that users can define in the export_hook.py is now 10 (up from 5 in previous releases).

A new PyObject named PyResolution can be used to get and set the resolution of a node.

Most settings in the Colour Source nodes are available as attributes in the Python API.

The Resolution List, Adaptive, and Scaling Presets resizing modes can now be set on the following nodes:

  • Action
  • Colour Source
  • Clip
  • Gradient
  • Matchbox
  • Pybox
  • Render
  • Resize
  • Text
  • Write File

The Adaptive and Scaling Presets resolution modes are available in the PyBrowser when its include_resolution attribute is set to Full. Only the legacy resolution modes are displayed when include_resolution is set to True.

For more information, see Flame Family Python API.

Was this information helpful?