FilmLight Python API

FilmLight Python API

This document details the Python API for the FilmLight API server.

The FilmLight Python API connects to an API server running on a local or remote machine, and provides a set of functions and classes which can be used to manipulate the native Baselight and Daylight databases and services.

Supports:

  • Python 2.7+
  • Python 3.4+

Dependencies:

  • websocket-client >= 0.48

Module

Installation on Linux

The flapi python module can be found at the following locations:

On Linux:

/usr/fl/baselight-<version>/share/flapi/python
/usr/fl/daylight-<version>/share/flapi/python

To install the flapi python module you can use the pip packagement management utility.

To install flapi for all users on your machine:

sudo pip install /usr/fl/baselight/share/flapi/python

To install flapi for only the current user:

pip install --user /usr/fl/baselight/share/flapi/python

Alternatively, add the flapi python directory to your PYTHONPATH environment variable:

PYTHONPATH=/path/to/share/flapi/python python myscript.py

flapi requires the websocket-client library. If you do not use the above pip command to install flapi, you will need to install websocket-client manually. It is available via pip.

sudo pip install websocket-client

Installation on macOS

The flapi python module can be found at the following locations:

/Applications/Baselight/<version>/Utilities/Resources/share/flapi/python
/Applications/Daylight/<version>/Utilities/Resources/share/flapi/python

To install the flapi python module you can use the pip packagement management utility.

On macOS, pip is not installed by default, but can be installed via the Python easy_install tool:

sudo easy_install pip
sudo pip install --upgrade pip

To install flapi with pip on macOS for all users on your machine:

sudo pip install /Applications/Baselight/Current/Utilities/Resources/share/flapi/python

To install flapi with pip on macOS for the current user:

pip install --user /Applications/Baselight/Current/Utilities/Resources/share/flapi/python

Alternatively, add the flapi python directory to your PYTHONPATH environment variable:

PYTHONPATH=/path/to/share/flapi/python python myscript.py

flapi requires the websocket-client library. If you do not use pip commto install flapi, you will need to install websocket-client manually. It is available via pip:

sudo pip install websocket-client

Protocol

For details of the underlying protocol, see the FilmLight JSON API specification.

Connection

In order to perform actions through the FilmLight Python API, you must first open a connection to the FilmLight API server.

This is implemented via the flapi.Connection class.

The Python API allows connecting to a local or remote FilmLight API server.

Python scripts can also be launched from within a FilmLight application, and the FilmLight Python API can be used to connect back to the parent FilmLight process.

Authentication

This release of FLAPI for Baselight and Daylight 5.3 and later has introduced authentication for Connections.

You must provide a username and token to connect to a FLAPI daemon.

For FLAPI connections to the local machine, the token can be determined automatically for the current user.

For FLAPI connections to remote hosts, a username and token must be supplied when creating the connection to FLAPI. If a token does not exist for a given user on the FLAPI server, it can be created by running /usr/fl/baselight/bin/fl-setup-flapi-token for that user on the remote server.

On the FLAPI server, the token for a given user is stored in the following location:

On Linux:

$HOME/.filmlight/flapi-token

On macOS:

/Users/<username>/Library/Preferences/FilmLight/flapi-token

Connect to FLAPI server on localhost

import flapi

# Create local FLAPI connection
conn = flapi.Connection()
conn.connect()

# Call methods...

# Close connection
conn.close()

Connect to FLAPI server on remote host

import flapi

# Create remote FLAPI connection
hostname = "remotehost"
username = "myusername"
token = "...token..."
conn = flapi.Connection( hostname, username=username, token=token )
conn.connect()

# Call methods...

# Close connection
conn.close()

Calling methods

Each class exposed via the FilmLight API is accessed via the Connection object.

Calling Static Methods

You can call static methods on those classes via the class members provided by the Connection object.

import flapi

# Create local connection
conn = flapi.Connection()

# Open connection
conn.connect()

# Access static get_jobs methods on the class JobManager class
jobs = conn.JobManager.get_jobs("localhost")

# Close connection
conn.close()

Calling Instance Methods

Instances of each class are then created by the static class functions.

import flapi

# Create local connection
conn = flapi.Connection()

# Open connection
conn.connect()

# Create a scene in the database using the static 'new_scene' method
scenePath = conn.Scene.parse_path( "localhost:myjob:newscene" )
options = {
    "format": "HD 1920x1080",
    "colourspace": "FilmLight_TLog_EGamut",
    "field_order": flapi.FIELDORDER_PROGRESSIVE,
    "frame_rate": 24.0
}
scene = conn.Scene.new_scene( scenePath, options )

# Save the scene using the 'save_scene' instance method
scene.save_scene()

# Close the scene
scene.close_scene()
scene.release()

# Close the connection
conn.close()

Object lifecycles

Whenever you call a function on an FLAPI connection that creates a new object, an object will be created on the server and you must release that object when you finished with it.

Every instance of a class in FLAPI inherits from the flapi.Interface class, which implements the release() method.

# Create Scene object via new_scene()
scene = conn.Scene.new_scene( ... )

# Do stuff with Scene object

scene.close_scene()

# Release Scene object, informing the server you are finished with it
scene.release()

If you do not call release() you will leak objects on the server until your connection closes, at which point those objects will be destroyed.

Signals

Some classes like Scene and QueueManager can emit signals from the server to notify your application when actions occur.

You can connect these signals to methods in your Python script which will be executed when the signal is received from the server.

An example of listening to a signal from the server:

::: python
import flapi, sys
stop = False

def handle_queue_ops_changed(sender, signal, args):
    print( "List of operations changed" )
    stop = True

conn = flapi.Connection()
conn.connect()
qm = conn.QueueManager.create_local()

# Connect a function to be called when this signal is received
qm.connect( "QueueOpsChanged", handle_queue_ops_changed )

# Subscribe to update signals from QueueManager
qm.enable_updates()

while not stop:
    conn.wait()

# Close up objects on first signal received -- this was just a test
# Disable updates from server
qm.disable_updates()

# Disconnect our signal handler
qm.disconnect( "QueueOpsChanged", handle_queue_ops_changed )

# Release our QueueManager instance
qm.release()

conn.close()

Error Handling

FLAPIException

If an error occurs as part of the function call via FLAPI, it will be returned via an FLAPIException raised from the method you are calling.

Server Logs

If the FilmLight API method calls are malfunctioning, extra information can be retrieved via the flapid server log files.

The log files can be found at the following locations:

On Linux:

/usr/fl/log/<hostname>-flapid/console.txt

On macOS:

/Library/Application Support/FilmLight/log/<hostname>-flapid/console.txt

Release Notes

Baselight 6.0:

  • Fixed crash when calling shot.insert_blg_stack. bug 67383

Baselight 5.3:

  • Added authentication for FLAPI Connections. See Authentication section. bug 56251

  • Added Export interface for exporting BLGs, CDLs, Cubes and Stills. bug 55413 Interface has a create() method for creating an exporter, select_all(), clear_selection(), select_shot() and select_shots() methods for choosing what to export, do_export_BLG, do_export_CDL, do_export_cube and do_export_still methods that submit exports to the render queue, and a get_log() function for monitoring the progress of the render queue

  • FormatSet: Added Type element to ColourSpaceInfo to distinguish betwen scene and display referred colour spaces. bug 55845

  • 'FormatMapping': Fix incorrect dictionary keys that prevented the mapping data from being correctly returned. bug 58561

  • SceneSettings: Added validation to arguments passed to set() method. Note that GMFO_PROGRESSIVE is no longer a valid argument to pass for the field order, and instead the FLAPI constants FIELDORDER_PROGRESSIVE etc. should be used bug 56230

  • SceneSettings: Added methods get_single() and set_single() bug 56245

  • SceneSettings: Passing an invalid key into set or set_single now correctly reports an error. bug 56927

  • 'SceneSettings': It is now possible to pass in NULL as the value in set_single bug 59568

  • Scene: Added methods insert_bars for inserting a Bars strip into a scene. bug 55979

  • Scene: Added methods insert_blank for inserting a Blank strip into a scene. bug 55977

  • Scene: Added methods insert_text for inserting a Text strip into a scene. bug 55980

  • Added functions get_blg_payload() and get_blg_resources() to allow the extraction of a BLG payload and associated resources (which a FLAPI app could then, for example, store for later use), and a corresponding function apply_blg_payload() which takes both payload and resource data as arguments and applies the previously stored BLG bug 55900

  • Scene: Added methods get_look_names() to return a list of the names of available looks and get_look_infos() to return a list of LookInfo objects containing both names and look groups. bug 55948

  • SequenceDescriptor: Added new method is_blg(); note that there are now methods has_blg() and is_blg(). bug 56289

  • Shot: Added new method insert_basegrade_layer() to allow the insertion of a BaseGrade under shots in a timeline bug 56399

  • Shot: Added method insert_blg_stack() to allow the insertion of a BLG under shots in a timeline. bug 55849

  • Shot: Added method insert_look_layer() to allow the insertion of a Look under shots in a timeline. bug 55848

  • Shot: Added method delete_all_layers() to remove all but the top layer from a shot. bug 56393

  • Shot: Added method insert_insert_cdl_layer_above to insert a CDL at the top of a shot rather than at the bottom. bug 57030

  • Shot: Fix issue where using set_metadata to set data of type Timecode would not actually change anything. bug 57643

  • ThumbnailManager: Fix resource leak that could cause issues when extracting hundreds of thumbnails. bug 57593

  • Utilities: Added method get_allowed_enum_values() bug 56301

  • SequenceDescriptor: Fix issue with inserting EXR files containing Timecode 2 into a scene using Timecode 2 instead of Timecode 1 for the Source Timecode bug 57731

  • Python: Changed documentation so that function arguments that can have a value of None are listed in the documentation as "Can be None", rather than "Optional" bug 58045

  • Python: Changed FLAPI module so that function arguments which can be None are not also given a default value of None. bug 58046

  • Scene: Fixed an issue with checking the values of NewSceneOptions when calling Scene.new_scene(). bug 58047

  • Scene: Added functions get_scene_container() and set_scene_container() and removed the Container/ContainerMedium/ContainerLow properties from SceneSettings bug 57889

  • Shot: Added insert_lut_layer() method to allow inserting LUT operator. bug 58036

  • Shot: Added insert_colour_space_layer() method to allow inserting Colour Space operator. bug 58037

  • Python: Added Connection.launch() method, which can be used to launch a specific version of the flapid daemon process, rather than connecting to an existing daemon locally or remotely. This allows you to run a FLAPI script against a specific version of Baselight or Daylight, rather than the version that is currently active on a given machine. bug 57592

  • Shot: Added get_audio_settings() and set_audio_settings() to get/set audio file and offset for a shot. bug 58600

  • Scene: Fixed issue with insert_sequence() not adding the required operators for RAW decode parameters. bug 58795

  • Scene: Added functions get_scene_container() and set_scene_container() and removed the Container/ContainerMedium/ContainerLow properties from SceneSettings bug 57889

  • Fixed bug in LUT export which could exports done from FLAPI to sometimes have different results to the exports done from the Baselight/Daylight UI bug 58774

  • QueueManager: Added a new create_no_database method to create a QueueManager which doesn't use a standard Baselight/Daylight PostgreSQL-based render queue, instead storing the queue in-memory entirely local to the FLAPI daemon. When a queue is created in this way, it also means that all rendering for that queue will also be done within the FLAPI daemon, rather than by a separate Baselight/Daylight/bl-render process. For this reason, this method can only be used within slave FLAPI daemons, i.e. within FLAPI daemons created using Connection.launch(). bug 58304

  • Scene: Fixed bug in insert_sequence where sequence operators were not being wrapped in an layer when inserted into the timeline bug 58795

  • Added new "blg_template" option to the NewSceneOptions value type. When specified (and the "template" option isn't present), the BLG file referenced by the setting will be loaded, its settings extracted and used to initialise the settings of the new scene bug 58976

  • Changed the GradeResultColourSpace scene setting to accept/return NULL/None to represent no grade result colour space. This was done to make it more consistent with other settings like DisplayRenderingTransform. The string "None" is still accepted, but its use is deprecated bug 59587

  • Application Menu Items created by FLAPI are now marked by a user icon and have a tooltip showing the name of the script that created them bug 59808

  • Application: The set_timer_callback function now takes an optional parameter to make it automatically repeat. The default behavior is now to repeat bug 59914

  • Application: If you return a change of settings in response to a TimerCallback signal, your script now receives a subsequent SettingsChanged signal bug 59915

  • Application: The Scripts View window now correctly refreshes when you press the "Reload Scripts" button bug 59929

  • Fixed Scene.set_category host application update bug when connecting to Baselight FLAPI server bug 59963

  • Shot: Fix issue with missing audio metadata when audio is assigned to a shot using set_audio_settings() bug 59766

  • Fixed slow startup of the FLAPI daemon for restarts after the initial restart after a build is installed bug 60460

  • Fixed scene.add_mark to update any existing timeline mark at the supplied frame bug 61100

  • Added support for 'red' value for Style field in DialogItem bug 60954

  • Application: Added get_sdk_versions() method which can be used to query the list of third-party SDKs used in the current release of the software bug 61293

  • RenderDeliverable: The RenderLayer field has been changed to be an Integer, rather than an RENDER_LAYER enumeration, so that arbitrary render layer numbers can be used. Bug 63737

  • Shot: Validate colour space names in insert_lut_layer() method. Fixed crash on loading scenes with invalid colour space names in LUT operators. bug 66680

  • Format: Added methods to add and remove mappings between Formats. bug 59983

  • Format: Added methods to add and remove masks. bug 59983

  • FormatSet: Added has_format() method to check whether a format with the given name exists in a FormatSet. bug 59983

  • FormatSet: Added reload() method to refresh a FormatSet contents from the database. bug 59983

  • Scene: Added frameRate parameter to insert_sequence() method to allow over-riding the source frame rate (which will by default be the Scene's working frame rate.) bug 66508

  • Shot: Added get_frame_rate() method. bug 66508

  • SequenceDescriptor: Added get_movie_fps() method. This will return 0.0 if the sequence it not a movie. bug 66508

  • FormatBurnin: Fixed crash when calling set_opacity() method. bug 67099

Baselight 5.2:

  • Scene: Changed new_scene(), open_scene() and temporary_scene() methods, and their non-blocking counterparts, to take a NewSceneOptions structure instead of a generic dictionary/hash-table, to improve interface for Java. bug 53674

  • Java: Added missing release() method to "uk.ltd.filmlight.flapi.Interface" to allow Java client code to release server-side objects. bug 53679

  • Java: Added default constructor for Value Type objects in Java bindings to allow them to be used correctly from Java. bug 53679

  • FormatSet: Added new_format() and delete_format() methods. bug 53682

  • Python: Made flapi module thrown an exception if you call a Static method on an instance of a class. bug 53744

  • Fixed crash when calling get_type on a Mark object for mark types other than "Timeline". bug 55908

  • Fixed issue with multipaste ignoring destination shots. bug 57456

Beta Classes and Methods

Some classes and methods are marked BETA.

This means that the API is currently in flux and subject to change in subsequent releases.


Changes to API since last release


Classes

Key: Static MethodInstance MethodBeta


Application

The Application class provides information about the host application and access to its global state.

Signals

  • SceneOpened

    This signal is emitted when a scene is opened

    Signal payload:
    • args string: Name of scene which has been opened

  • SceneClosed

    This signal is emitted when a scene is closed

    Signal payload:
    • args string: Name of scene which has been closed

  • PlayModeChanged

    Sent when the play mode changes

    Signal payload:
    • args int: 1 if playback in progress, 0 if not

Methods

Application.get_application_info()

Information describing the application exposed via the FilmLight API

Arguments

  • No arguments

Result

  • dict: Application Info
    • Build string: Build number i.e. 10000
    • Major string: Major version number, i.e. 5
    • Minor string: Minor version number, i.e. 0
    • Name string: Application Name, i.e. 'flapi'
    • Path string: Path to the application
    • Product string: Product Name, i.e. 'Baselight'

Application.get_sdk_versions()

Get SDK version information

Arguments

  • No arguments

Result

Application.get_connections_info()

Get array of current connections. Each entry in the array will be a ConnectionInfo object describing that connection.

Arguments

  • No arguments

Result

Application.get_video_streaming_supported()

Is video streaming supported (hardware, setup & licensed)

Arguments

  • No arguments

Result

  • int: 1 if streaming supported, 0 if not

Application.get_video_streaming_enabled()

Is video streaming currently enabled

Arguments

  • No arguments

Result

  • int: 1 if streaming enabled, 0 if not

Application.get_video_stream_address()

Return address for video stream

Arguments

  • No arguments

Result

  • string: Address for video stream access. Used by Client View.

Application.is_playing()

Is playback currently in progress

Arguments

  • No arguments

Result

  • int: 1 if playback in progress, 0 if not

Application.get() BETA

Return instance of the Application object (typically for signal connection)

Arguments

  • No arguments

Result

get_current_scene() BETA

Return the currently active Scene within the application

Arguments

  • No arguments

Result

get_current_scene_name() BETA

Return the name of the currently active Scene within the application

Arguments

  • No arguments

Result

  • string: Current Scene name

get_open_scene_names() BETA

Return array of names of scenes currently open in the application. You can get the Scene object for a given name by calling get_scene_by_name().

Arguments

  • No arguments

Result

  • list: Array of Scene Names
    • string: Scene Name

get_scene_by_name(name) BETA

Return the Scene object for the scene with the given name. If no matching scene can be found, NULL is returned.

Arguments

  • name string: Name of Scene

Result

  • Scene: Scene object for given scene name

get_current_cursor() BETA

Return the currently active Cursor within the application

Arguments

  • No arguments

Result

get_cursors() BETA

Return active Cursor objects within the application

Arguments

  • No arguments

Result

  • list: Array of Cursor objects
    • Cursor: Cursor object representing active cursor in application

log(category, severity, message) BETA

Log message in application Log view

Arguments

  • category string: Category of message
  • severity LOG_SEVERITY: Severity of message, Hard, Soft or Transient
  • message string: Message to log

Result

  • No result

message_dialog(title, message, buttons) BETA

Present a message box in the Application for the user to interact with

Arguments

  • title string: Title of message box
  • message string: Contents of message box
  • buttons list: Array of buttons to show in dialog box
    • string: Button label

Result

  • string: Label of button selected by user

list_dialog(title, message, items) BETA

Present a dialog to the user containing a list of items that the user can select from

Arguments

  • title string: Title of list dialog
  • message string: Message to show in list dialog
  • items list: Array of items to show in list

Result

  • any: Key of selected object, or NULL if no selection

set_custom_data(data_key, data_value)

Set a custom data value in the application with the supplied (string) key. Existing custom data values can be deleted from the application by supplying NULL/None/null as the data value (for an existing key).

Arguments

  • data_key string: Custom data value key
  • data_value any Can be None: New data value for the given key (or NULL/None/null to delete)

Result

  • No result

get_custom_data(data_key)

Get a custom data value from the application previously set using set_custom_data.

Arguments

  • data_key string: Custom data value key

Result

  • any: Custom data value found

get_custom_data_keys()

Return sorted array of (string) keys that can be used to fetch application custom data values via get_custom_data.

Arguments

  • No arguments

Result

  • list:
    • string: Key string

AudioSync

audio sync operation

Signals

  • AudioSyncProgress

    This signal is sent as the AudioSync operation is performed

    Signal payload:

Methods

AudioSync.create()

Create a new audio sync operation object

Arguments

  • No arguments

Result

audio_sync(scene, settings, shot_ids)

Perform audio sync operation using the given audio sync settings

Arguments

  • scene Scene: Target scene to AudioSync into
  • settings AudioSyncSettings:
  • shot_ids list Can be None Optional: Array of Shot IDs to apply audio sync operation to
    • int: Shot ID

Result

  • int: Number of shots updated by audio sync operation

get_log()

Return log of progress information

Arguments

  • No arguments

Result


ClientViewManager

Manages settings for connected Client Views.

Signals

  • ClientConfigsChanged

    Sent when the client view connection list changes and/or the settings for any connected clients

    Signal payload:
    • args none

  • SigHostUserSettingsChanged

    Sent when the Client View's host user's settings change

    Signal payload:
    • args none

  • StreamConfigsChangedStart

    Sent before changes to any of the the stream configurations are made

    Signal payload:
    • args none

  • StreamConfigsChangedEnd

    Sent after changes to the stream configurations have been made

    Signal payload:
    • args none

  • PerformSimAdAction

    For internal debug use only

    Signal payload:
    • args none

Methods

ClientViewManager.get()

Get reference to the (singleton) ClientViewManager object

Arguments

  • No arguments

Result

get_host_user_settings()

Get object containing Settings for the Client View's host user

Arguments

  • No arguments

Result

get_client_settings()

Get the connected Client View's config/settings object.

Arguments

  • No arguments

Result

get_stream_settings()

Get array of stream settings objects.

Arguments

  • No arguments

Result

get_streaming_enabled()

Is streaming currently enabled.

Arguments

  • No arguments

Result

  • int: 1 if streaming enabled, otherwise 0

get_session_name()

Get the current Client View session name.

Arguments

  • No arguments

Result

  • string: Current session name

get_session_clients()

Get array of current session clients. Each entry in the array will be a ConnectionInfo object describing that connection.

Arguments

  • No arguments

Result


CurrentGrade

Used to monitor an in-progress Baselight grading session. Clients should first obtain a CurrentGrade (singleton) instance using the (static) get() function. Clients can register with this instance to receive signals when the current grade changes.

Signals

  • UpdateCurrentShot

    Sent when the current cursor changes shot or scene

    Signal payload:
    • args dict: Definition of the current cursor, scene and shot ID
      • Cursor Cursor: Current cursor (or NULL if no current scene)
      • Scene Scene: Current scene (or NULL if no current scene). Note: this (scene interface) will be implicitly invalidated if/when the current scene changes.
      • ShotId int: Current shot id (or -1 if no current shot)

Methods

CurrentGrade.get()

Get (singleton) current grade interface for the connected client

Arguments

  • No arguments

Result

request_update_current_shot_signal()

Explicitly request an 'UpdateCurrentShot' signal. This can be useful, for example, when first connecting to the current grade module for initialising a client's internal state.

Arguments

  • No arguments

Result

  • No result

get_current_cursor()

Get an interface to the cursor currently in use by Baselight for grading.

Arguments

  • No arguments

Result

  • Cursor: Current cursor interface

is_enabled()

Is this interface currently enabled. Note: The current grade interface may be arbitrarily enabled/disabled from the host application itself.

Arguments

  • No arguments

Result

  • int: Flag indicating whether the interface is currently enabled

Cursor

Interface for accessing cursors within a scene.

Signals

  • No Signals

Methods

get_time()

Get cursor's position in the timeline in seconds

Arguments

  • No arguments

Result

  • float: Timeline time

get_frame()

Get cursor's position in the timeline as a frame number

Arguments

  • No arguments

Result

  • int: Timeline frame number

get_record_timecode()

Get cursor's position in the timeline as a timecode

Arguments

  • No arguments

Result

  • timecode: Record timecode

get_viewing_format_name()

Get the name of the cursor's current viewing format.

Arguments

  • No arguments

Result

  • string: Viewing format name

get_viewing_format_dims()

Get basic geometry (width, height and aspect ratio) of the cursor's current viewing format

Arguments

  • No arguments

Result

  • dict: Viewing format dimensions
    • AspectRatio float: Viewing format pixel aspect ratio (for anamorphic formats)
    • Height int: Viewing format height
    • Width int: Viewing format width

get_viewing_format_mask_name()

Get current viewing format mask name

Arguments

  • No arguments

Result

get_viewing_format_mask()

Get current viewing format mask rectangle

Arguments

  • No arguments

Result

get_age()

Get the cursor's 'age'. The age is an integer, incremented whenever an attribute which could result in a visual change to the image display has been modfied.

Arguments

  • No arguments

Result

  • int: Cursor age value

is_using_truelight()

Is Truelight currently in use (ie. a profile has been selected & Truelight is enabled) in this cursor.

Arguments

  • No arguments

Result

  • int: Flag indicating if Truelight is in use

DynamicDialog (BETA)

This class can be used to show a complex dialog box to the user BETA

Signals

  • SettingsChanged BETA

    This signal is emitted when the user changes one or more values in the dialog

    Signal payload:
    • args dict: Current settings for the dynamic dialog

  • TimerCallback BETA

    This signal is emitted when the timer issues a callback

    Signal payload:
    • args dict: Current settings for the dynamic dialog

Methods

DynamicDialog.create(title, defns, settings) BETA

Create a Dialog object

Arguments

  • title string: Title of dialog
  • defns list: Array of items to show in dialog
    • DialogItem: Definition for an individual item in the DynamicDialog
  • settings dict: Dictionary of initial settings for dialog items

Result

DynamicDialog.modal(title, defns, settings, width, height) BETA

Display a Dialog object and return the settings

Arguments

  • title string: Title of dialog
  • defns list: Array of items to show in dialog
  • settings dict: Dictionary of initial settings for dialog items
  • width int Can be None Optional: Desired width of dialog box
  • height int Can be None Optional: Desired height of dialog box

Result

  • dict: Settings chosen by user, or NULL if dialog was cancelled

show_modal(width, height) BETA

Show dialog to user

Arguments

  • width int Can be None Optional: Desired width of dialog box
  • height int Can be None Optional: Desired height of dialog box

Result

  • dict: Settings chosen by user, or NULL if dialog was cancelled

get_settings() BETA

Return current dialog settings

Arguments

  • No arguments

Result

  • dict:

set_settings(settings) BETA

Set current dialog settings

Arguments

  • settings dict:

Result

  • No result

set_timer_callback(delay, repeat) BETA

Set time until callback signal TimerCallback will be sent

Arguments

  • delay int: Time until signal in milliseconds
  • repeat int Optional: Flag indicating signal should repeat until cancel_timer_callback is called

Result

  • No result

cancel_timer_callback() BETA

Cancel any pending timer callback

Arguments

  • No arguments

Result

  • No result

Export

Export operation

Signals

  • ExportProgress

    This signal is sent as the Export operation is performed

    Signal payload:
    • args ExportProgress: Latest progress information from Export operation

Methods

Export.create()

Create a new Export operation object

Arguments

  • No arguments

Result

select_all()

Select all snots in Scene to export

Arguments

  • No arguments

Result

  • No result

clear_selection()

Clear selection of shots in Scene to export

Arguments

  • No arguments

Result

  • No result

select_shots(shots)

Set the selection to the given Shots for rendering

Arguments

  • shots list: Array of Shot objects to select

Result

  • No result

select_shot(shot)

Add the given shot to the selection to be exported.

Arguments

  • shot list: Shot to add to selection

Result

  • No result

do_export_BLG(queue, scene, settings)

Perform export BLG operation using the given Export settings

Arguments

Result

  • ExportOpInfo: Operation info for job added to export queue

do_export_CDL(queue, scene, settings)

Perform export CDL operation using the given Export settings

Arguments

Result

  • ExportOpInfo: Operation info for job added to export queue

do_export_cube(queue, scene, settings)

Perform export LUT operation using the given Export settings

Arguments

Result

  • ExportOpInfo: Operation info for job added to export queue

do_export_still(queue, scene, settings)

Perform export still operation using the given Export settings

Arguments

Result

  • ExportOpInfo: Operation info for job added to export queue

get_log()

Return log of progress information

Arguments

  • No arguments

Result

get_presets(scene, export_type) BETA

Return array of presets.

Note: this function is provided to make it easier to discover what settings are required when you want a particular export format (in particular for stills where it may not be obvious how to choose quality / compression settings etc). It is not, currently, intended to be a full-fledged interface to the Baselight presets.

Arguments

  • scene Scene: Scene to read presets from
  • export_type EXPORTTYPE: Type of Export to request presets from

Result

  • list:
    • dict:

Format

Format defines an image resolution and pixel aspect ratio with associated masks and burnins

Signals

  • No Signals

Methods

get_description()

Return description of format

Arguments

  • No arguments

Result

  • string: Description

get_resolution(res)

Return FormatInfo for given resolution of Format

Arguments

  • res string Optional: Constant identify which resolution to fetch

Result

get_mapping_names()

Return names of mapping from this format to other formats

Arguments

  • No arguments

Result

  • list: Array of names of format mapping
    • string: Format name

get_mapping(name)

Return definition of mapping from this format to named format

Arguments

  • name string: Name of target format

Result

add_mapping(name, mapping)

Add mapping from this format to the given named format. The mapping struct is optional. If the mapping is omitted, a default mapping is constructed which maps the current format inside of the destination format.

If you wish to map the source format outside of the destination format, you can pass a mapping struct with the sx, sy, tx and ty parameters set to zero, and the inside flag to set to 0.

'sx' and 'sy' are the scaling factors for the X and Y axes from the source format (or source mask, if specified) to the destination format (or destination mask, if specified).

'tx' and 'ty' are the translation for the X and Y axes, relative to the destination format.

If you wish to map from a mask within the source format and/or to a mask with destination format, you can specify those masks by name in the src_mask and dst_mask fields of FormatMapping.

Arguments

  • name string: Destination format name
  • mapping FormatMapping Can be None Optional: Parameters defining the mapping from this format to the target format

Result

  • No result

delete_mapping(name)

Delete mapping to the given named format

Arguments

  • name string: Name of format to delete mapping to

Result

  • No result

get_masks()

Return array of FormatMasks defined for this format

Arguments

  • No arguments

Result

get_mask_names()

Return list of mask names defined for this format

Arguments

  • No arguments

Result

  • list: Array of mask names
    • string: Mask name

get_mask(name)

Return the definition for the named mask in this format

Arguments

  • name string: Name of mask

Result

has_mask(name)

Return a flag indicating whether a mask of the given name is present in this format

Arguments

  • name string: Name of mask

Result

  • int: Flag indicating existence of this mask within the format

add_mask(name, mask)

Add a new mask definition to this format

Arguments

  • name string: Name of new mask
  • mask FormatMask: Parameters for mask

Result

  • No result

delete_mask(name)

Delete the definition for this given mask in this format

Arguments

  • name string: Name of mask to delete

Result

  • No result

get_burnin_names()

Return array of names of burnins defined for this format

Arguments

  • No arguments

Result

  • list: Array of burnin names
    • string: Burnin name

get_burnin(name)

Return FormatBurnin object for the named burnin

Arguments

  • name string: Burnin name

Result

add_burnin(name)

Create a new burnin with the given name, and return a FormatBurnin object for it

Arguments

  • name string: Burnin name

Result

delete_burnin(name)

Delete the burnin with the given name

Arguments

  • name string: Burnin name

Result

  • No result

FormatBurnin

Definition of a burn-in for a Format

Signals

  • No Signals

Methods

get_opacity()

Get burnin opacity

Arguments

  • No arguments

Result

  • float: Opacity

set_opacity(opacity)

Set burnin opacity

Arguments

  • opacity float: Opacity

Result

  • No result

get_box_colour()

Set colour of box around text items

Arguments

  • No arguments

Result

  • list: RGBA box colour
    • float:

set_box_colour(colour)

Set colour of box around text items

Arguments

  • colour list: RGBA box colour
    • float:

Result

  • No result

get_font()

Get font name for this burnin

Arguments

  • No arguments

Result

  • string: Font name

set_font(name)

Get font name for this burnin

Arguments

  • name string: Font name

Result

  • No result

add_item(item)

Add new item to the burnin

Arguments

Result

  • No result

get_num_items()

Return number of items defined within this burnin

Arguments

  • No arguments

Result

  • int: Number of burnin items

get_item(index)

Return definition for the burnin item at the given index

Arguments

  • index int: Index of burnin item

Result

set_item(index, item)

Return definition for the burnin item at the given index

Arguments

Result

  • No result

delete_item(index)

Delete the burnin item at the given index

Arguments

  • index int: Index of burnin item

Result

  • No result

FormatSet

The FormatSet interface allows enumeration of available resources on the FilmLight system such as formats, colour spaces, display render transforms, LUTs, etc.

Signals

  • No Signals

Methods

FormatSet.factory_formats()

Return factory FormatSet object for factory (built-in) formats

Arguments

  • No arguments

Result

FormatSet.global_formats()

Return global FormatSet object for formats defined in formats database

Arguments

  • No arguments

Result

FormatSet.job_formats(hostname, jobname)

Return FormatSet object for formats defined in the given Job database

Arguments

  • hostname string: Database host
  • jobname string: Job name

Result

FormatSet.get_drt_names()

Return array of Display Rendering Transform names

Arguments

  • No arguments

Result

  • list: Array of DRT names
    • string: DRT Name

FormatSet.get_drt_info(name)

Return information for the given Display Rendering Transform name

Arguments

  • name string: Name of Display Rendering Transform

Result

get_scope()

Return scope this is FormatSet represents

Arguments

  • No arguments

Result

get_scope_path()

Return the path for FormatSets representing a job/scene scope

Arguments

  • No arguments

Result

  • string: Scope path

get_basic_format_name(width, height, pixelAspectRatio)

Return name for a basic (auto-generated) format

Arguments

  • width int: Width of format
  • height int: Height of format
  • pixelAspectRatio float Optional: Pixel aspect ratio

Result

  • string: Format name

get_format_names()

Return array of format names

Arguments

  • No arguments

Result

  • list: Format names
    • string:

get_format(name)

Return Format object for the named format

Arguments

  • name string: Format name

Result

add_format(name, description, width, height, pixelAspectRatio)

Add a new format to this FormatSet

Arguments

  • name string: Name of format
  • description string: Description of format
  • width int: Width of format in pixels
  • height int: Height of format in pixels
  • pixelAspectRatio float Optional: Pixel aspect ratio

Result

  • Format: Object representing the newly created format

delete_format(name)

Delete a format from the FormatSet

Arguments

  • name string: Name of format to delete

Result

  • No result

has_format(name)

Check if the given format name exists within this FormatSet

Arguments

  • name string: Name of format to find

Result

  • int: Flag indicating whether the format exists

get_colour_space_names()

Return array of colour space names

Arguments

  • No arguments

Result

  • list: Array of colour space names
    • string: Colour space name

get_colour_space_info(name)

Return information on the given colour space

Arguments

  • name string: Name of colour space

Result

reload()

Reload the contents of the FormatSet from database

Arguments

  • No arguments

Result

  • No result

Image

Signals

  • No Signals

Methods

Image.get_raw_metadata(filename)

Returns raw metadata for the image or movie at the supplied path

Arguments

  • filename string: Filename of image/movie to examine

Result

  • dict: Dictionary of metadata

JobManager

Query and manipulate the FilmLight job database

Signals

  • No Signals

Methods

JobManager.get_jobs(host)

Fetch list of jobs in job database

Arguments

  • host string: Hostname of job database

Result

  • list: Array of job name strings
    • string: Job name

JobManager.get_folders(host, job, folder, recursive)

Fetch list of folder names within job/folder in job database

Arguments

  • host string: Hostname of job database
  • job string: Job name within job database
  • folder string Can be None Optional: Folder within job
  • recursive int Optional: Return all folders contained within the given job/folder

Result

  • list: Array of folder names
    • string: Folder name

JobManager.get_scenes(host, job, folder)

Fetch list of scene names within job/folder in job database

Arguments

  • host string: Hostname of job database
  • job string: Job name within job database
  • folder string Can be None Optional: Folder within job

Result

  • list: Array of scene names
    • string: Scene name

JobManager.create_job(host, jobname)

Create a new job

Arguments

  • host string: Hostname of job database
  • jobname string: Job name

Result

  • No result

JobManager.rename_job(host, jobname, new_jobname)

Rename job

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • new_jobname string: New job name

Result

  • No result

JobManager.delete_job(host, jobname, force)

Delete job

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • force int Optional: Force deletion of job

Result

  • No result

JobManager.job_exists(host, jobname)

Check if job exists

Arguments

  • host string: Hostname of job database
  • jobname string: Job name

Result

  • int: Flag indicating whether job exists

JobManager.create_folder(host, jobname, foldername)

Create a folder within job

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • foldername string: Folder name within job

Result

  • No result

JobManager.rename_folder(host, jobname, foldername, new_foldername)

Rename folder

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • foldername string: Folder name within job
  • new_foldername string: New folder name

Result

  • No result

JobManager.delete_folder(host, jobname, foldername)

Delete folder

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • foldername string: Folder name within job

Result

  • No result

JobManager.get_scene_info(host, jobname, scenename)

Return information about scene

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • scenename string: Scene name

Result

  • SceneInfo: An object containing properties of the Scene

JobManager.scene_exists(host, jobname, scenename)

Check if scene exists

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • scenename string: Scene name

Result

  • int: Flag indicating whether scene exists

JobManager.delete_scene(host, jobname, scenename, ignoreLocks)

Delete scene

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • scenename string: Scene name
  • ignoreLocks int Optional: Flag indicating any existing locks on scene should be ignored

Result

  • No result

JobManager.rename_scene(host, jobname, scenename, newname)

Rename scene

Arguments

  • host string: Hostname of job database
  • jobname string: Job name
  • scenename string: Scene name
  • newname string: New Scene name

Result

  • No result

Licence

Licence management

Signals

  • No Signals

Methods

Licence.get_system_id()

Return the system ID used to identify this system for licensing

Arguments

  • No arguments

Result

  • string: System ID string

Licence.get_licence_info(include_expired)

Return licence information

Arguments

  • include_expired int Optional: Flag indicating whether to include expired licenses in the list

Result

Licence.install_licence(licenceData)

Install the given licence data

Arguments

  • licenceData string: String containing Base-64 encoded licence data

Result

  • No result

Mark

Mark defined in a Shot or Scene

Signals

  • No Signals

Methods

get_id()

Return Mark object ID

Arguments

  • No arguments

Result

  • int: Mark ID

get_type()

Return Mark type

Arguments

  • No arguments

Result

get_position()

Return Mark position For Shot marks, this value is a frame number relative to the start of the image sequence. For Strip marks, this value is a time in seconds relative to the start of the strip. For Timeline marks, this value is a time in seconds relative to the start of the timeline.

Arguments

  • No arguments

Result

  • float: Position in seconds or frames

get_time()

Return Mark position in seconds For Shot and Strip marks, this returns the time relative to the start of the shot For Timeline marks, this returns the time relative to the start of the timeline

Arguments

  • No arguments

Result

  • float: Position in seconds

get_note_text()

Return Mark note text

Arguments

  • No arguments

Result

  • string: Note text

get_colour()

Return Mark colour

Arguments

  • No arguments

Result

  • list: RGBA colour
    • float:

get_category()

Return Mark category

Arguments

  • No arguments

Result

  • string: Mark category

get_source_frame(eye)

Return the source image frame number for this mark Only applicable for Shot/Strip marks. Will fail for Timeline marks

Arguments

  • eye StereoEye Optional: Which eye for stereo sequences

Result

  • int: Source frame number

get_source_timecode(eye)

Return the source image timecode for this mark Only applicable for Shot/Strip marks. Will fail for Timeline marks

Arguments

  • eye StereoEye Optional: Which eye for stereo sequences

Result

  • timecode: Source timecode

get_record_frame()

Return the source image frame number for this mark

Arguments

  • No arguments

Result

  • int: Record frame number

get_record_timecode()

Return the source image timecode for this mark

Arguments

  • No arguments

Result

  • timecode: Record timecode

get_properties()

Return dictionary of properties for this Mark object

Arguments

  • No arguments

Result

  • dict: Dictionary containing property keys and values

set_properties(props)

Set the property values for the given dictionary of keys & values. Setting a value to NULL will remove it from the property set.

Arguments

  • props dict: Dictionary of property keys & values

Result

  • No result

A menu in the application user interface, which contains MenuItems BETA

Signals

  • MenuUpdate BETA

    Called when a menu is about to be displayed

Methods

Create new Menu object

Arguments

  • No arguments

Result

Add MenuItem to menu

Arguments

  • item MenuItem: Item to add to menu
  • index int Optional: Index to insert item at. Use 0 to append to front. Use -1 to append to end.

Result

  • No result

Get number of items in menu

Arguments

  • No arguments

Result

  • int: Number of items in menu

Get MenuItem at given index within menu

Arguments

  • index int: Index of menu item

Result

Return the index of the given MenuItem within this Menu

Arguments

Result

  • int: Index of MenuItem, -1 if not found

Remove menu item at the given index

Arguments

  • index int: Index of menu item

Result

  • No result

Remove menu item from menu

Arguments

Result

  • No result

Remove all menu items from menu

Arguments

  • No arguments

Result

  • No result

A menu item in the application user interface, which can trigger actions BETA

Signals

  • MenuItemUpdate BETA

    This signal is emitted when the MenuItem is about to be displayed in the UI

  • MenuItemSelected BETA

    This signal is emitted when the user selects this menu item in the UI

Methods

Create a new MenuItem object

Arguments

  • title string: Title of MenuItem
  • key any Can be None Optional: A value which can be used as a key to identify this menu item

Result

Register this menu item to insert it into the application's UI

Arguments

Result

  • No result

Get menu item title

Arguments

  • No arguments

Result

  • string: Menu item title

Set menu item title

Arguments

  • title string: New menu item title

Result

  • No result

Get menu item enabled state

Arguments

  • No arguments

Result

  • int: Enabled state

Set menu item enabled state

Arguments

  • enabled int: Enabled state

Result

  • No result

Get menu item hidden state

Arguments

  • No arguments

Result

  • int: Hidden state

Set menu item hidden state

Arguments

  • hidden int: Hidden state

Result

  • No result

Get sub-menu for this menu item

Arguments

  • No arguments

Result

Set sub-menu for this menu item

Arguments

  • submenu Menu: Menu object containing sub-menu items

Result

  • No result

MultiPaste

Multi-Paste operation

Signals

Methods

MultiPaste.create()

Create a new Multi-Paste operation object

Arguments

  • No arguments

Result

multi_paste(scene, settings, shot_ids)

Perform multi-paste operation using the given Multi-Paste settings

Arguments

  • scene Scene: Target scene to MultiPaste into
  • settings MultiPasteSettings:
  • shot_ids list Can be None Optional: Array of Shot IDs to apply multi-paste operation to
    • int: Shot ID

Result

  • int: Number of shots updated by Multi-Paste operation

get_log()

Return log of progress information

Arguments

  • No arguments

Result


ProgressDialog (BETA)

Display a progress dialog within the application BETA

Signals

  • CancelOperation BETA

    The user has requested that the operation be cancelled

Methods

ProgressDialog.create(title, msg, cancellable) BETA

Create a new ProgressDialog

Arguments

  • title string: Title of progress dialog
  • msg string: Message to display in progress dialog
  • cancellable int Optional: Flag indicating that progress dialog has cancel button

Result

show(delay) BETA

Show the progress dialog

Arguments

  • delay float Optional: Only show progress dialog after a delay, in seconds

Result

  • No result

set_title(title) BETA

Set the title of the progress dialog

Arguments

  • title string: New title for dialog

Result

  • No result

set_progress(progress, message) BETA

Update the progress & message displayed in dialog

Arguments

  • progress float: Progress value between 0.0 and 1.0
  • message string: Progress message to display

Result

  • No result

hide() BETA

Hide the progress dialog

Arguments

  • No arguments

Result

  • No result

QueueManager

Interface for managing the Queue on a Baselight/Daylight system

Signals

  • QueueOpsChanged

    This signal is emitted when the list of operations in the queue changes

  • QueueOpStatusChanged

    This signal is emitted when the status of one of the operations in the queue changes

    Signal payload:
    • args int: ID of operation whose status has changed

  • QueueOpLogChanged

    This signal is emitted when a new log information entry is generated for one of the active operations in the queue

    Signal payload:
    • args int: ID of operation whose log has changed

Methods

QueueManager.create(zone)

Create a QueueManager object to examine and manipulate the queue on the given zone

Arguments

  • zone string: Zone name of machine running queue

Result

QueueManager.create_local()

Create a QueueManager object to examine and manipulate the queue on the local zone

Arguments

  • No arguments

Result

QueueManager.create_no_database()

Create a QueueManager object to examine and manipulate a non-database queue in the FLAPI process. In addition, the QueueManager object will process any operations added to the queue within the FLAPI process.

Arguments

  • No arguments

Result

QueueManager.get_queue_zones()

Return list of available zones running queue services

Arguments

  • No arguments

Result

  • list: Array of strings identifying zones available for rendering
    • string: Zone name

get_operation_ids()

Return list operation IDs in queue

Arguments

  • No arguments

Result

  • list: Array of Operation IDs
    • int: Operation ID

get_operation(id)

Return definition of given operation ID

Arguments

  • id int: Operation ID

Result

get_operation_status(id)

Return status of given operation ID

Arguments

  • id int: Operation ID

Result

get_operation_log(id)

Return log for given operation ID

Arguments

  • id int: Operation ID

Result

pause_operation(id)

Pause operation with given operation ID

Arguments

  • id int: Operation ID

Result

  • No result

resume_operation(id)

Resume operation with given operation ID

Arguments

  • id int: Operation ID

Result

  • No result

restart_operation(id)

Restart operation with given operation ID

Arguments

  • id int: Operation ID

Result

  • No result

delete_operation(id)

Delete operation with given operation ID

Arguments

  • id int: Operation ID

Result

  • No result

archive_operation(id)

Archive operation with given operation ID

Arguments

  • id int: Operation ID

Result

  • No result

enable_updates()

Enable status update signals

Arguments

  • No arguments

Result

  • No result

disable_updates()

Disable status update signals

Arguments

  • No arguments

Result

  • No result

new_operation(opType, desc, params, tasks, dependsOn) BETA

Create a new custom operation and return its ID

Arguments

  • opType string: Key identifying the operation type
  • desc string: Description of operation to present in queue
  • params dict: Parameters for operation. May contain any simple key/value parameters.
  • tasks list Can be None Optional: Array of tasks for this operation. If you wish to add more tasks to the operation, leave this parameter empty and use add_tasks_to_operation() instead, followed by set_operation_ready().
  • dependsOn set Can be None Optional: Set of operation IDs that this operation depends on

Result

  • int: Operation ID

add_tasks_to_operation(opid, tasks) BETA

Add more tasks to the given operation

Arguments

  • opid int: Operation ID
  • tasks list: Array of tasks for this operation

Result

  • No result

set_operation_ready(opid) BETA

Mark operation as ready to process. Should be called after calling add_tasks_to_operation().

Arguments

  • opid int: Operation ID

Result

  • No result

get_next_operation_of_type(opType, wait) BETA

Find the next operation for the given operation type that is ready to execute

Arguments

  • opType string: Key identifying operation type
  • wait int: Flag indicating whether the method should block until a task is available

Result

  • int: Operation ID

get_operation_params(opid) BETA

Get params for given operation ID

Arguments

  • opid int: Operation ID

Result

  • dict:

get_next_task(opid) BETA

Get the next task ready to execute for the given operation ID

Arguments

  • opid int: Operation ID

Result

set_task_progress(opid, taskseq, progress) BETA

Set task progress

Arguments

  • opid int: Operation ID
  • taskseq int: Task Sequence Number
  • progress float: Task progress between 0.0 and 1.0

Result

  • No result

set_task_done(opid, taskseq, msg) BETA

Mark task as completed

Arguments

  • opid int: Operation ID
  • taskseq int: Task Sequence ID
  • msg string: Task Message

Result

  • No result

set_task_failed(opid, taskseq, msg, detail, frame) BETA

Mark task as failed

Arguments

  • opid int: Operation ID
  • taskseq int: Task Sequence ID
  • msg string: Task Message
  • detail string: Detailed information on failure
  • frame int Can be None Optional: Frame number of failure

Result

  • No result

add_operation_log(opid, type, msg, detail) BETA

Add log entry for operation

Arguments

  • opid int: Operation ID
  • type QUEUE_LOG_TYPE: Type of log entry
  • msg string: Log Message
  • detail string: Detailed information on failure

Result

  • No result

add_task_log(opid, taskseq, type, msg, detail, frame) BETA

Add log entry for operation

Arguments

  • opid int: Operation ID
  • taskseq int: Task Sequence ID
  • type QUEUE_LOG_TYPE: Type of log entry
  • msg string: Log Message
  • detail string: Detailed information on failure
  • frame int Can be None Optional: Frame number within task for log entry

Result

  • No result

RenderProcessor

A RenderProcessor will execute a RenderSetup and produce deliverable data

Signals

  • No Signals

Methods

RenderProcessor.get()

Get RenderProcessor instance

Arguments

  • No arguments

Result

start(renderSetup)

Start render operation for the given RenderSetup

Arguments

Result

  • No result

get_progress()

Returns current render progress

Arguments

  • No arguments

Result

get_log()

Get log of operation progress

Arguments

  • No arguments

Result

shutdown()

Shutdown the RenderProcessor instance. This releases any resources in use by the RenderProcessor.

Arguments

  • No arguments

Result

  • No result

RenderSetup

Setup Baselight/Daylight scene for rendering

Signals

  • No Signals

Methods

RenderSetup.get_image_types()

Return array of supported image types for rendering

Arguments

  • No arguments

Result

RenderSetup.get_movie_types()

Return array of movie types for rendering

Arguments

  • No arguments

Result

RenderSetup.get_movie_codecs(movieType)

Return array of video codecs available for the given movie type

Arguments

  • movieType string: Movie type key

Result

RenderSetup.get_movie_audio_codecs(movieType)

Return array of audio codecs available for the given movie type

Arguments

  • movieType string: Movie type key

Result

RenderSetup.create()

Create a new RenderSetup instance

Arguments

  • No arguments

Result

RenderSetup.create_from_scene(scene)

Create a new RenderSetup instance configured to render the given Scene using its default deliverables

Arguments

  • scene Scene: Scene to render and take deliverable configuration from

Result

get_scene()

Return Scene object for RenderSetup

Arguments

  • No arguments

Result

set_scene(scene)

Set Scene to Render

Arguments

  • scene Scene: Scene object

Result

  • No result

save_into_scene(scene)

Save the deliverables from this RenderSetup into the Scene. If a delta is not in progress on the Scene, a new delta will be created for the save operation.

Arguments

  • scene Scene Can be None Optional: Scene to save deliverables into. If not specified, the deliverables will be saved into the scene currently associated with the RenderSetup.

Result

  • No result

set_deliverables_from_scene(scene)

Load Deliverables from Scene object assigned to this RenderSetup object

Arguments

  • scene Scene Can be None: If specified, load deliverables from the specified Scene instead of scene associated with RenderSetup

Result

  • No result

get_num_deliverables()

Render number of deliverables defined for this Scene

Arguments

  • No arguments

Result

  • int: Number of deliverables

get_deliverable_names()

Return array of deliverable names

Arguments

  • No arguments

Result

  • list: Array of deliverable names
    • string: Deliverable name

get_deliverable(index)

Return the RenderDeliverable definition at the given index

Arguments

  • index int: Index of RenderDeliverable

Result

set_deliverable(index, deliverable)

Set the settings for the deliverable at the given index

Arguments

  • index int: Index of deliverable to update
  • deliverable RenderDeliverable: Settings to use for this deliverable

Result

  • No result

get_deliverable_by_name(name)

Get the settings for the RenderDeliverable definition with the given name. Returns NULL if not matching deliverable can be found.

Arguments

  • name string: Name of RenderDeliverable

Result

set_deliverable_by_name(name, deliverable)

Set the settings for the RenderDeliverable definition with the given name

Arguments

  • name string: Name of RenderDeliverable to update
  • deliverable RenderDeliverable: Settings to use for this deliverable

Result

  • No result

add_deliverable(deliverable)

Add a new deliverable to be generated as part of this render operation

Arguments

Result

  • No result

delete_deliverable(index)

Delete the deliverable at the given index

Arguments

  • index int: Index of deliverable to delete

Result

  • No result

delete_all_deliverables()

Delete all deliverables defined in the RenderSetup

Arguments

  • No arguments

Result

  • No result

get_deliverable_enabled(index)

Get enabled state of deliverable at given index

Arguments

  • index int: Index of deliverable

Result

  • No result

set_deliverable_enabled(index, enabled)

Set enabled state of deliverable at given index

Arguments

  • index int: Index of deliverable
  • enabled int: Flag indicating whether deliverable is enabled for rendering

Result

  • No result

get_output_filename_for_deliverable(index, leave_container, frame)

Return the full filename for the given frame number of a deliverable

Arguments

  • index int: Index of deliverable
  • leave_container int Optional: Leave %C container variable in returned path
  • frame int Optional: Frame number to generate filename for. Default is -1 to indicate the first frame of the render operation.

Result

  • string: Full filename for rendered file/frame

set_container(container)

Set the output container directory for all deliverables

Arguments

  • container string: Container path

Result

  • No result

get_frames()

Get list of frame ranges to render

Arguments

  • No arguments

Result

set_frames(frames)

Set list of frame ranges to render

Arguments

Result

  • No result

select_all()

Select all frames in Scene to render

Arguments

  • No arguments

Result

  • No result

select_shots(shots)

Select the given Shots for rendering

Arguments

  • shots list: Array of Shot objects to select

Result

  • No result

select_shot_ids(shotids)

Select the given Shots identified by their ID for rendering

Arguments

  • shotids list: Array of Shot IDs to select
    • int: Shot ID

Result

  • No result

select_graded_shots()

Select all graded shots to render

Arguments

  • No arguments

Result

  • No result

select_timeline_marks(categories)

Select timeline marks matching the categories in the given category set

Arguments

  • categories set Can be None Optional: Set of categories to match against

Result

  • No result

select_shot_marks(categories)

Select shot marks matching the categories in the given category set

Arguments

  • categories set: Set of categories to match against

Result

  • No result

select_poster_frames()

Select all shot poster frames to render

Arguments

  • No arguments

Result

  • No result

select_shots_of_category(categories)

Select shots marked with one of the categories in the given category set

Arguments

  • categories set: Set of categories to match against

Result

  • No result

submit_to_queue(queue, opname)

Submit the current Render operation to a Queue for processing

Arguments

  • queue QueueManager: QueueManager object for machine running render queue
  • opname string: Operation name to use for queue job

Result

  • RenderOpInfo: Operation info for job added to render queue

Scene

Interface for opening, creating, accessing and modifying Scenes.

Scene modifications are usually made using a delta. A delta batches together one or more scene edits/modifications into a single, undo-able transaction. A client wishing to modify a scene would typically:

  1. Start a delta using the start_delta() method (supplying a user friendly name for the delta/operation they're performing).
  2. Make edits on the scene using whatever 'set' type methods are required for the operation.
  3. End the delta using the end_delta() method.

Signals

  • OpenSceneDone

    Sent when a call to the (asynchronous) open_scene_nonblock() method completes.

    Signal payload:
    • args dict: Result of the open_scene operation
      • Error string: String describing any error encountered while opening the scene

  • NewSceneDone

    Sent when a call to the (asynchronous) new_scene_nonblock() method completes.

    Signal payload:
    • args dict: Result of the new_scene operation
      • Error string: String describing any error encountered while creating the scene

  • TemporarySceneDone

    Sent when a call to the (asynchronous) temporary_scene_nonblock() method completes.

    Signal payload:
    • args dict: Result of the temporary_scene operation
      • Error string: String describing ny error encountered while creating the scene

  • SceneRangeDirty

    Sent when a range of the timeline has been dirtied, either by a grade modification or a change in the timeline geometry.

    Signal payload:
    • args dict: Information on dirty region
      • EndFrame int: Frame number at end of range affected
      • StartFrame int: Frame number at start of range affected

Methods

Scene.parse_path(str)

Convert the given string into a ScenePath object contaning Host, Job, Scene components, or raise an error if the path is invalid

Arguments

  • str string: Path string containing host, job, folder and scene elements

Result

  • ScenePath: A ScenePath object containing the elements of the path

Scene.path_to_string(scenepath)

Convert the given ScenePath object into a string

Arguments

  • scenepath ScenePath: ScenePath object containing Host, Job, Scene fields

Result

  • string: String form of ScenePath

Scene.create()

Create an empty Scene object, which can then be used to create a temporary scene, a new scene, or load an existing scene. After creating an empty Scene object, you must call ::temporary_scene_nonblock::, ::new_scene_nonblock:: or ::open_scene_nonblock::.

Arguments

  • No arguments

Result

Scene.new_scene(scenepath, options)

Create a new scene stored in a database. This function will block until the new scene has been created in the database. If the new scene cannot be created, this function will raise an exception containing an error message.

Arguments

Result

Scene.open_scene(scenepath, flags)

Open a scene. This function will block until the scene has been opened. If the scene cannot be opened, this function will raise an exception containing an error message.

Arguments

  • scenepath ScenePath: ScenePath identifying scene to open
  • flags set Can be None Optional:

Result

Scene.temporary_scene(options)

Create a temporary scene that is not stored in a database. This function will block until the temporary scene has been created. If the temporary scene cannot be created, this function will raise an exception containing an error message.

Arguments

Result

new_scene_nonblock(scenepath, options)

Create a new scene

Arguments

Result

  • No result

open_scene_nonblock(scenepath, flags)

Open a scene

Arguments

  • scenepath ScenePath: ScenePath identifying scene to open
  • flags set Can be None:

Result

  • No result

temporary_scene_nonblock(options)

Create a temporary scene that is not stored in a database

Arguments

Result

  • No result

save_scene()

Save changes to scene into database

Arguments

  • No arguments

Result

  • No result

get_open_status()

Fetch status of scene open operation

Arguments

  • No arguments

Result

wait_until_open()

Wait for any scene opening/creation operations to complete, and return the status

Arguments

  • No arguments

Result

close_scene()

Close scene

Arguments

  • No arguments

Result

  • int: 1 on success, 0 if no scene is open.

get_scene_pathname()

Get current scene's 'pathname' string (typically 'host:job:scene')

Arguments

  • No arguments

Result

  • string: Scene's pathname string

get_scene_container()

Get the current container for the scene

Arguments

  • No arguments

Result

  • string: Container path for the scene

set_scene_container(container)

Set the current container for the scene

Arguments

  • container string: New container path for the scene

Result

  • No result

start_delta(name)

Start a 'delta' on a scene that has been opened read/write. A delta is a set of modifcations/edits on a scene that together constitute a single, logical operation/transaction. Each start_delta call must have a matching end_delta call (with one or more editing operations in between). Every delta has a user visible name (eg. 'Change Film Grade Exposure'). Once a delta has been completed/ended it becomes an atomic, undoable operation.

Arguments

  • name string: Name of delta to start

Result

  • No result

cancel_delta()

Cancel a 'delta' (a set of scene modifications/edits) previously started via the start_delta() method, reverting the Scene back to the state it was in before start_delta().

Arguments

  • No arguments

Result

  • No result

end_delta()

End a 'delta' (a set of scene modifications/edits) previously started via the start_delta() method.

Arguments

  • No arguments

Result

  • No result

is_read_only()

Has this scene interface been opened 'read only'. Interfaces opened read only cannot modify their scene using the standard start_delta, make changes, end_delta paradigm. At any given time, multiple interfaces may reference/open the same scene in read only mode. However, at most only a single interface may reference a scene in read/write mode

Arguments

  • No arguments

Result

  • int: 1 if the interface is read only, 0 if not (read/write)

is_read_only_for_host()

Is the scene opened 'read only' for the host application. Note: This will be false if any interface has opened the scene in read/write mode (or the host has explicitly opened the scene read/write itself)

Arguments

  • No arguments

Result

  • int: 1 if the scene is read only for the host, 0 if not

get_formats()

Return FormatSet for formats defined within this Scene

Arguments

  • No arguments

Result

get_scene_settings()

Return SceneSettings object for this Scene

Arguments

  • No arguments

Result

get_category(key)

Return category definition

Arguments

  • key string: Key used to identify category

Result

set_category(name, colour)

Overwrites an existing category in the scene, or adds a new category if a category of that name doesn't exist. Will fail if an attempt is made to overwrite an built-in, read-only category.

Arguments

  • name string: User-visible name for this category. This value will also act as the key identifying the category when adding categories to strips and marks.
  • colour list: Colour associated with this category
    • float: RGBA components

Result

  • No result

get_mark_categories()

Return array of mark category keys

Arguments

  • No arguments

Result

  • list: Array of mark category keys
    • string: Category

get_strip_categories()

Return array of strip category keys

Arguments

  • No arguments

Result

  • list: Array of strip category keys
    • string: Category

get_start_frame()

Get frame number of start of first shot in scene

Arguments

  • No arguments

Result

  • int: Frame number

get_end_frame()

Get frame number of end of last shot in scene

Arguments

  • No arguments

Result

  • int: Frame number

get_working_frame_rate()

Get the working frame rate of the current scene (in FPS)

Arguments

  • No arguments

Result

  • float: The scene's frame rate (in FPS).

get_record_timecode_for_frame(frame_num)

Get record timecode for a given (timeline) frame number

Arguments

  • frame_num int: Timeline frame number

Result

  • timecode: Record timecode

get_shot_index_range(startFrame, endFrame)

Get index range of shots intersecting the (end exclusive) timeline frame range supplied

Arguments

  • startFrame float: timeline frame range start
  • endFrame float: timeline frame range end

Result

get_num_shots()

Get number of Shots within scene

Arguments

  • No arguments

Result

  • int: Number of Shots

get_shot_id_at(frame)

Return the ID of the shot at the timeline frame number supplied

Arguments

  • frame int: Timeline frame number

Result

  • int: ID of shot at frame, or -1 if none found

get_shot_id(index)

Return the ID for the shot at the given index within the Scene

Arguments

  • index int: Index of shot within scene (relative to get_num_shots)

Result

  • int: Shot ID

get_shot_ids(firstIndex, lastIndex)

Get an array of shots in the supplied indexed range. Each array entry is an object containing basic information for that shot. Explicitly, each shot entry will contain the following keys:

  • ShotId - A shot idenfifier (which can be used to obtain a Shot object via get_shot() if required).
  • StartFrame - The shot's timeline start frame
  • EndFrame - The shot's timeline end frame
  • PosterFrame - The shot's timeline poster frame

Returns new array shot list on success, NULL on error.

Arguments

  • firstIndex int Optional: Index of first shot
  • lastIndex int Optional: Index of last shot

Result

  • list: Array of shot info objects

get_shot(shot_id)

Create a new Shot object for the given shot ID

Arguments

  • shot_id int: Identifier of shot

Result

delete_shot(shot_id, cleanup, closeGap)

Delete the given shot and its associated layers from the Scene

Arguments

  • shot_id int: ID of Shot to be deleted. Note this is not an index
  • cleanup int: Flag indicating whether vertical space left by shot should be reclaimed
  • closeGap int: Flag indicating whether horizontal gap left by shot should be closed

Result

  • No result

insert_bars(barType, duration, where, relativeTo, barsColourSpace, stackColourSpace)

Insert a Bars strip into the Scene

Arguments

  • barType OPERATOR_BARS_TYPE: The type of Bars to insert.
  • duration float: Duration for strip in frames
  • where INSERT_POSITION: Where in the scene the sequence should be inserted.
  • relativeTo Shot Can be None Optional: Shot to insert sequence relative to when using INSERT_BEFORE, INSERT_AFTER, INSERT_ABOVE, or INSERT_BELOW
  • barsColourSpace string Can be None Optional: Name of desired Bars colour space, or NULL to use the default Bars colour space for the barType
  • stackColourSpace string Can be None Optional: Name of desired Stack colour space, or NULL to use the default Stack colour space for the barType

Result

  • Shot: Shot created by inserting Blank into Scene

insert_blank(red, green, blue, duration, where, relativeTo, colourSpace)

Insert a Blank strip into the Scene

Arguments

  • red string: Red component of colour for blank
  • green string: Green component of colour for blank
  • blue string: Blue component of colour for blank
  • duration float: Duration for strip in frames
  • where INSERT_POSITION: Where in the scene the sequence should be inserted.
  • relativeTo Shot Can be None Optional: Shot to insert sequence relative to when using INSERT_BEFORE, INSERT_AFTER, INSERT_ABOVE, or INSERT_BELOW
  • colourSpace string Can be None Optional: Name of desired output colour space, or NULL to use the working colour space

Result

  • Shot: Shot created by inserting Blank into Scene

insert_sequence(sequence, where, relativeTo, colourSpace, format, frameRate)

Insert an image/movie sequence into the Scene

Arguments

  • sequence SequenceDescriptor: SequenceDescriptor for sequence to insert
  • where INSERT_POSITION: Where in the scene the sequence should be inserted.
  • relativeTo Shot Can be None Optional: Shot to insert sequence relative to when using INSERT_BEFORE, INSERT_AFTER, INSERT_ABOVE, or INSERT_BELOW
  • colourSpace string Can be None Optional: Input Colour Space to use for sequence. Leave NULL to determine automatically
  • format string Can be None Optional: Input Format to use for sequence. Leave NULL to use basic format
  • frameRate float Optional: Frame rate to use when inserting an image sequence. If omitted, the working frame rate of the scene will be used.

Result

  • Shot: Shot created by inserting SequenceDescriptor into Scene

insert_text(text, duration, where, relativeTo, alignment)

Insert a Text strip into the Scene

Arguments

  • text string: The text to rendered in the Rop.
  • duration float: Duration for strip in frames
  • where INSERT_POSITION: Where in the scene the sequence should be inserted
  • relativeTo Shot Can be None Optional: Shot to insert sequence relative to when using INSERT_BEFORE, INSERT_AFTER, INSERT_ABOVE, or INSERT_BELOW
  • alignment ROP_TEXT_ALIGN Can be None Optional: Alignment for the text

Result

  • Shot: Shot created by inserting Text into Scene

get_num_marks(type)

Return number of Timeline Marks in Scene

Arguments

  • type string Can be None Optional: If specified, return number of marks of this type

Result

  • int: Number of marks

get_mark_ids(offset, count, type)

Return array of mark ids

Arguments

  • offset int Optional: Offset within list of marks to fetch from
  • count int Optional: Number of Mark objects to fetch, use -1 to fetch all marks
  • type string Can be None Optional: If specified, only return marks of this type

Result

  • list: Array of Mark IDs
    • int: Mark ID

get_mark_ids_in_range(startF, endF, type)

Return array of mark ids within the given frame range in the Scene

Arguments

  • startF int: Start frame in Scene timeline
  • endF int: End frame in Scene timeline (exclusive)
  • type string Can be None Optional: Mark type/category

Result

  • list: Array of Mark IDs
    • int: Mark ID

get_mark(id)

Return Mark object for the given mark ID

Arguments

  • id int: Mark ID

Result

  • Mark: Mark object matching the given mark ID

add_mark(frame, category, note)

Add new Mark to the Scene at the given frame number

Arguments

  • frame int: Frame number
  • category string: Key identifying Mark Category
  • note string Can be None Optional: Note text for mark

Result

  • int: ID of new mark object

delete_mark(id)

Remove Mark object with the given ID

Arguments

  • id int: Mark ID

Result

  • No result

get_metadata_definitions()

Return array of metadata item definitions

Arguments

  • No arguments

Result

  • list: Array of MetadataItems define metadata types defined in scene

add_metadata_defn(name, type)

Add a new Metadata Item field to the Scene

Arguments

  • name string: User-visible name for Metadata Item
  • type string: Data type for Metadata Item

Result

  • MetadataItem: Definition of new Metadata Item, including internal Key created for it

delete_metadata_defn(key)

Delete a Metadata Item field from the Scene

Arguments

  • key string: Key identifying metadata item to delete

Result

  • No result

get_metadata_property_types()

Return list of properties that can be defined for each MetadataItem

Arguments

  • No arguments

Result

get_metadata_defn_property(key, property)

Set the value for the given property for the given metadata item key

Arguments

  • key string: Key identifying metadata item to modify
  • property string: Key identifying which property of the metadata item to get

Result

  • string: Current value for metadata item property

set_metadata_defn_property(key, property, value)

Set the value for the given property for the given metadata item key

Arguments

  • key string: Key identifying metadata item to modify
  • property string: Key identifying which property of the metadata item to set
  • value string: New property value

Result

  • No result

Scene.get_look_names()

Return names of available Looks

Arguments

  • No arguments

Result

  • list: Array of names of looks
    • string: Look name

Scene.get_look_infos()

Get an array of available Looks. Each array entry is a LookInfo object containing the Name and Group for each Look. Explicitly, each entry will contain the following keys:

  • Name - The name of the look. This is unique and used as an identifier
  • Group - The look group for the look

Returns new array of LookInfo objects on success, NULL on error.

Arguments

  • No arguments

Result

  • list: Array of shot info objects

set_transient_write_lock_deltas(enable) BETA

Use to enable (or disable) creation of deltas in a scene where FLAPI does not have the write lock. In particular, this is needed for FLAPI scripts running inside the main application that wish to modify the current scene.

When you open such a delta, you are preventing anything else from being able to make normal scene modifications. You should therefore ensure you hold it open for as short a time as possible. Note also that you should not disable transient deltas while a transient delta is in progress.

Arguments

  • enable int: If non-zero, creation of deltas when FLAPI does not have the write lock will be enabled

Result

  • No result

set_custom_data(data_key, data_value)

Set a custom data value in the scene with the supplied (string) key. Setting a custom data value does not require a delta. Also custom data values are unaffected by undo/redo. Existing custom data values can be deleted from a scene by supplying NULL/None/null as the data value (for an existing key).

Arguments

  • data_key string: Custom data value key
  • data_value any Can be None: New data value for the given key (or NULL/None/null to delete)

Result

  • No result

get_custom_data(data_key)

Get a custom data value from the scene previously set using set_custom_data.

Arguments

  • data_key string: Custom data value key

Result

  • any: Custom data value found

get_custom_data_keys()

Return sorted array of (string) keys that can be used to fetch scene custom data values via get_custom_data.

Arguments

  • No arguments

Result

  • list:
    • string: Key string

SceneSettings

This class provides an interface to get/set scene settings, which affect all Shots in a Scene.

Signals

  • No Signals

Properties

These properties names can be used as keys with the get() and set() methods to read or modify scene settings.

  • WorkingFormat string — Working format of scene
  • WorkingFrameRate float — Working frame rate of scene
  • WorkingFieldOrder FIELDORDER — Working field order
  • WorkingColourSpace string — Name of Working colour space of scene
  • GradeResultColourSpace string — Name of Grade Result colour space
  • InputColourSpace string — Default Input Colour Space for sequences inserted into this scene
  • InputColourSpacePreferAutomatic int — Flag indicating input colour space should be determined automatically from image metadata
  • DisplayRenderingTransform string — Name of Display Rendering Transform used for this scene
  • ApplyInverseDRT int — Flag indicating whether inverse Display Rendering Transform should be used for Display Referred->Scene Referred colour space conversions
  • MasteringColourSpace string — Name of Mastering Colour Space
  • MasteringOperation string — Mastering Operation to perform
  • MasteringWhitePoint string — Name of Mastering White Point
  • StereoMode string — Stereoscopic Mode
  • TimelineCaching string — Timeline Caching mode
  • HDRClipBehaviour string — HDR Clip behaviour for values below 0.0 and above 1.0
  • StartTimecode timecode
  • StartKeycode keycode
  • KeycodeGearing string
  • DolbyVisionMode string
  • DolbyVisionMasteringDisplay string
  • AutoProxySourceResolution string
  • SequenceResamplingMode SEQRESAMPLE_MODE — Mode to use when resampling image sequences of a different frame rate to the working frame rate
  • OpticalFlowQuality OPTICALFLOW_QUALITY — Quality of optical flow interpolation
  • OpticalFlowSmoothing OPTICALFLOW_SMOOTHING — Smoothing factor for optical flow interpolation
  • AutoUpdateFormats int — Flag indicating that formats in this scene should update automatically when global/job formats are changed
  • ImageTransformMode IMAGETRANSFORM_MODE — Image Transform Resampling Mode
  • ImageTransformSharpness float
  • ImageTransformSpace int — Flag indicating whether image transforms are performed in linear or native space
  • ImageTransformClampNegative int — Flag indicating whether negative values are clipped as part of image transform
  • CAT CAT_MODE — Chromatic Adaptation Transform


Methods

get_setting_keys()

Return array of keys that can be used to get/set Scene Settings parameters

Arguments

  • No arguments

Result

  • list:
    • string: Key string

get_setting_definition(key)

Return SceneSettings parameter type definition for the given key

Arguments

  • key string: Key for SceneSettings parameter

Result

get(keys)

Return values for given SceneSettings keys

Arguments

  • keys list: Array of keys
    • string: Key for parameter

Result

  • dict:

get_single(key)

Return value for given SceneSettings key

Arguments

  • key string: SceneSettings Key for value wanted

Result

  • any:

set(values)

Set values for the given SceneSettings keys

Arguments

  • values dict: A dictionary containing new values for the given SceneSettings keys

Result

  • No result

set_single(key, value)

Set value for the given SceneSettings key

Arguments

  • key string: SceneSettings key for value to set
  • value any Can be None: New value for the given SceneSettings key

Result

  • No result

SequenceDescriptor

A SequenceDescriptor represents a movie file (e.g. /vol/bl000-images/myjob/media/A001_C001_00000A_001.R3D) or a sequence of image files (e.g. /vol/bl000-images/myjob/renders/day1_%.7F.exr) on disk. It has a frame range (which does not have to cover the full length of the media on disk) and associated metadata. Audio-only media (e.g. OpAtom MXF audio, or .wav files) is also described using a SequenceDescriptor.

Signals

  • No Signals

Methods

SequenceDescriptor.get_for_template(template, start, end)

Search the filesystem and return zero or more SequenceDescriptors which match the given filename template (e.g. "/vol/images/A001B002.mov" or "/vol/san/folder/%.6F.dpx", and optionally intersecting the given start and end frame numbers.

Arguments

  • template string: Path to the file, using FilmLight %.#F syntax for frame numbering
  • start int Can be None Optional: Start frame number
  • end int Can be None Optional: End frame number (inclusive)

Result

SequenceDescriptor.get_for_template_with_timecode(template, startTC, endTC)

Search the filesystem and return zero or more SequenceDescriptors which match the given filename template (e.g. "/vol/images/A001B002.mov" or "/vol/san/folder/%.6F.dpx", and optionally intersecting the given start and end timecodes.

Arguments

  • template string: Path to the file, using FilmLight %.#F syntax for frame numbering
  • startTC timecode Can be None Optional: Start timecode
  • endTC timecode Can be None Optional: End timecode (inclusive)

Result

SequenceDescriptor.get_for_file(filepath)

Create a SequenceDescriptor for a single file

Arguments

  • filepath string: Path to file

Result

get_start_frame()

Return the first frame number, which does not necessarily correspond with the first frame of the files on disk.

Arguments

  • No arguments

Result

  • int: Frame number

get_end_frame()

Return the last frame number, which does not necessarily correspond with the last frame of the files on disk.

Arguments

  • No arguments

Result

  • int: Frame number

get_start_timecode(index)

Return the timecode at the first frame of the sequence. Some media can support two timecode tracks, so you must specify which one you want (0 or 1).

Arguments

  • index int: Index of timecode track

Result

  • timecode: Start timecode

get_end_timecode(index)

Return the timecode at the last frame of the sequence. Some media can support two timecode tracks, so you must specify which one you want (0 or 1).

Arguments

  • index int: Index of timecode track

Result

  • timecode: End timecode

get_start_keycode()

Return the keycode at the first frame of the sequence.

Arguments

  • No arguments

Result

  • keycode: Start keycode

get_end_keycode()

Return the keycode at the last frame of the sequence.

Arguments

  • No arguments

Result

  • keycode: End keycode

get_start_handle()

Return the first frame number on disk (0 for movie files).

Arguments

  • No arguments

Result

  • int: Frame number

get_end_handle()

Return the last frame number on disk (inclusive).

Arguments

  • No arguments

Result

  • int: Frame number

get_width()

Return the width (in pixels) of the images in this sequence. Returns 0 for audio-only media.

Arguments

  • No arguments

Result

  • int: Width

get_height()

Return the height (in pixels) of the images in this sequence. Returns 0 for audio-only media.

Arguments

  • No arguments

Result

  • int: Height

get_pixel_aspect_ratio()

Return the pixel aspect ratio (width/height) of the images in this sequence. Returns 1.0 if unknown.

Arguments

  • No arguments

Result

  • float: Aspect ratio

get_path()

Return the path to the folder containing this sequence.

Arguments

  • No arguments

Result

  • string: Folder path

get_name()

Return the filename (for a movie) or the filename template (for an image sequence, using FilmLight %.#F syntax for frame numbering), excluding the folder path.

Arguments

  • No arguments

Result

  • string: Name of sequence

get_ext()

Return the filename extension (including the leading '.') for this sequence.

Arguments

  • No arguments

Result

  • string: Extension

get_prefix()

Return filename prefix before numeric component

Arguments

  • No arguments

Result

  • string: Prefix

get_postfix()

Return filename postfix after numeric component

Arguments

  • No arguments

Result

  • string: Postfix

get_format_len()

Return number of digits in numerical component of filename

Arguments

  • No arguments

Result

  • int: Number of digits

get_base_filename_with_F()

Return filename (without path) using FilmLight %.#F syntax for the frame number pattern

Arguments

  • No arguments

Result

  • string: Filename template

get_base_filename_with_d()

Return filename (without path) using printf %0#d syntax for the frame number pattern

Arguments

  • No arguments

Result

  • string: Filename template

get_full_filename_with_F()

Return filename (with path) using FilmLight %.#F syntax for the frame number pattern

Arguments

  • No arguments

Result

  • string: Filename

get_full_filename_with_d()

Return filename (with path) using printf %0#d syntax for the frame number pattern

Arguments

  • No arguments

Result

  • string: Filename

get_base_filename(frame)

Return filename (without path) for the given frame number

Arguments

  • frame int: Frame number

Result

  • string: Filename

get_filename_for_frame(frame)

Return filename (with path) for the given frame number

Arguments

  • frame int: Frame number

Result

  • string: Filename

get_tape(index)

Return the tape name. Some media can support two tracks, so you must specify which one you want (0 or 1).

Arguments

  • index int: Index of timecode track

Result

  • string: Tape name

get_metadata()

Return the metadata read when the sequence was scanned on disk, in human-readable form.

Arguments

  • No arguments

Result

  • dict: Metadata

is_movie()

Return whether sequence is a movie file

Arguments

  • No arguments

Result

  • int: Flag

get_movie_fps()

Return the frame rate of a movie file

Arguments

  • No arguments

Result

  • float: Frame Rate

has_blg()

Return whether sequence has BLG (Baselight Linked Grade) information

Arguments

  • No arguments

Result

  • int: Flag

is_blg()

Return whether sequence is a BLG (Baselight Linked Grade)

Arguments

  • No arguments

Result

  • int: Flag

has_audio()

Return whether movie file has audio

Arguments

  • No arguments

Result

  • int: Flag

get_audio_channels()

Return number of audio channels in movie

Arguments

  • No arguments

Result

  • int: Number of channels

get_audio_sample_rate()

Return audio sample rate (in Hz)

Arguments

  • No arguments

Result

  • int: Sample rate

get_audio_length_in_samples()

Return total number of audio samples in file

Arguments

  • No arguments

Result

  • int: Length

trim_movie(output, start, length)

Create (if possible) a trimmed copy of the movie specified by this descriptor

Arguments

  • output string: Output movie file name
  • start int: Start frame of output movie
  • length int: Number of frames to write to output movie

Result

  • No result

Shot

A shot in Baselight is a set of strips comprising a top strip (typically containing a Sequence operator referencing input media) and the strips lying directly underneath it. These strips apply image-processing and other operations to the top strip.

Signals

  • No Signals

Methods

is_valid()

Called to determine if the shot object references a valid top strip an open scene. A shot object may become invalid in a couple of ways:

  • The scene which it is in is closed.
  • The shot's top strip is removed from the scene's timeline.

Arguments

  • No arguments

Result

  • int: 1 if this shot interface is valid, 0 if not.

get_scene()

Get the scene object which this shot is a part of.

Arguments

  • No arguments

Result

  • Scene: The shot's scene.

get_id()

Get the shot's identifier, an integer which uniquely identifies the shot within the timeline. The id is persistent, remaining constant even if the scene containing the shot is closed and reopened.

Arguments

  • No arguments

Result

  • int: The shot's unique identifier.

get_start_frame()

Get the start frame of the shot within the scene which contains it. Because the time extent of a shot is actually defined by the shot's top strip, the start frame is actually the start frame of the top strip.

Arguments

  • No arguments

Result

  • float: Start frame of the shot (inclusive).

get_end_frame()

Get the end frame of the shot within the scene which contains it. Because the time extent of a shot is defined by the shot's top strip, the end frame is actually the end frame of the top strip. In Baselight, shot extents are defined in floating-point frames and are start-inclusive and end-exclusive. This means that the shot goes all the way up to the beginning of the end frame, but doesn't include it.

So a 5-frame shot starting at frame 100.0 would have an end frame 105.0 and 104.75, 104.9 and 104.99999 would all lie within the shot.

Arguments

  • No arguments

Result

  • float: End frame of the shot (exclusive).

get_poster_frame()

Get the poster frame of the shot within the scene that contains it.

Arguments

  • No arguments

Result

  • float: Poster frame number of the shot.

get_start_timecode()

Get the start record timecode of the shot

Arguments

  • No arguments

Result

  • timecode: Start record timecode of the shot

get_end_timecode()

Get the end record timecode of the shot

Arguments

  • No arguments

Result

  • timecode: End record timecode of the shot (exclusive)

get_timecode_at_frame(frame)

Get the record timecode at the given frame within the shot

Arguments

  • frame int: Frame relative to start of shot

Result

  • timecode: Record timecode for frame

get_src_start_frame()

Return start frame number within source sequence/movie

Arguments

  • No arguments

Result

  • int: Frame number

get_src_end_frame()

Return end frame number within source sequence/movie (exclusive)

Arguments

  • No arguments

Result

  • int: Frame number

get_src_start_timecode()

Return start timecode within source sequence/movie

Arguments

  • No arguments

Result

  • timecode: Start source timecode

get_src_end_timecode()

Return end timecode within source sequence/movie (exclusive)

Arguments

  • No arguments

Result

  • timecode: End source timecode

get_src_timecode_at_frame(frame)

Return source timecode at the given frame within the shot

Arguments

  • frame int: Frame number relative to start of shot

Result

  • timecode: Timecode for given frame

get_src_start_keycode()

Return start keycode within source sequence/movie

Arguments

  • No arguments

Result

  • keycode: Start source keycode

get_src_end_keycode()

Return end keycode within source sequence/movie (exclusive)

Arguments

  • No arguments

Result

  • keycode: End source keycode

get_input_colour_space(eye)

Return the input colour space defined for this shot. Can be 'None', indicating no specific colour space defined. For RAW codecs, this may be 'auto' indicating that the input colour space will be determined by the SDK used to decode to the image data. In either case the actual input colour space can be determined by call get_actual_input_colour_space().

Arguments

  • eye STEREO_EYE Optional: Find input colour space for the given eye in a stereo sequence

Result

  • string: Colour space name, or 'auto'

set_input_colour_space(name, eye)

Set the input colour space

Arguments

  • name string: Input colour space name, or 'Auto'
  • eye STEREO_EYE Optional: Input colour space for the given eye in a stereo sequence

Result

  • No result

set_stack_colour_space(name, eye)

Set the stack colour space

Arguments

  • name string: Stack colour space name, or 'Auto' to use the scene's working space, or 'None' to use the sequence's input colour space.
  • eye STEREO_EYE Optional: Stack colour space for the given eye in a stereo sequence

Result

  • No result

get_actual_input_colour_space(eye)

Return the input colour space for this shot. If the input colour space is set to 'Auto', the actual colour space name will be returned.

Arguments

  • eye STEREO_EYE Optional: Input colour space for the given eye in a stereo sequence

Result

  • string: Colour space name

get_input_format(eye)

Return the input format name for this shot

Arguments

  • eye STEREO_EYE Optional: Input colour space for the given eye in a stereo sequence

Result

  • string: Format name

set_input_format(name, eye)

Set the input format name for this shot

Arguments

  • name string: Format name
  • eye STEREO_EYE Optional: Input colour space for the given eye in a stereo sequence

Result

  • No result

get_input_video_lut(eye)

Return the input video lut value for this shot

Arguments

  • eye STEREO_EYE Optional: Input video LUT for the given eye in a stereo sequence

Result

  • VIDEOLUT: Input Video LUT (either VIDEOLUT_NONE or VIDEOLUT_UNSCALE) or NULL/None/null if an input video LUT is inappropriate for the shot's current media type and input colour space settings (indicated by the "Legal to Full Scale" button not being present in the Baselight Sequence operator UI.

set_input_video_lut(video_lut, eye)

Set the input video LUT for this shot

Arguments

  • video_lut VIDEOLUT: Video LUT to be applied to the input sequence. The only permitted values for this method are VIDEOLUT_UNSCALE and VIDEOLUT_NONE.
  • eye STEREO_EYE Optional: Input video LUT for the given eye in a stereo sequence

Result

  • No result

get_frame_rate()

Return the frame rate of the Sequence for this shot

Arguments

  • No arguments

Result

  • float: Frame rate

get_metadata(md_keys)

Get metadata values for the keys provided. The possible keys and the value type for each key are obtained using the Scene.get_metadata_definitions method.

Arguments

  • md_keys set: Set of metadata keys whose values are required.

Result

  • dict: Key/value pairs containing the metadata obtained.

get_metadata_strings(md_keys)

Get metadata values expressed as strings for the keys provided. The possible keys are obtained using the Scene.get_metadata_definitions method.

Arguments

  • md_keys set: Set of metadata keys whose values are required.

Result

  • dict: Key/value pairs containing the metadata obtained. All the values will have been converted to strings.

set_metadata(metadata)

Set metadata values for the keys provided. The possible keys and the value type for each key are obtained using the Scene.get_metadata_definitions method.

Arguments

  • metadata dict: Key/value pairs of metadata to assign in the shot.

Result

  • No result

get_sequence_descriptor()

Get a SequenceDescriptor object that represents the input media for this shot.

Arguments

  • No arguments

Result

supports_client_event_data()

Does this shot support client event lists/data.

Arguments

  • No arguments

Result

  • int: 1 if the shot supports client event data, otherwise 0.

get_client_event_list(list_frame)

Get array of client events (notes/flags) for either an entire shot, or a specific frame of a shot. When querying the event list at a specific frame, NULL/None/null will be returned if no event list exists at that frame or the shot. The events array returned will be chronologically sorted (oldest first). Each event entry is itself a dictionary describing that event.

Arguments

  • list_frame int Can be None Optional: Identifies which event list to return; either for the entire shot (if no list_frame supplied), or for a specific, shot start relative frame number

Result

  • list: Array of client events for the shot.
    • dict: Client event entry.
      • ClientName string: The name of the client that added the entry.
      • EventId int: Identifier used to modify/delete this event.
      • EventType string: The event type. Currently either "Note" or "Flag".
      • NoteText string Can be None: Only valid when "EventType" value is "Note". The note text.
      • RelativeTimeString string: Time the entry was created as a formatted as a user friendly string (eg. "Tuesday 17:25").
      • Source string: Source of the event. Either "FLAPI" if event was added from an external source, or "Application" if added from the Filmlight host application.
      • Time int: Time the entry was created (in seconds since 1/1/70 UTC).

add_client_note(client_name, note_text, event_list_frame)

Add a client note to either the client event list for an entire shot, or to the client event list at a specific frame number.

Arguments

  • client_name string: Name of client adding the note.
  • note_text string: Note text.
  • event_list_frame int Can be None Optional: Client event list frame number, or NULL/None/null for the entire shot's client event list

Result

  • int: Event identifier which can be used to edit/delete the note later.

add_client_flag(client_name, event_list_frame)

Add a new client flag entry to either the client event list for an entire shot, or to the client event list at a specific frame number. A client event list only supports a single flag event for a given client name; If one already exists, a call to this method will replace it with a new one.

Arguments

  • client_name string: Name of client flagging the shot.
  • event_list_frame int Can be None Optional: Client event list frame number, or NULL/None/null for the entire shot's client event list

Result

  • int: Event identifier which can be used to remove the flag later.

delete_client_event(event_id)

Delete the (note or flag) event with the supplied id from the shot's client event list.

Arguments

  • event_id string: Event list identifier of event to delete.

Result

  • int: 1 on success, 0 if no event found.

set_client_event_metadata(client_event_id, metadata)

Set custom metadata key/value pairs for the client event with the supplied ID.

Arguments

  • client_event_id int: ID of client event
  • metadata dict: Key/value pairs containing the metadata for the client event.

Result

  • No result

get_client_event_metadata(client_event_id, md_keys)

Get custom metadata key/value pairs for the client event with the supplied ID.

Arguments

  • client_event_id int: ID of client event
  • md_keys set Can be None Optional: Set of metadata keys whose values are required, or NULL/None/null for all metadata.

Result

  • dict: Key/value pairs containing the metadata for the client event.

delete_client_event_metadata(client_event_id, metadata_key)

Delete a single metadata key/value item from the client event with the supplied ID.

Arguments

  • client_event_id int: ID of client event
  • metadata_key any: Key of metadata item to remove from client event.

Result

  • No result

get_client_event_list_frames()

Get array of (shot start relative) frame numbers of frames with client event lists

Arguments

  • No arguments

Result

  • list: Array of frames with client event lists
    • int: frame number

delete_frame_client_event_list(list_frame)

Delete the entire client event list at the given shot frame (if any).

Arguments

  • list_frame int: Frame number of frame containing the event list

Result

  • No result

get_client_data_summary()

Get summary info on any client data associated with this shot.

Arguments

  • No arguments

Result

  • dict: Client summary info
    • Clients dict: Dictionary containing client name keys/entries for all clients who have added data to this shot. The value associated with each key is a set containing all the types of data that client has added ("Note" and/or "Flag").

get_num_marks(type)

Get number of marks within shot. If type is supplied, only return number of marks of the given type

Arguments

  • type string: Mark type

Result

  • int: Number of marks

get_mark_ids(offset, count, type, eye)

Get shot mark ids within the shot. Shot marks are marks which are attached to the shot's top strip. If type is specified, only return marks of matching type.

Arguments

  • offset int Optional: Offset into array of marks
  • count int Optional: Number of marks to fetch, pass -1 to fetch all
  • type string Can be None Optional: Mark type, which is a category name. Only shot marks of this type will be returned. If not provided, all marks within the shot will be returned. Possible categories for marks can be obtained using the Scene.get_mark_categories method.
  • eye STEREO_EYE Optional: Which eye to get marks for stereo sequence

Result

  • list: Array of Mark IDs
    • int: Mark ID

get_mark(id)

Get Mark object for given ID

Arguments

  • id int: Mark ID

Result

add_mark(frame, category, note, eye)

Add new Mark to the shot at the given source frame

Arguments

  • frame int: Source frame number
  • category string: Mark category
  • note string Can be None Optional: Mark note text
  • eye STEREO_EYE Optional: Which eye to add mark for in stereo sequence

Result

  • int: Mark ID

delete_mark(id, eye)

Delete the Mark object with the given mark ID

Arguments

  • id int: Mark ID
  • eye STEREO_EYE Optional: Which eye to delete mark for in stereo sequence

Result

  • No result

get_categories()

Get the set of categories assigned to this shot.

Arguments

  • No arguments

Result

  • set: Set of category keys. The Scene.get_category method can be used to obtain information (such as the UI colour and user-readable name) about a given category key.

set_categories(categories)

Set the categories assigned to this shot

Arguments

  • categories set: Set of category keys to be assigned to the shot.

Result

  • No result

insert_blg_stack(blg_path)

Insert a BLG stack at the bottom of the shot.

Arguments

  • blg_path string: Path to the BLG to be applied to the shot.

Result

  • No result

get_blg_payload()

Returns the BLG payload for this shot.

Arguments

  • No arguments

Result

  • string: String containing the payload.

apply_blg_payload(blg_payload, blg_resources)

Insert a BLG stack at the bottom of the shot.

Arguments

  • blg_payload string: A BLG payload as returned by get_blg_payload().
  • blg_resources string: BLG resources as returned by get_blg_resources().

Result

  • No result

get_blg_resources()

Returns the BLG resources for this shot.

Arguments

  • No arguments

Result

  • string: String containing the resources.

insert_basegrade_layer(values)

Insert a BaseGrade layer at the bottom of the stack.

Arguments

  • values dict: A dictionary containing new values for the given BaseGrade parameters. Valid keys are BalanceExposure, BalanceA, BalanceB, Flare, Saturation, Contrast, LightExposure, LightA, LightB, DimExposure, DimA, DimB, BrightExposure, BrightA, BrightB, DarkExposure, DarkA, DarkB, ContrastPivot, LightPivot, LightFalloff, DimPivot, DimFalloff, BrightPivot, BrightFalloff, DarkPivot, DarkFalloff, LightSaturation, DimSaturation, BrightSaturation, DarkSaturation

Result

  • No result

insert_cdl_layer(cdl_values)

Insert a CDLGrade layer at the bottom of the shot.

Arguments

  • cdl_values list: CDL values (Slope R, Slope G, Slope B, Offset R, Offset G, Offset B, Power R, Power G, Power B, Saturation).
    • float:

Result

  • No result

insert_cdl_layer_above(cdl_values)

Insert a CDLGrade layer at the top of the shot.

Arguments

  • cdl_values list: CDL values (Slope R, Slope G, Slope B, Offset R, Offset G, Offset B, Power R, Power G, Power B, Saturation).
    • float:

Result

  • No result

insert_look_layer(look_name)

Insert a Look kayer at the bottom of the shot.

Arguments

  • look_name string: Name of the Look to be inserted.

Result

  • No result

insert_truelight_layer(lut_path)

Insert a Truelight layer at the bottom of the shot. The Truelight operator is used for applying 1D and 3D LUTs to an image.

Arguments

  • lut_path string: Path to the LUT file to be set in the newly created Truelight operator.

Result

  • No result

insert_shape_layer_from_svg(svg_path, fit_mode, mask_format, mask_name)

Insert a layer with a shape strip populated from an SVG file at the bottom of the shot.

Arguments

  • svg_path string: Path to the SVG file used to populate the layer's shape strip.
  • fit_mode SVGFITMODE: Controls how an SVG is transformed/fitted into the shape strip.
  • mask_format string Optional: Fit to this format and mask (supplied in 'mask_name' parameter). If set, the SVG will be transformed/fitted to this format's mask area mapped to the working format area. If none supplied, the SVG will be transformed/fitted to the entire working format area.
  • mask_name string Optional: Mask name (from the 'mask_format'). This may be used to further constrain fitting of the SVG to the working format area (see above).

Result

  • No result

insert_colour_space_layer(toColourSpace, drt, identify)

Insert a ColourSpace operator at the bottom of the stack for this shot

Arguments

  • toColourSpace string: Name of Output Colour Space
  • drt string Optional: Name of DRT to use when converting between scene-referred and display-referred colour spaces. Default is 'scene' which uses Scene's current Display Render Transform.
  • identify int Optional: Set to 1 to indicate the Colour Space operator is being used to tag/identify the colour space at this point in the stack, without any colour conversions. This would be applicable when using the Colour Space operator after a Truelight operator.

Result

  • No result

insert_lut_layer(location, file, inputColourSpace, outputColourSpace, inputLegalRange, outputLegalRange, tetrahedral)

Insert a LUT operator at the bottom of the stack for this shot

Arguments

  • location LUT_LOCATION: Specify where LUT data is stored.
  • file string Can be None: Path to LUT file. You can use %C/ to use a path relative to the Scene's container.
  • inputColourSpace string: Name of Input Colour Space for this LUT. Can be 'Input' to use the input colour space of the Shot, or 'Auto' to use the working colour space of the Scene.
  • outputColourSpace string: Name of Output Colour Space for this LUT. Can be 'Auto' to use the LUT input colour space.
  • inputLegalRange int Optional: Flag indicating that input to LUT is expected to be video-legal range. Defaults to 0 to indicate full-range.
  • outputLegalRange int Optional: Flag indicating that output of LUT is video-legal range. Defaults to 0 to indicate full-range.
  • tetrahedral int Optional: Flag indicating that high-quality tetrahedral interpolation should be used.

Result

  • No result

delete_all_layers()

Remove all layers from the shot.

Arguments

  • No arguments

Result

  • No result

get_codec()

Method to obtain the codec of the input media of the shot.

Arguments

  • No arguments

Result

  • string: A short string containing the codec name, or NULL if the codec couldn't be determined.

Shot.get_decode_parameter_types()

Return list of supported decode parameter codec keys

Arguments

  • No arguments

Result

  • list: Array of supported decode parameter codec keys
    • string: Decode Parameter codec key

Shot.get_decode_parameter_type_for_codec(codec)

Return the key identifying the decode parameters type to use for the given video codec

Arguments

  • codec string: Name of codec

Result

  • string: Decode Parameter type key

Shot.get_decode_parameter_definitions(decode_type)

Static method called to obtain the image decode parameter definitions for a given codec. The decode parameters are used to control how an RGBA image is generated from RAW formats like ARRIRAW, R3D etc.

This method returns an array of image decode parameter definitions for a given decode parameter type, one per parameter. Each parameter definition is a collection of key/value pairs, with different entries dependent on the type of parameter.

Arguments

  • decode_type string: Type of decode parameter definitions to be obtained

Result

get_decode_parameters()

This method returns the image decode parameters for the shot.

Arguments

  • No arguments

Result

  • dict: Key/value pairs containing the current decode parameters. The meaning of the various keys can be discovered using the Shot.get_decode_parameter_definitions static method.

set_decode_parameters(decode_params)

Set some or all of the image decode parameters for the shot.

Arguments

  • decode_params dict: Key/value pairs containing new decode parameter values. The allowable keys and valid values for those keys can be discovered using the get_decode_parameter_definitions static method. It is not necessary to specify all the parameters - any parameters not set will remain untouched.

Result

  • No result

get_audio_settings()

Return the audio settings defined for this shot. Returns NULL if the shot has no audio defined.

Arguments

  • No arguments

Result

set_audio_settings(audio_settings)

Set the audio settings for this shot.

Arguments

Result

  • No result

ThumbnailManager

Interface used to generate shot thumbnails

Signals

  • No Signals

Methods

ThumbnailManager.get_poster_uri(shot_if, options)

Get a poster (or specific) frame thumbnail URI for a shot

Arguments

  • shot_if Shot: Shot interface object
  • options dict: Stucture containing optional settings used to control the type of thumbnail image rendered.
    • DCSpace string Optional: Display colourspace (sRGB or P3)
    • Graded int Optional: Graded/ungraded flag
    • HiRes string Optional: Flag indicating hi-res image preferable
    • ShotFrame int Optional: Optional timeline frame number (constrained to shot range)

Result

  • string: Thumbnail URI

ThumbnailManager.get_scrub_uri_template(scene_if, shot_id, options)

Get a scrub image URI template (prefix & suffix strings). This can be used while scrubbing to generate image URIs without additional roundtrips/calls to the server.

Arguments

  • scene_if Scene: Scene interface object
  • shot_id Shot: ID of shot in scene
  • options dict: Stucture containing optional settings used to control the type of scrub image rendered.
    • DCSpace string Optional: Display colourspace (sRGB or P3)
    • Graded int Optional: Graded/ungraded flag
    • HiRes string Optional: Flag indicating hi-res image preferable

Result

  • list: Template array containing 2 strings; a URI prefix & suffix. To form a completeURI, the scrub frame number required should be inserted between these 2 strings.
    • string:

Timer (BETA)

A Timer allows your script to be triggered periodically to perform processing BETA

Signals

Methods

Timer.create(interval, repeat)

Create a new Timer object

Arguments

  • interval int: Number of milliseconds between timer ticks firing
  • repeat int Optional: Flag indicating whether timer should repeat after interval elapses

Result

start()

Start timer running

Arguments

  • No arguments

Result

  • No result

is_started()

Inquire if timer is started

Arguments

  • No arguments

Result

  • int: Flag indicating whether timer is started

stop()

Stop timer firing

Arguments

  • No arguments

Result

  • No result

get_interval()

Return interval between timer ticks firing

Arguments

  • No arguments

Result

  • int: Interval in milliseconds

set_interval(interval)

Set interval between timer ticks firing

Arguments

  • interval int: Interval in milliseconds

Result

  • No result

Utilities

Utility functions

Signals

  • No Signals

Methods

Utilities.timecode_from_string(str, fps, wraphour)

Convert string to Timecode

Arguments

  • str string: Timecode in string form
  • fps int Can be None Optional: FPS
  • wraphour int Optional: Hour at which timecode is considered to wrap around, defaults to 24. Set this to 0 to disable timecode wrapping.

Result

  • timecode: Timecode parsed from string

Utilities.get_allowed_enum_values(enumType)

Returns an array of EnumInfo objects representing the allowed values for a given enumeration type. Explictly, each returned entry has two fields: * Value - The (unique) internal value. * Desc - The user-friendly description for the value (so that you would typically present Desc to the user and use Value in calls to FLAPI functions).

Arguments

  • enumType string: The name of the enumerated type. e.g. CUBEEXPORT_LUTFORMAT

Result

  • list: Array of EnumInfo objects

Volumes

Query and configure storage for this system

Signals

  • No Signals

Methods

Volumes.get_volume_keys()

Return keys for volumes accessible from this system

Arguments

  • No arguments

Result

  • list: Array of volume keys
    • string: Key

Volumes.get_local_volume_keys()

Return volumes defined locally on this system

Arguments

  • No arguments

Result

  • list: Array of volume keys
    • string: Key

Volumes.get_volume_info(keys)

Return VolumeInfo describing the volume with the given key

Arguments

  • keys list: Array of volume keys
    • string: Key identifying volume

Result


Value Types


APIUserInfo

Settings for an API user

Fields

  • Login string: Login name
  • Name string: Name
  • Permissions set: Set of permissions assigned to this user
  • Enabled int: Is this user currently enabled

AudioSequenceSettings

Settings defining the behaviour of an Audio Sequence

Fields

  • Type AUDIOSEQ_TYPE: Type of Audio Sequence
  • Filename string: Filename for audio
  • Stems list:
    • string: Filenames of audio stems
  • Offset Rational: Audio Offset in seconds
  • Ratio string: Audio ratio. Allowed values are "1:1", "24:25", "25:24", "1000:1001", "1001:1000", "23.98:23.976"

AudioSyncProgress

Progress information from audio sync operation

Fields

  • Status AUDIOSYNCSTATUS
  • Summary string: String summarising the progress information
  • ShotID int Can be None Optional: Shot ID that this progress information relates to
  • Frame int Can be None Optional: Frame number within timeline

AudioSyncSettings

Settings to use for AudioSync operation

Fields

  • Criteria AUDIOSYNC_CRITERIA: Search For
  • Timecode timecode: Value for Timecode
  • Scene string: Value for Scene
  • Take string: Value for Take
  • Directory string: Directory
  • SubSearch AUDIOSYNC_SUBSEARCH: Search in
  • Subdirs string: Value for Subdirs
  • FPS AUDIOSYNC_FPS: Audio TC FPS
  • Offset float: Offset
  • Metadata AUDIOSYNC_METADATA: Read Metadata
  • ClapDetect int: Clap Detect, flag indicating true or false
  • ClapDetectThreshold float: Threshold
  • Ratio AUDIOSYNC_RATIO: Ratio
  • ReadLTC AUDIOSYNC_READLTC: Read LTC
  • LTCIndex int: Number
  • LTCColumn string: Into Column
  • AutoSync int: Value for AutoSync, flag indicating true or false

BLGExportSettings

Settings to use for BLG exports

Fields

  • Source EXPORT_SOURCE: Export BLGs for
  • Filter string: Tab/Filter
  • Category set: Category
  • CategoryMatch EXPORT_CATEGORYMATCH: Shots Must Match
  • Frames EXPORT_FRAMES: Frames
  • MarkCategory set: Mark Category
  • Stereo EXPORT_STEREO: Stereo
  • Directory string: Export Directory
  • Overwrite EXPORT_OVERWRITE: Existing BLGs
  • Path string:
  • Template string: Value for Template
  • Scale BLGEXPORT_SCALE: Value for Scale
  • AllowMultiInput int: Allow Multi-Input BLGs, flag indicating true or false
  • GenerateNukeScripts int: Generate Nuke Scripts, flag indicating true or false
  • GenerateWriteNode int: Value for GenerateWriteNode, flag indicating true or false
  • Keyframes int: Include Keyframes, flag indicating true or false
  • LockGrade BLGEXPORT_LOCKGRADE: Lock Grade
  • ViewingColourSpace string: Viewing Colour Space
  • ViewingFormat string: Viewing Format

CDLExportSettings

Settings to use for CDL exports

Fields


CategoryInfo

Definition of a Category used to annotate marks, shots or strips

Fields

  • Key string: Key used to identify this category
  • Name string: User-visible name for this category. For user-added categories, 'Name' will always match 'Key', but some built-in categories will have different keys and names (e.g "DefaultStripCat" and "Default Strip Category").
  • ReadOnly string: Is this category built-in and immutable
  • Colour list: Default colour associated with this category
    • float: RGBA components

ClientViewClientSettings

Settings for a connected Client View

Fields

  • StreamIndex int: Stream index, or -1 if streaming disabled
  • StreamConfigsAge int: 'Age' value incremented when a stream's configuration value changes.
  • NotesEnabled int: Flag set if the Client View can add/edit notes and flags
  • LaserEnabled int: Flag set if the Client View has a laser pointer (if streaming enabled)
  • Debug int:

ClientViewHostUserSettings

Settings for user hosting the Client View

Fields

  • UserName string: Host user's name
  • LaserColour list: Host user's laser pointer colour (0->1 per component).
    • float: RGB Components

ClientViewStreamSettings

Settings for a Client View stream

Fields

  • Resolution string: Stream resolution string eg. '1920x1080'
  • Bitrate int: Integer bitrate in Mbit/s
  • ColourSpace string: Either 'P3', 'sRGB' or 'HDR'

ColourSpaceInfo

Description of a Truelight Colour Space

Fields

  • Name string: Colour Space Name
  • DisplayName string: User-visible Colour Space Name
  • Type string: Type of Colour Space ("scene","display","any")

ConnectionInfo

Dictionary describing a single connection.

Fields

  • ConnectionID int: Connection ID. Note: This can be obtained for a specific connection via a FLAPI Connection's 'get_connection_id()' method
  • UserName string: Connected user/client name
  • UsageType string: Usage type declared by a connection ('Unknown' if none explicitly set)

CubeExportSettings

Settings to use for Cube exports

Fields


CustomerInfo

Dictionary containing customer related settings/preferences.

Fields

  • Name string: Customer name
  • LogoURI string: URI of customer logo
  • WebsiteURL string: URL to customer website

DRTInfo

Description of a Truelight Display Rendering Transform

Fields

  • Name string: Display Render Transform Name
  • InputSpace string: Name of required Input Colour Space
  • OutputSpace string: name of result Output Colour Space
  • ViewingConditions list: Array of Viewing Condition names for the Display Rendering Transform
    • string: Viewing Condition Name

DecodeParameterChoice

Fields

  • Value any: Value for this decode parameter value choice. Can be an Integer, Float or String
  • Label string: User-friendly label for this value

DecodeParameterDefinition

This type is returned by get_decode_parameter_definitions to define the data type, label, ranges and values for each decode parameter that can be get or set for a Shot.

Fields

  • Parameter string: Key to use in get_decode_parameters and set_decode_parameters
  • Type DECODEPARAM_TYPE: Data type for this parameter
  • Default any: Default value for this parameter
  • Label string: User-friendly label for this parameter
  • Min any: Minimum value for Integer or Float parameters
  • Max any: Maximum value for Integer or Float parameters
  • Choices list: Array of possible values for Choice parameters

DialogItem (BETA)

Definition of an item to be shown in a DynamicDialog BETA

Fields

  • Key string: Key used to identify value for item in settings dictionary
  • Label string: Label to show for item
  • Type DIALOG_ITEM_TYPE: Type of dialog item
  • Help string: Help text describing this dialog item
  • Default any Can be None: Default value for this item
  • Options list: Array of items to show in list
  • RegExp string Can be None: Regular expression to filter files shown in browsers
  • Password int: Password mode for String type
  • IntMin int: Minimum value for Integer type
  • IntMax int: Maximum value for Integer type
  • FloatMin float: Minimum value for Float type
  • FloatMax float: Maximum value for Float type
  • FloatSnap float: Minimum interval between Float values
  • Style any Can be None: Define the style for this dialog item
  • Height int Optional: Height of this item

EnumInfo

Information about a defined enumerated value

Fields

  • Value string: Internal Value of Enum
  • Desc string: User friendly description of value

ExportOpInfo

This type is returned to return information about export operations queued via QueueManager

Fields

  • ID int: Queue operation ID
  • Log list:
    • string: All messages reported during the export operation

ExportProgress

Progress information from Export operation

Fields

  • Status EXPORTSTATUS
  • Summary string: String summarising the export information
  • ShotID int Can be None Optional: Shot ID that this progress information relates to
  • Frame int Can be None Optional: Frame number within timeline

FormatBurninItem

Definition of a text element within a FormatBurnin

Fields

  • Type BURNIN_ITEM_TYPE: Item type
  • X float: X position in pixels
  • Y float: Y position in pixels
  • XAlign BURNIN_HALIGN: Horizontal alignemnt of text item
  • YAlign BURNIN_VALIGN: Vertical alignment of text item
  • Box BURNIN_BORDER: Box drawn around text item
  • Height float: Height of text item in pixels
  • Text string: Content of text item
  • XScale float: X Scale factor of image item
  • YScale float: Y Scale factor of image item
  • ResX int: Width of image item in pixels
  • ResY int: Height of image item in pixels
  • Opacity float: Opacity of image item
  • File string: Path to image item

FormatInfo

Specifies the width, height, pixel aspect ratio

Fields

  • Width int: Width of format in pixels
  • Height int: Height of format in pixels
  • PixelAspectRatio float: Aspect ratio of width-to-height for each pixel

FormatMapping

Defines the mapping from one Format to another Format

Fields

  • sx float: X scaling factor
  • sy float: Y scaling factor
  • tx float: X translation
  • ty float: Y translation
  • inside int: Flag indicating whether mapping is inside or outside of destination format
  • src_mask string: Name of source mask
  • dst_mask string: Name of destination mask

FormatMask

Specifies the area of Mark defined with a Format

Fields

  • Name string: Name of mask
  • XMin int: Minimum X coordinate of mask within Format coordinate space
  • XMax int: Maximum X coordinate of mask within Format coordinate space
  • YMin int: Minimum Y coordinate of mask within Format coordinate space
  • YMax int: Maximum Y coordinate of mask within Format coordinate space

FrameRange

Defines a range of frames

Fields

  • Start int: Start Frame
  • End int: End Frame (inclusive

KeyTextItem

A mapping for a key object to a user-readable string describing that key

Fields

  • Key any:
  • Text string: User-readable string describing this key

LicenceItem

Description of a installed licence option

Fields

  • Product string: Product Name
  • Version string: Product Version Number
  • Options list: Array of licence options for product
    • string: Licence Option
  • Permanent int: Flag indicating whether licence item is permanent
  • Start string: Start date
  • Duration int: Number of days license is valid for from start date
  • DaysLeft int: Number of days until licence option expires

LookInfo

Information for a Look

Fields

  • Name string: Name of Look
  • Group string: Name of the group containing the look

MetadataItem

Definition of a Metadata field that exists across all shots in a Scene

Fields

  • Key string: Key used to retrieve metadata value
  • Name string: User-visible name for metadata item
  • Type string: Data Type of metadata item
  • NumElements int: Number of data values for this metadata field. If NumElements greater than 1, the values for this metadata field will be contained in an array.
  • IsReadOnly int: Flag indicating whether this metadata item is read-only
  • IsUserDefined int: Flag indicating whether this metadata item is user-defined, or pre-defined by the application
  • Properties dict: Properties associated with this metadata field

MetadataProperty

Definition of a Property that can specified for each MetadataItem defined in a Scene

Fields

  • Key string: Key used to identify metadata item property
  • Name string: User-visible name for metadata property

MultiPasteProgress

Progress information from Multi-Paste operation

Fields

  • Status MULTIPASTESTATUS
  • Summary string: String summarising the progress information
  • ShotID int Can be None Optional: Shot ID that this progress information relates to
  • Frame int Can be None Optional: Frame number within timeline

MultiPasteSettings

Settings to use for MultiPaste operation

Fields

  • Source MULTIPASTE_SOURCE: Specify source of grade or metadata for Multi-Paste.
  • SourceScenes list: Specify list of database scene names to use as source of grades and metadata. Applicable when "Source" is set to MULTIPASTE_SOURCE_MULTIPLESCENES.
    • string: Scene name
  • SourceDirectory string: Specify directory to search for grades or metadata. Applicable when "Source" is set to MULTIPASTE_SOURCE_BLG.
  • SourceEDL string: Specify EDL filename to read metadata from. Applicable when "Source" is set to MULTIPASTE_SOURCE_EDL.
  • EDLApplyASCCDL MULTIPASTE_EDLAPPLYASCCDL: Whether or not to apply any CDL values found in the EDL. Applicable when "Source" is set to MULTIPASTE_SOURCE_EDL.
  • ASCCDLLayerNumber int: Layer number for CDL grade layers added when multi-pasting from an EDL. Applicable when "Source" is set to MULTIPASTE_SOURCE_EDL.
  • ASCCDLColour list: Array of RGBA values
    • float: RGBA component
  • ASCCDLCategories set: Categories assigned to CDL grade layers added when multi-pasting from an EDL. Applicable when "Source" is set to MULTIPASTE_SOURCE_EDL.
  • BLGResourceConflict MULTIPASTE_BLGRESOURCECONFLICT: Conflict resolution algorithm used when resources imported when multi-pasting from BLG files conflict with existing resources. Applicable when "Source" is set to MULTIPASTE_SOURCE_BLG.
  • DestSelection MULTIPASTE_DESTSELECTION: Destination
  • LUTDirectory string: Specify directory to search for LUT files. Applicable when "Source" is set to MULTIPASTE_SOURCE_LUT.
  • LUTLayerNum int: Layer number for Truelight layers added when multi-pasting LUTs. Applicable when "Source" is set to MULTIPASTE_SOURCE_LUT.
  • LUTLayerColour list: Array of RGBA values
    • float: RGBA component
  • LUTCategories set: Categories assigned to Truelight layers added when multi-pasting from LUTs. Applicable when "Source" is set to MULTIPASTE_SOURCE_LUT.
  • CDLDirectory string: Specify directory to search for CDL/CCC files. Applicable when "Source" is set to MULTIPASTE_SOURCE_CDL.
  • CDLLayerNum int: Strip colour of CDL grade layers added when multi-pasting CDL/CCC files. Applicable when "Source" is set to MULTIPASTE_SOURCE_CDL.
  • CDLLayerColour list: Array of RGBA values
    • float: RGBA component
  • CDLCategories set: Categories assigned to CDL grade layers added when multi-pasting from CDL/CCC files. Applicable when "Source" is set to MULTIPASTE_SOURCE_CDL.
  • MatchBy list: Array of sort criteria
  • MatchQuality MULTIPASTE_MATCHQUALITY: Whether or not metadata needs to match exactly, or if a "fuzzy" match is permissible.
  • PasteGrades int: Whether or not any grade stacks found in the source data are to be pasted., flag indicating true or false
  • LayerZeroBehaviour MULTIPASTE_LAYERZEROBEHAVIOUR: If "PasteGrades" is 1, specifies what exactly which parts of the grade stack should be copied.
  • LayerZeroOverwrite int: If "LayerZeroBehaviour" is MULTIPASTE_LAYERZEROBEHAVIOUR_LAYERZEROANDSTACK or MULTIPASTE_LAYERZEROBEHAVIOUR_LAYERZEROONLY, how copied layer 0 operators should be merged with the existing operators., flag indicating true or false
  • LayerZeroAudio int: Whether or not Audio Sequence operator is pasted into the destination scene., flag indicating true or false
  • InputColourSpace int: If layer 0 is be copied, whether or not to copy the input colour space in layer 0's Sequence operator., flag indicating true or false
  • SourceShots MULTIPASTE_SOURCESHOTS: Whether or not to narrow down the source layers to be copied based on category.
  • SourceShotCategories set: Specifies a set of categories. Only applicable if "SourceShots" is MULTIPASTE_SOURCESHOTS_COPYALLEXCEPTCATS or MULTIPASTE_SOURCESHOTS_COPYONLYCATS.
  • DestShots MULTIPASTE_DESTSHOTS: Whether or not to specify the destination layers to be overwritten or retained based on category.
  • DestShotCategories set: Specifies a set of categories. Only applicaable if "DestShots" is MULTIPASTE_DESTSHOTS_OVERWRITEALLEXCEPTCATS or MULTIPASTE_DESTSHOTS_RETAINALLEXCEPTCAT.
  • DetectGradeChanges int: Whether or not to mark shots whose grade has changed as a result of the multi-paste with a category., flag indicating true or false
  • GradeChangedCategory string: A category to be applied to shots whose grade has changed. Only applicable if "DetectGradeChanges" is 1.
  • ClearUnchangedGrades int: Whether or not to remove the category specified by "GradeChangedCategory" if a shot's grade is not changed by the multi-paste. Only applicable if "DetectGradeChanges" is 1., flag indicating true or false
  • PasteLocation MULTIPASTE_PASTELOCATION: Where strips pasted are to be located.
  • MaintainTracks int: Whether tracks are to be maintained., flag indicating true or false
  • LayerZeroCategories MULTIPASTE_LAYERZEROCATEGORIES: Whether or not layer 0 categories are to be pasted.
  • LayerZeroExcludeCategories set: A set of categories. Only applicable if "LayerZeroCategories" is MULTIPASTE_LAYERZEROCATEGORIES_INCLUDE or MULTIPASTE_LAYERZEROCATEGORIES_OVERWRITE, in which case the set is used to further narrow down the categories copied.
  • PasteMetadata int: Whether not metadata columns are to be pasted., flag indicating true or false
  • MetadataColumns set: Set containing names of metadata columns to be pasted.Only applicable if "PasteMetadata" is 1.
  • AddExtraMetadata int: Whether or not metadata columns which exist in the source data but not in the destination scene should be pasted. Only applicable if "PasteMetadata" is 1., flag indicating true or false
  • OverwriteMetadata int: Whether or not existing metadata in the destination scene is allowed to be overwritten. Only applicable if "PasteMetadata" is 1., flag indicating true or false
  • PasteGroups int: Whether or not groups are to be pasted., flag indicating true or false
  • ShredComps int: Shred Composites Into Separate Shots, flag indicating true or false
  • ShredProtectCategories set: Value for ShredProtectCategories
  • ShredExternalMattes int: Treat External Mattes As Individual Shots, flag indicating true or false

NewSceneOptions

Options for create a new database or temporary scene

Fields

  • format string Can be None: Working format of scene. Can be omitted if using a template.
  • colourspace string Can be None: Working colour space of scene. Can be omitted if using a template.
  • frame_rate float Can be None: Working frame rate of scene. Can be omitted if using a template.
  • field_order FIELDORDER Can be None Optional: Working field order of scene
  • template ScenePath Can be None: Path of template scene from which to copy settings
  • blg_template string Can be None: Path of BLG file from which to copy settings

OpenSceneStatus

Status of scene opening or creation operation

Fields

  • Done int: Flag indicating whether scene open is complete
  • Error string: Error message if scene open failed
  • Progress float: Percentage completion
  • Message string: Description of current status

QueueLogItem

Log Item from Queue Operation

Fields

  • Time string: Time of log item
  • Type QUEUE_LOG_TYPE: Type of log item
  • Task string: Task
  • Frame int: Frame Number of log item
  • Message string: Log message text
  • Detail string: Log message detail

QueueOp

Description of an Operation in a Queue

Fields

  • ID int: Operation ID
  • Description string: Description of operation
  • SubmitUser string: Name of user that submitted operation
  • SubmitHost string: Name of host that submitted operation

QueueOpStatus

Status of an Operation in a Queue

Fields

  • ID int: Operation ID
  • Status OPSTATUS: Status of operation
  • Progress float: Progress of operation
  • ProgressText string: Message describing current progress of operation
  • TimeElapsed string: Time elapsed so far, in seconds
  • TimeRemaining string: Estimated time remaining, in seconds
  • Warnings int: Number of warnings encountered
  • Errors int: Number of errors encountered

Rational

Holds a rational number. Used in situations where exact ratios are required.

Fields

  • Numerator int: Numerator of the rational number
  • Denominator int: Denominator of the rational number

RenderCodecInfo

Definition of a Codec that is supported for an image or movie file type

Fields

  • Key string: Key identifying this codec
  • Text string: User-readable name for codec
  • Params list: Array of supported parameters

RenderCodecParameterInfo

Definition of a parameter to an image or movie codec

Fields

  • Key string: Key used to identify this parameter
  • Text string: User-readable name for parameter
  • Type string: Data type of parameter
  • Choices list: Array of valid values for this parameter

RenderCodecParameterValue

Definition of a valid value for a codec parameter

Fields

  • Key string: Key used to identify this parameter value
  • Text string: User-readable name for parameter value

RenderDeliverable

This type is used to specify the render settings for an individual deliverable defined within a RenderSetup

Fields

  • Name string: Name of deliverable
  • Disabled int Optional: Flag indicating whether this deliverable is disabled for rendering
  • IsMovie int Optional: Flag indicating that this deliverable is a movie
  • FileType string: Key specifying image or movie file type. The list of supported file types can be found by calling RenderSetup.get_image_types() and RenderSetup.get_movie_types().
  • MovieCodec string Can be None Optional: Key identifying video codec for movie file types. The list of supported codecs can be found by calling RenderSetup.get_movie_codecs().
  • AudioCodec string Can be None Optional: Key identifying audio codec for movie file types. The list of supported codecs can be found by calling RenderSetup.get_movie_audio_codecs().
  • ImageOptions dict Can be None Optional: Dictionary containing image codec parameters and their values
  • FastStart int Optional: Flag indicating that we want to optimise the resulting movie for fast-start network playback
  • AudioSampleRate AUDIO_RATE Optional: Audio Sample Rate in Hertz
  • AudioNumChannels int Optional: Number of audio channels in deliverable. Use -1 to take use same number as source movie/audio.
  • Container string Can be None Optional: Destination Container path. If unset, RenderSetup will use the default container from the Scene.
  • OutputDirectory string: Output directory relative to container
  • FileNamePrefix string Optional: File name prefix (before frame number component)
  • FileNamePostfix string Optional: File name postfix (after frame number component). Only used for Sequence renders.
  • FileNameNumDigits int Optional: Number of digits to pad frame number to. Only used for Sequence renders.
  • FileNameNumber RENDER_FRAMENUM Optional: Source for frame number
  • FileNameExtension string Can be None Optional: File extension. If not specified, the default exxtension for the specified file type will be used.
  • ColourSpaceTag RENDER_NCLC_TAG Optional: Colour space tag data (NCLC) to embed in QuickTime movies
  • RenderFormat string: Name of image format for rendered output. Set this to RENDER_FORMAT_USEINPUT to use the Input Format of each shot as its Render Rormat.
  • RenderResolution PROXY_RESOLUTION Optional: Render format resolution
  • RenderFrameRate float Can be None Optional: Render frame rate
  • RenderFieldOrder FIELDORDER Optional: Field behaviour
  • RenderDecodeQuality DECODEQUALITY Optional: Source codec decode quality
  • RenderColourSpace string: Name of colour space for rendered output.
  • RenderVideoLUT VIDEOLUT Optional: Video scaling LUT
  • RenderLayer int Optional: If specified, only the layers up to the specified layer number will be included in the renderer output. You can use RENDER_LAYER enum values to specify symbolic layer numbers. Default is to render all layers (-1).
  • RenderTrack int Optional: Track number to render. Bottom most track is track 0
  • RenderMask string Optional: Name of Mask within Render Format to apply to rendered image
  • RenderMaskMode RENDER_MASK Optional: Mask value to apply in masked area
  • RenderBurnin string Can be None Optional: Name of Burnin to apply to rendered image
  • RenderFlashBurnin int Optional: Number of frames to flash burnin at start of shot. Set to 0 to apply burnin to whole of each shot.
  • RenderDisableCache int Optional: Do not read disk cache when rendering. This will ignore any intermediate strip caching and re-render all data.
  • HandleIncompleteStacks RENDER_INCOMPLETE_BEHAVIOUR Optional: Action to take when encountering a stack with missing strips
  • HandleEmptyFrames RENDER_EMPTY_BEHAVIOUR Optional: Action to take when encountering frames in timeline with no strips/shots
  • HandleError RENDER_ERROR_BEHAVIOUR Optional: Action to take when encountering frames in timeline with no strips/shots
  • EmbedTimecode RENDER_TIMECODE_SOURCE Optional: Which timecode to embed into rendered output
  • EmbedTape RENDER_TAPENAME_SOURCE Optional: Which tape name to embed into rendered output
  • EmbedClip RENDER_CLIPNAME_SOURCE Optional: Which clip name to embed into rendered output

RenderFileTypeInfo

Definition of an image or movie type

Fields

  • Key string: Key identifying this file type
  • Text string: User-readable name for file type
  • Extensions list: Array of support file extensions
    • string:
  • Params list: Array of supported parameters

RenderOpInfo

This type is returned to return information about render operations queued via QueueManager

Fields

  • ID int: Queue operation ID
  • Warning string: Any warning that was raised during the submission of the render operation

RenderProcessorLogItem

Log Item from RenderProcessor

Fields

  • Time string: Time of log item
  • Type string: Type of log item
  • Task string: Task
  • Frame int: Frame Number of log item
  • Message string: Log message text
  • Detail string: Log message detail

RenderStatus

Status of render operation

Fields

  • Status OPSTATUS: Status of render operation
  • Error string: Error message if render failed
  • Total int: Total frames to render
  • Complete int: Number of frames completed
  • Remaining int: Number of frames remaining
  • Failed int: Number of frames that failed to render
  • Progress float: Operation progress (0.0 to 1.0)
  • ProgressMessage string: Last progress update message

SDKVersion

Version information for 3rd-party SDKs used in the application

Fields

  • Key string: Key identifying SDK
  • Name string: Name of SDK
  • Description string: Description of SDK
  • Version string: Version Number

SceneInfo

Return general information about the state of a scene

Fields

  • CreatedDate string: Time and Date that scene was created
  • CreatedBy string: Username and hostname that created scene
  • CreatedVersion string: Version of software that created this scene
  • OpenedDate string: Time and Date that scene was opened
  • OpenedBy string: Username and hostname that opened the scene
  • OpenedVersion string: Version of software that opened this scene
  • ModifiedDate string: Time and Date that scene was last modified
  • ModifiedBy string: Username and hostname that last modified the scene
  • ModifiedVersion string: Username and hostname that last modified the scene
  • WorkingFormat string: Name of working format
  • Notes string: Any notes associated with this scene
  • LastEDL string: Name of the last EDL imported into this scene

ScenePath

A ScenePath defines the host, job, folder and scene names required to create or open a FilmLight scene

Fields

  • Type string Optional: Type of path this is. Can be 'psql' for a scene stored in a database, or 'file' for scene stored in a file
  • Host string: Hostname of machine with job database
  • Job string: Job name
  • Scene string: Scene name
  • Tag string Optional: Branch/tag name
  • Filename string Optional: Filename

SceneSettingDefinition

Type information for an SceneSettings parameter

Fields

  • Type string: Data type of parameter
  • Desc string: Description of parameter
  • Values list: If present, this specifies the set of valid values for this key
    • any:

ShotIndexRange

shot index range

Fields

  • FirstIndex int: Index of first shot that intersects the range
  • LastIndex int: Index of last shot that intersects the range

ShotInfo

Shot info object

Fields

  • ShotId int: shot idenfifier
  • StartFrame int: The shot's timeline start frame
  • EndFrame int: The shot's timeline end frame
  • PosterFrame int: The shot's timeline poster frame

StillExportSettings

Settings to use for Still exports

Fields


VolumeInfo

Definition of a volume attached to, or accessible from, a FilmLight system

Fields

  • Key string: Key identifying this volume
  • Name string: Volume name
  • Label string: Volume label
  • Zone string: Zone containing Volume
  • Path string: Local path to volume

Constants & Enumerations

Constants are defined at the top level of the flapi module, and can be accessed like so:

import flapi

fieldOrder = flapi.FIELDORDER_PROGRESSIVE

AUDIOSEQ_TYPE

Type of Audio in an Audio Sequence

  • AUDIOSEQTYPE_NONE — No Audio
  • AUDIOSEQTYPE_FILE — Audio File
  • AUDIOSEQTYPE_STEMS — Audio Stems
  • AUDIOSEQTYPE_MOVIE — Audio from Movie
  • AUDIOSEQTYPE_TONE — Audio is generated Tone

AUDIOSYNCSTATUS

Status info related to audio sync progress

  • AUDIOSYNCSTATUS_FAIL — Failure during audio sync operation
  • AUDIOSYNCSTATUS_WARN — Warning during audio sync operation
  • AUDIOSYNCSTATUS_INFO — Info from audio sync operation
  • AUDIOSYNCSTATUS_NOTE — Note from audio sync operation
  • AUDIOSYNCSTATUS_SCAN — Filesystem scanning progress

AUDIOSYNC_CRITERIA

Values for AudioSyncSettings Criteria

  • AUDIOSYNC_CRITERIA_TIMECODE — Timecode
  • AUDIOSYNC_CRITERIA_SRCTIMECODE — Source Timecode
  • AUDIOSYNC_CRITERIA_DATESRCTIMECODE — Date & Source Timecode
  • AUDIOSYNC_CRITERIA_SCENETAKE — Scene & Take
  • AUDIOSYNC_CRITERIA_SHOTSCENETAKE — Shot Scene & Take

AUDIOSYNC_FPS

Values for AudioSyncSettings FPS

  • AUDIOSYNC_FPS_23976 — 23.976 fps
  • AUDIOSYNC_FPS_24000 — 24 fps
  • AUDIOSYNC_FPS_25000 — 25 fps
  • AUDIOSYNC_FPS_29970 — 29.97 fps
  • AUDIOSYNC_FPS_2997DF — 29.97 fps DF
  • AUDIOSYNC_FPS_30000 — 30 fps
  • AUDIOSYNC_FPS_48000 — 48 fps
  • AUDIOSYNC_FPS_50000 — 50 fps
  • AUDIOSYNC_FPS_59940 — 59.94 fps
  • AUDIOSYNC_FPS_60000 — 60 fps

AUDIOSYNC_METADATA

Values for AudioSyncSettings Metadata

  • AUDIOSYNC_METADATA_SCENETAKE — Scene & Take
  • AUDIOSYNC_METADATA_DATE — Date

AUDIOSYNC_RATIO

Values for AudioSyncSettings Ratio

  • AUDIOSYNC_RATIO_1_TO_1 — 1:1
  • AUDIOSYNC_RATIO_1001_TO_1000 — 1001:1000
  • AUDIOSYNC_RATIO_1000_TO_1001 — 1000:1001
  • AUDIOSYNC_RATIO_25_TO_24 — 25:24
  • AUDIOSYNC_RATIO_24_TO_25 — 24:25

AUDIOSYNC_READLTC

Values for AudioSyncSettings ReadLTC

  • AUDIOSYNC_READLTC_NO — No
  • AUDIOSYNC_READLTC_CHANNEL — From Channel
  • AUDIOSYNC_READLTC_TRACK — From Track

AUDIOSYNC_SUBSEARCH

Values for AudioSyncSettings SubSearch

  • AUDIOSYNC_SUBSEARCH_ALL — All Sub-Directories
  • AUDIOSYNC_SUBSEARCH_NAMED — Sub-Directories Named
  • AUDIOSYNC_SUBSEARCH_NEAREST — Nearest Sub-Directory Named

AUDIO_RATE

Audio Sample Rate

  • AUDIO_RATE_44100 — 44.1 kHz
  • AUDIO_RATE_48000 — 48 kHz
  • AUDIO_RATE_96000 — 96 kHz

BLGEXPORT_LOCKGRADE

Values for BLGExportSettings LockGrade

  • BLGEXPORT_LOCKGRADE_READWRITE — No
  • BLGEXPORT_LOCKGRADE_LOCKED — Yes

BLGEXPORT_SCALE

Values for BLGExportSettings Scale

  • BLGEXPORT_SCALE_1 — Full
  • BLGEXPORT_SCALE_2 — Half
  • BLGEXPORT_SCALE_4 — Quarter
  • BLGEXPORT_SCALE_16 — Sixteenth

BURNIN_BORDER

Define border type for burnin text item

  • BURNIN_BORDER_NONE — No border
  • BURNIN_BORDER_RECTANGLE — Rectangle
  • BURNIN_BORDER_LOZENGE — Lozenge

BURNIN_HALIGN

Define horizontal alignment of burnin text item

  • BURNIN_HALIGN_LEFT — Left aligned
  • BURNIN_HALIGN_CENTER — Center aligned
  • BURNIN_HALIGN_RIGHT — Right aligned

BURNIN_ITEM_TYPE

Specify burnin item type

  • BURNIN_ITEM_TEXT — Text item
  • BURNIN_ITEM_IMAGE — Image item

BURNIN_VALIGN

Define vertical alignment of burnin text item

  • BURNIN_VALIGN_TOP — Top aligned
  • BURNIN_VALIGN_MIDDLE — Middle aligned
  • BURNIN_VALIGN_BOTTOM — Bottom aligned

CAT_MODE

Chromatic Adaptation Transform

  • ACES — ACES Workflow (dynamic)
  • BRADFORD — Bradford
  • CIECAT02 — CIECAT02
  • VONKRIES — von Kries
  • XYZ — xyz (legacy)

CDLEXPORT_CDLLAYER

Values for CDLExportSettings CDLLayer

  • CDLEXPORT_CDLLAYER_TOP — Top
  • CDLEXPORT_CDLLAYER_BOTTOM — Bottom
  • CDLEXPORT_CDLLAYER_CUSTOM — Layer n

CDLEXPORT_FORMAT

Values for CDLExportSettings Format

  • CDLEXPORT_FORMAT_CC — .cc file Color Correction, one correction per file
  • CDLEXPORT_FORMAT_CCC — .ccc file Color Correction Collection, all corrections in one file

CUBEEXPORT_CUBERESOLUTION

Values for CubeExportSettings CubeResolution

  • CUBEEXPORT_CUBERESOLUTION_DEFAULT — Default
  • CUBEEXPORT_CUBERESOLUTION_16 — 16x16x16
  • CUBEEXPORT_CUBERESOLUTION_17 — 17x17x17
  • CUBEEXPORT_CUBERESOLUTION_32 — 32x32x32
  • CUBEEXPORT_CUBERESOLUTION_33 — 33x33x33
  • CUBEEXPORT_CUBERESOLUTION_64 — 64x64x64

CUBEEXPORT_EXTENDEDRANGES

Values for CubeExportSettings ExtendedRanges

  • CUBEEXPORT_EXTENDEDRANGES_NO — No
  • CUBEEXPORT_EXTENDEDRANGES_LINEAR — Linear
  • CUBEEXPORT_EXTENDEDRANGES_LOG — Log

CUBEEXPORT_LUT1OPTIONS

Values for CubeExportSettings LUT1Options

  • CUBEEXPORT_LUT1OPTIONS_INPUT — Input Transform
  • CUBEEXPORT_LUT1OPTIONS_GRADE — Grade
  • CUBEEXPORT_LUT1OPTIONS_OUTPUT — Output Transform

CUBEEXPORT_LUT2OPTIONS

Values for CubeExportSettings LUT2Options

  • CUBEEXPORT_LUT2OPTIONS_INPUT — Input Transform
  • CUBEEXPORT_LUT2OPTIONS_GRADE — Grade
  • CUBEEXPORT_LUT2OPTIONS_OUTPUT — Output Transform

CUBEEXPORT_LUT3OPTIONS

Values for CubeExportSettings LUT3Options

  • CUBEEXPORT_LUT3OPTIONS_INPUT — Input Transform
  • CUBEEXPORT_LUT3OPTIONS_GRADE — Grade
  • CUBEEXPORT_LUT3OPTIONS_OUTPUT — Output Transform

CUBEEXPORT_LUTFORMAT

Values for CubeExportSettings LUTFormat

  • CUBEEXPORT_LUTFORMAT_TRUELIGHT — Truelight cube
  • CUBEEXPORT_LUTFORMAT_TRUELIGHT_1D — Truelight 1D
  • CUBEEXPORT_LUTFORMAT_AMIRA — AMIRA
  • CUBEEXPORT_LUTFORMAT_ARRI — Arri
  • CUBEEXPORT_LUTFORMAT_AUTODESK — Autodesk
  • CUBEEXPORT_LUTFORMAT_AUTODESK_1D — Autodesk 1D
  • CUBEEXPORT_LUTFORMAT_AUTODESK_1DF — Autodesk 1D half float
  • CUBEEXPORT_LUTFORMAT_AUTODESK_MESH — Autodesk Lustre (Mesh)
  • CUBEEXPORT_LUTFORMAT_AUTODESK_CTF — Autodesk CTF
  • CUBEEXPORT_LUTFORMAT_BMD — BMD
  • CUBEEXPORT_LUTFORMAT_BARCO — Barco
  • CUBEEXPORT_LUTFORMAT_BLACKMAGIC — BlackMagic
  • CUBEEXPORT_LUTFORMAT_BLACKMAGIC_1D — BlackMagic 1D
  • CUBEEXPORT_LUTFORMAT_CANON_1D — Canon gamma 1D
  • CUBEEXPORT_LUTFORMAT_CANON_3D — Canon gamut 3D
  • CUBEEXPORT_LUTFORMAT_CINESPACE — CineSpace
  • CUBEEXPORT_LUTFORMAT_COLORFRONT_1D — Colorfront 1D
  • CUBEEXPORT_LUTFORMAT_COLORFRONT_3D — Colorfront 3D
  • CUBEEXPORT_LUTFORMAT_DVS — DVS
  • CUBEEXPORT_LUTFORMAT_DVS_1D — DVS 1D
  • CUBEEXPORT_LUTFORMAT_DAVINCI — DaVinci
  • CUBEEXPORT_LUTFORMAT_EVERTZ — Evertz
  • CUBEEXPORT_LUTFORMAT_ICC — ICC
  • CUBEEXPORT_LUTFORMAT_IRIDAS — IRIDAS
  • CUBEEXPORT_LUTFORMAT_IRIDAS_1D — IRIDAS 1D
  • CUBEEXPORT_LUTFORMAT_LUTHER — LUTher
  • CUBEEXPORT_LUTFORMAT_NUCODA — Nucoda
  • CUBEEXPORT_LUTFORMAT_PANASONIC — Panasonic
  • CUBEEXPORT_LUTFORMAT_PANDORA — Pandora
  • CUBEEXPORT_LUTFORMAT_QUANTEL — Quantel
  • CUBEEXPORT_LUTFORMAT_QUANTEL_65 — Quantel 65x65x65
  • CUBEEXPORT_LUTFORMAT_SCRATCH — Scratch
  • CUBEEXPORT_LUTFORMAT_SONY — Sony
  • CUBEEXPORT_LUTFORMAT_SONY_BVME — Sony BVME

CUBEEXPORT_LUTRESOLUTION

Values for CubeExportSettings LUTResolution

  • CUBEEXPORT_LUTRESOLUTION_DEFAULT — Default
  • CUBEEXPORT_LUTRESOLUTION_1024 — 1024
  • CUBEEXPORT_LUTRESOLUTION_4096 — 4096
  • CUBEEXPORT_LUTRESOLUTION_16384 — 16384

CUBEEXPORT_NUMLUTS

Values for CubeExportSettings NumLUTs

  • CUBEEXPORT_NUMLUTS_1 — 1
  • CUBEEXPORT_NUMLUTS_2 — 2
  • CUBEEXPORT_NUMLUTS_3 — 3

DECODEPARAM_TYPE

Data type for a DecodeParameterDefinition

  • DECODEPARAMTYPE_INTEGER — Integer value
  • DECODEPARAMTYPE_FLOAT — Floating-point value
  • DECODEPARAMTYPE_BOOLEAN — Boolean value, represented as 1 or 0
  • DECODEPARAMTYPE_CHOICE — A choice for a set of discrete values
  • DECODEPARAMTYPE_FILE — Filename or path to a file

DECODEQUALITY

Decode Qulity to use for decoding source images for RAW codecs

  • DECODEQUALITY_HIGH — Use highest quality RAW decode
  • DECODEQUALITY_OPTIMISED — Use nearest decode quality for render format/resolution
  • DECODEQUALITY_DRAFT — Use fastest decode quality

DIALOG_ITEM_TYPE

Type for a DynamicDialogItem used in a DynamicDialog BETA

  • DIT_STRING — String
  • DIT_INTEGER — Integer
  • DIT_FLOAT — Floating-point number
  • DIT_TIMECODE — Timecode
  • DIT_DROPDOWN — Dropdown
  • DIT_LIST — List of items
  • DIT_TOGGLE — Toggle Button
  • DIT_TOGGLE_SET — Set of Toggle buttons
  • DIT_TOGGLE_DROPDOWN — Dropdown menu to allow toggling multiple items
  • DIT_TOGGLE_LIST — List of toggle items
  • DIT_RADIO_GROUP — Set of radio buttons
  • DIT_FILEPATH — File Path
  • DIT_IMAGEPATH — Image Path
  • DIT_DIRECTORY — Directory Path
  • DIT_SHOT_SELECTION — Shot Selection
  • DIT_STATIC_TEXT — Static Text
  • DIT_SHOT_CATEGORY — Shot Category
  • DIT_SHOT_CATEGORY_SET — Shot Category Set
  • DIT_MARK_CATEGORY — Shot Category
  • DIT_MARK_CATEGORY_SET — Mark Category Set

EXPORTSTATUS

Status info related to Export progress

  • EXPORTSTATUS_FAIL — Failure during export operation
  • EXPORTSTATUS_WARN — Warning during export operation
  • EXPORTSTATUS_INFO — Info from export operation
  • EXPORTSTATUS_NOTE — Note from export operation
  • EXPORTSTATUS_SCAN — Filesystem scanning progress

EXPORTTYPE

Type of Exporter BETA

  • EXPORTTYPE_STILL — Stills Exporter
  • EXPORTTYPE_BLG — BLG Exporter
  • EXPORTTYPE_CUBE — Cube Exporter
  • EXPORTTYPE_CDL — CDL Exporter

EXPORT_CATEGORYMATCH

Values for Exporter CategoryMatch field

  • EXPORT_CATEGORYMATCH_ALL — All Categories
  • EXPORT_CATEGORYMATCH_ANY — Any Category

EXPORT_FRAMES

Values for Exporter Frames field

  • EXPORT_FRAMES_FIRST — First Frame
  • EXPORT_FRAMES_POSTER — Poster Frame
  • EXPORT_FRAMES_MARKED — Marked Frames
  • EXPORT_FRAMES_CURRENT — Current Frame

EXPORT_OVERWRITE

Values for Exporter Overwrite field

  • EXPORT_OVERWRITE_SKIP — Skip
  • EXPORT_OVERWRITE_REPLACE — Replace

EXPORT_SOURCE

Values for Exporter Source field

  • EXPORT_SOURCE_ALLSHOTS — All Shots
  • EXPORT_SOURCE_SELECTEDSHOTS — Selected Shots
  • EXPORT_SOURCE_CURRENTSHOT — Current Shot
  • EXPORT_SOURCE_SHOTSINFILTER — Shots in Filter
  • EXPORT_SOURCE_SHOTSOFCATEGORY — Shots of Category

EXPORT_STEREO

Values for Exporter Stereo field

  • EXPORT_STEREO_CURRENT — Current Eye
  • EXPORT_STEREO_LEFT — Left Eye
  • EXPORT_STEREO_RIGHT — Right Eye
  • EXPORT_STEREO_BOTH — Left & Right Eyes
  • EXPORT_STEREO_SINGLESTACKSTEREO — Single Stack Stereo (BLG exports only)

FIELDORDER

Field order behaviour

  • FIELDORDER_PROGRESSIVE — Progressive
  • FIELDORDER_UPPER — Upper-field first (PAL/SECAM)
  • FIELDORDER_LOWER — Lower-field first (NTSC)

FORMATSET_SCOPE

Defines the scope that a FormatSet is defined in

  • FORMATSET_SCOPE_FACTORY — Factory formats built-in to the software
  • FORMATSET_SCOPE_GLOBAL — Global Formats from the global formats database
  • FORMATSET_SCOPE_JOB — Formats defined for a given job in a database
  • FORMATSET_SCOPE_SCENE — Formats defined for a given scene

FSFILTER

Type of items to return from Filesystem get_items method

  • FSFILTER_FILE — Return files
  • FSFILTER_DIR — Return directories

IMAGETRANSFORM_MODE

Specify filtering kernel to use for image resampling/transform operations

  • IMAGETRANSFORM_ADAPTIVE — Adaptive
  • IMAGETRANSFORM_BOX — Square Average (Box filter)
  • IMAGETRANSFORM_CIRCLE — Circle average
  • IMAGETRANSFORM_COMPOSITE — Composite
  • IMAGETRANSFORM_CUBIC — Fixed Cubic
  • IMAGETRANSFORM_CUBIC_SPLINE — Fixed Cubic Spline
  • IMAGETRANSFORM_LANCZOS — Fixed Lanczos 4-tap
  • IMAGETRANSFORM_6LANCZOS — Fixed Lanczos 6-tap
  • IMAGETRANSFORM_6QUINTIC — Fixed Quintic 6-tap
  • IMAGETRANSFORM_GAUSSIAN — Fixed Gaussian
  • IMAGETRANSFORM_CATMULL_ROM — Fixed Catmull-Rom
  • IMAGETRANSFORM_SIMON — Fixed Simon
  • IMAGETRANSFORM_LINEAR — Fixed Linear
  • IMAGETRANSFORM_NEAREST — Fixed Nearest Pixel
  • IMAGETRANSFORM_SHARPEDGE — Sharp Edge

INSERT_POSITION

Specify where to insert a sequence in a Scene

  • INSERT_START — Insert sequence at start of scene
  • INSERT_END — Insert sequence at end of scene
  • INSERT_BEFORE — Insert sequence before specified Shot
  • INSERT_AFTER — Insert sequence after specified Shot
  • INSERT_ABOVE — Insert sequence above specified Shot
  • INSERT_BELOW — Insert sequence below specified Shot

LOG_SEVERITY

Log Message Severity BETA

  • LOGSEVERITY_HARD — Hard error
  • LOGSEVERITY_SOFT — Soft error
  • LOGSEVERITY_INFO — Information or transient message

LUT_LOCATION

Specify where LUT data should be found for a LUT operator

  • LUTLOCATION_FILE — LUT is stored in an external file
  • LUTLOCATION_EMBEDDED — LUT is embedded in source image file

MARK_TYPE

Used to distinguish between timeline, shot and strip marks

  • MARKTYPE_TIMELINE — Timeline mark, position stored as time in seconds relative to start of timeline
  • MARKTYPE_SHOT — Shot mark, position stored as source image frame number
  • MARKTYPE_STRIP — Strip mark, position stored as time in seconds relative to start of strip

Location within application of new menu or menu item BETA

  • MENULOCATION_APP_MENU — Main application menu, ie Baselight or Daylight
  • MENULOCATION_SCENE_MENU — Scene menu
  • MENULOCATION_EDIT_MENU — Edit menu
  • MENULOCATION_JOB_MANAGER — Job Manager
  • MENULOCATION_SHOT_VIEW — Shots View

MULTIPASTESTATUS

Status info related to Multi-Paste progress

  • MULTIPASTESTATUS_FAIL — Failure during multi-paste operation
  • MULTIPASTESTATUS_WARN — Warning during multi-paste operation
  • MULTIPASTESTATUS_INFO — Info from multi-paste operation
  • MULTIPASTESTATUS_NOTE — Note from multi-paste operation
  • MULTIPASTESTATUS_SCAN — Filesystem scanning progress

MULTIPASTE_BLGRESOURCECONFLICT

Values for MultiPasteSettings BLGResourceConflict

  • MULTIPASTE_BLGRESOURCECONFLICT_REPLACE — Replace Existing Resources with BLG Versions
  • MULTIPASTE_BLGRESOURCECONFLICT_ORIGINAL — Use Existing Resources with the Same Name
  • MULTIPASTE_BLGRESOURCECONFLICT_RENAME — Import BLG Resources Under a New Name

MULTIPASTE_DESTSELECTION

Values for MultiPasteSettings DestSelection

  • MULTIPASTE_DESTSELECTION_SELECTEDSTRIPS — Timeline Stacks Containing a Selected Strip
  • MULTIPASTE_DESTSELECTION_SELECTEDSHOTS — Selected Shots in Shots View/Cuts View

MULTIPASTE_DESTSHOTS

Values for MultiPasteSettings DestShots

  • MULTIPASTE_DESTSHOTS_OVERWRITEALL — Overwrite All
  • MULTIPASTE_DESTSHOTS_OVERWRITEALLEXCEPTCATS — Overwrite All, Except Layers of Category
  • MULTIPASTE_DESTSHOTS_RETAINALL — Retain All
  • MULTIPASTE_DESTSHOTS_RETAINALLEXCEPTCATS — Retain All, Except Layers of Category

MULTIPASTE_EDLAPPLYASCCDL

Values for MultiPasteSettings EDLApplyASCCDL

  • MULTIPASTE_EDLAPPLYASCCDL_NO — No
  • MULTIPASTE_EDLAPPLYASCCDL_CDL — Yes

MULTIPASTE_LAYERZEROBEHAVIOUR

Values for MultiPasteSettings LayerZeroBehaviour

  • MULTIPASTE_LAYERZEROBEHAVIOUR_STACKONLY — All Layers, Except Layer 0
  • MULTIPASTE_LAYERZEROBEHAVIOUR_LAYERZEROANDSTACK — All Layers, Including Layer 0
  • MULTIPASTE_LAYERZEROBEHAVIOUR_LAYERZEROONLY — Layer 0 Only
  • MULTIPASTE_LAYERZEROBEHAVIOUR_NOLAYERS — No Layers

MULTIPASTE_LAYERZEROCATEGORIES

Values for MultiPasteSettings LayerZeroCategories

  • MULTIPASTE_LAYERZEROCATEGORIES_INCLUDE — Append Categories, Except
  • MULTIPASTE_LAYERZEROCATEGORIES_OVERWRITE — Replace Categories, Add All Except
  • MULTIPASTE_LAYERZEROCATEGORIES_NO — Do Not Copy Layer 0 Categories

MULTIPASTE_MATCHBY

Values for MultiPasteSettings MatchBy

  • MULTIPASTE_MATCHBY_TAPENAME — Source Tape Name
  • MULTIPASTE_MATCHBY_FILENAME — Source Path+Filename
  • MULTIPASTE_MATCHBY_CLIPNAME — Source Clip Name
  • MULTIPASTE_MATCHBY_AVIDUID — Source Avid UID
  • MULTIPASTE_MATCHBY_CAMERA — Source Camera
  • MULTIPASTE_MATCHBY_BLGNAME — Source BLG Name
  • MULTIPASTE_MATCHBY_BLGID — Source BLG ID
  • MULTIPASTE_MATCHBY_SCENE — Source Scene
  • MULTIPASTE_MATCHBY_SCENETAKE — Source Scene & Take
  • MULTIPASTE_MATCHBY_CAMERAROLL — Source Camera Roll
  • MULTIPASTE_MATCHBY_LABROLL — Source Lab Roll
  • MULTIPASTE_MATCHBY_LUT — Source LUT
  • MULTIPASTE_MATCHBY_LUT2 — Source LUT2
  • MULTIPASTE_MATCHBY_ASC_CC_XML — Source ASC_CC_XML
  • MULTIPASTE_MATCHBY_FRAMENUMBER — Source Frame Number
  • MULTIPASTE_MATCHBY_TIMECODE — Source Timecode
  • MULTIPASTE_MATCHBY_KEYCODE — Source Keycode
  • MULTIPASTE_MATCHBY_RECORDFRAMENUMBER — Record Frame Number
  • MULTIPASTE_MATCHBY_RECORDTIMECODE — Record Timecode
  • MULTIPASTE_MATCHBY_ALWAYSMATCH — Ignore Time Ranges

MULTIPASTE_MATCHQUALITY

Values for MultiPasteSettings MatchQuality

  • MULTIPASTE_MATCHQUALITY_EXACTMATCH — Exact
  • MULTIPASTE_MATCHQUALITY_FUZZYMATCH — Fuzzy

MULTIPASTE_PASTELOCATION

Values for MultiPasteSettings PasteLocation

  • MULTIPASTE_PASTELOCATION_ABOVE — Above Remaining Destination Layers
  • MULTIPASTE_PASTELOCATION_BELOW — Below Remaining Destination Layers

MULTIPASTE_SOURCE

Values for MultiPasteSettings Source

  • MULTIPASTE_SOURCE_COPYBUFFER — Current Copy Buffer
  • MULTIPASTE_SOURCE_MULTIPLESCENES — Multiple Scenes
  • MULTIPASTE_SOURCE_BLG — BLG Files
  • MULTIPASTE_SOURCE_LUT — LUT Files
  • MULTIPASTE_SOURCE_CDL — CDL/CCC XML Files
  • MULTIPASTE_SOURCE_EDL — EDL/ALE files

MULTIPASTE_SOURCESHOTS

Values for MultiPasteSettings SourceShots

  • MULTIPASTE_SOURCESHOTS_COPYALL — Copy All
  • MULTIPASTE_SOURCESHOTS_COPYALLEXCEPTCATS — Copy All, Except Layers of Category
  • MULTIPASTE_SOURCESHOTS_COPYONLYCATS — Copy Only Layers of Category

OPENFLAG

Flags used to control opening a scene

  • OPENFLAG_DISCARD — Discard any unsaved changes when opening scene
  • OPENFLAG_RECOVER — Recover any unsaved changes when opening scene
  • OPENFLAG_OLD — Allow opening of old scenes
  • OPENFLAG_IGNORE_REVISION — Ignore data revision number when opening scene
  • OPENFLAG_READ_ONLY — Open scene read-only
  • OPENFLAG_ALLOW_UNKNOWN_OFX — Allow opening scenes that reference unknown OpenFX plugins
  • OPENFLAG_NO_CONTAINER_WARNING — Don't warn if scene uses container that is not known on this machine

OPERATOR_BARS_TYPE

Define the type of Bars to render

  • OPERATOR_BARS_TYPE_RP219HD_2a3a — SMPTE 75% white
  • OPERATOR_BARS_TYPE_RP219HD_2b3a — SMPTE 100% white
  • OPERATOR_BARS_TYPE_RP219HD_2c3b — SMPTE +I +Q
  • OPERATOR_BARS_TYPE_RP219HD_2d3b — SMPTE -I +Q
  • OPERATOR_BARS_TYPE_GREYS17 — Grey bars
  • OPERATOR_BARS_TYPE_RAMP — Grey ramp
  • OPERATOR_BARS_TYPE_RGBGREY — RGB and greys
  • OPERATOR_BARS_TYPE_B72 — BT.2111/ARIB B72 (HLG)
  • OPERATOR_BARS_TYPE_ITU2111_PQ — BT.2111 (PQ)
  • OPERATOR_BARS_TYPE_B66_4K — ARIB B66 (UHDTV 4K)
  • OPERATOR_BARS_TYPE_B66_8K — ARIB B66 (UHDTV 8K)

OPSTATUS

Status of an operation in Queue or Processor

  • OPSTATUS_CREATING — Operation is being created
  • OPSTATUS_QUEUED — Operation is waiting in the queue
  • OPSTATUS_ACTIVE — Operation is active
  • OPSTATUS_CRASHED — Operation crashed
  • OPSTATUS_STOPPED — Operation has been manually stopped
  • OPSTATUS_TOONEW — Operation was submitted to the queue by a newer version of the software and cannot be processed
  • OPSTATUS_DONE — Operation is complete

OPTICALFLOW_QUALITY

Optical Flow Quality

  • OFLOWQUAL_BEST — Best Quality
  • OFLOWQUAL_HIGH — High Quality
  • OFLOWQUAL_MEDIUM — Medium Quality

OPTICALFLOW_SMOOTHING

Optical Flow Smoothing

  • OFLOWSMOOTH_NONE — None
  • OFLOWSMOOTH_LOW — Low
  • OFLOWSMOOTH_MEDIUM — Medium
  • OFLOWSMOOTH_HIGH — High
  • OFLOWSMOOTH_MAX — Maximum

PROXY_RESOLUTION

Proxy Resolution of Render Format

  • RES_HIGH — High (full) resolution
  • RES_MEDIUM — Medium proxy resolution
  • RES_LOW — Low proxy resolution

QUEUE_LOG_TYPE

Message type for log entry queue operation log BETA

  • QUEUELOGTYPE_INFO — Information
  • QUEUELOGTYPE_WARN — Warning
  • QUEUELOGTYPE_FAIL — Error/failure

RENDER_CLIPNAME_SOURCE

Which clip name to embed into rendered output

  • RENDER_CLIPNAME_FILE — Source File Clip Name
  • RENDER_CLIPNAME_SHOT — Shot Clip Name
  • RENDER_CLIPNAME_STRIP — Clip Name from Strip Name

RENDER_COLOURSPACE

Special values to use for RenderColourSpace in RenderDeliverable

  • RENDER_COLOURSPACE_USEINPUT — Use Input Colour Space of Shot
  • RENDER_COLOURSPACE_USESTACKOUTPUT — Use Stack Output Colour Space. This will resolve to the Scene Grade Result Colour Space if specified, otherwise this will resolve to the Scene Working Colour Space.

RENDER_EMPTY_BEHAVIOUR

Action to take when encountering frames in timeline with no strips/shots

  • RENDER_EMPTY_FAIL — Fail Render
  • RENDER_EMPTY_BLACK — Render Black Frame
  • RENDER_EMPTY_CHEQUER — Render Chequerboard Frame

RENDER_ERROR_BEHAVIOUR

Action to take when encountering frames in timeline with no strips/shots

  • RENDER_ERROR_FAIL — Fail Render
  • RENDER_ERROR_SKIP — Skip Frame And Continue
  • RENDER_ERROR_BLACK — Render Black Frame
  • RENDER_ERROR_CHEQUER — Render Chequerboard Frame And Continue

RENDER_FORMAT

Special values to use for RenderFormat in RenderDeliverable

  • RENDER_FORMAT_USEINPUT — Use Shot Input Format

RENDER_FRAMENUM

Specify how frame number for sequence should be calculated

  • RENDER_FRAMENUM_SCENE_FRAME — Scene Frame Number
  • RENDER_FRAMENUM_SHOT_FRAME — Shot Frame Number
  • RENDER_FRAMENUM_SCENE_TIMECODE — Record Timecode as Frame Number
  • RENDER_FRAMENUM_SHOT_TIMECODE — Shot Timecode as Frame Number

RENDER_INCOMPLETE_BEHAVIOUR

Action to take when encountering shots with missing strips

  • RENDER_INCOMPLETE_FAIL — Fail Render
  • RENDER_INCOMPLETE_CONTINUE — Render As Baselight (Chequerboard Missing)
  • RENDER_INCOMPLETE_BLACK — Render Black Frame
  • RENDER_INCOMPLETE_CHEQUER — Render Chequerboard Frame

RENDER_LAYER

Layers to include when rendering. This can be a layer number or one of the following constants.

  • RENDER_LAYER_ALL — Include all grade layers in rendered output
  • RENDER_LAYER_LAYERS_INPUTONLY — Do not include any grade layers or operators in layer 0
  • RENDER_LAYER_LAYER0 — Do not include any grade layers

RENDER_MASK

Select whether to crop to the mask, or set the black value for the masked area

  • RENDER_MASK_CROP — Crop image to mask
  • RENDER_MASK_BLACK — Set mask area to absolue black (0)
  • RENDER_MASK_VIDEO — Set mask area to video black (16/255)
  • RENDER_MASK_FILM — Set mask area to film black (95/1023)

RENDER_NCLC_TAG

Which NCLC tag to use in QuickTime Movie files for colourimetry

  • RENDER_NCLC_LEGACY — Use legacy NCLC tag
  • RENDER_NCLC_AUTOMATIC — Use NCLC tag based on RenderColourSpace

RENDER_TAPENAME_SOURCE

Which tape name to embed into rendered output

  • RENDER_TAPENAME_FILE — Source File Tape Name
  • RENDER_TAPENAME_SHOT — Shot Tape Name
  • RENDER_TAPENAME_CLIP — Shot Clip Name
  • RENDER_TAPENAME_STRIP — Tape Name from Strip Name

RENDER_TIMECODE_SOURCE

Which timecode to embed into rendered output

  • RENDER_TIMECODE_FILETC1 — File Timecode 1
  • RENDER_TIMECODE_FILETC2 — File Timecode 2
  • RENDER_TIMECODE_SHOTTC — Shot Timecode
  • RENDER_TIMECODE_RECTC — Record (Timeline) Timecode

ROP_TEXT_ALIGN

Text alignment

  • ROP_TEXT_ALIGN_LEFT — Left
  • ROP_TEXT_ALIGN_CENTER — Center
  • ROP_TEXT_ALIGN_RIGHT — Right

SEQRESAMPLE_MODE

Sequence Resample Mode to use when resampling a sequence to a different video frame rate

  • SEQRESAMPLE_SNAP_TO_FRAME — Snap to Frame
  • SEQRESAMPLE_ROLLING_MAX — Mix Nearest Frames
  • SEQRESAMPLE_OPTICAL_FLOW — Optical Flow

STEREO_EYE

Stereo eye

  • STEREOEYE_MONO — Mono (no stereo)
  • STEREOEYE_LEFT — Left eye
  • STEREOEYE_RIGHT — Right eye

STILLEXPORT_BURNIN

Values for StillExportSettings Burnin

STILLEXPORT_DECODEQUALITY

Values for StillExportSettings DecodeQuality

  • STILLEXPORT_DECODEQUALITY_GMDQ_OPTIMISED_UNLESS_HIGH — Max Quality Decode at maximum resolution
  • STILLEXPORT_DECODEQUALITY_GMDQ_OPTIMISED — Optimised Decode at half resolution where possible, for speed
  • STILLEXPORT_DECODEQUALITY_GMDQ_DRAFT — Draft Decode at draft quality, for maximum speed

STILLEXPORT_FILETYPE

Values for StillExportSettings FileType

STILLEXPORT_FORMAT

Values for StillExportSettings Format

STILLEXPORT_MASK

Values for StillExportSettings Mask

STILLEXPORT_MASKMODE

Values for StillExportSettings MaskMode

  • STILLEXPORT_MASKMODE_CROP — Crop Image To Mask
  • STILLEXPORT_MASKMODE_HARDBLACK — Hard Black (0) Mask
  • STILLEXPORT_MASKMODE_VIDEOBLACK — Video Black (16/255) Mask
  • STILLEXPORT_MASKMODE_FILMBLACK — Film Black (95/1023) Mask

STILLEXPORT_RESOLUTION

Values for StillExportSettings Resolution

STILLEXPORT_TRUELIGHT

Values for StillExportSettings Truelight

SVGFITMODE

Controls how an SVG is transformed/fitted into a shape strip's 'target area' (the working format area or an optional mask area transformed to the working format).

  • SVGFITMODE_NONE — The SVG is translated to the corner of the target area. No Scaling is applied.
  • SVGFITMODE_BEST — The SVG image is translated to the centre of the target area and pillarboxed or letterboxed to fit the target area's height or width respectively.
  • SVGFITMODE_STRETCH — The SVG is stretched horizontally and vertically to fit the target area.

VIDEOLUT

Video Scaling LUT

  • VIDEOLUT_NONE — No video scaling LUT applied
  • VIDEOLUT_SCALE — Full to Legal Scale
  • VIDEOLUT_SCALE_NOCLIP — Full to Legal Scale (Unclipped)
  • VIDEOLUT_UNSCALE — Legal to Full Scale
  • VIDEOLUT_FULLRANGE_SOFTCLIP — Soft Clip to Full Range
  • VIDEOLUT_CLIP — Clip to Legal
  • VIDEOLUT_SOFTCLIP — Soft Clip to Legal

Examples

Opening a connection

import os
import sys
import flapi

c = flapi.Connection("localhost")

try:
    c.connect()
except flapi.FLAPIException as exc:
    print( "Error: %s" % exc )
    sys.exit(1)

print( "Connection OK" )

Listing jobs in database

import flapi

c = flapi.Connection("localhost")

c.connect()

jobs = c.JobManager.get_jobs("localhost")

print( "Found %d jobs on localhost:" % len(jobs) )
for j in jobs:
    print( "  %s" % j )

print( "Done" )

Querying Shot metadata in a Scene

import flapi
import time
import sys

if len(sys.argv) < 2:
    print( "No scene specified" )
    print( "Usage: %s host:job:scene" % sys.argv[0] )
    exit(1)

# Connect o  FLAPI
conn = flapi.Connection()
try:
    conn.connect()
except flapi.FLAPIException as ex:
    print( "Cannot connect to FLAPI: %s" % ex )
    sys.exit(1)

# Open the given scene
scene_path = conn.Scene.parse_path( sys.argv[1]  )

try:
    scene = conn.Scene.open_scene( scene_path, { flapi.OPENFLAG_READ_ONLY } )
except flapi.FLAPIException as ex:
    print( "Error loading scene: %s" % ex )
    sys.exit(1)

# Lookup names for each metadata item
tc_keys = {
    "srctc",
    "rectc"
}

md_keys = { 
    "filename", 
    "clip", 
    "tape", 
    "comment"
}

md_names = {}
mddefns = scene.get_metadata_definitions()
for k in tc_keys | md_keys:
    defns = [x for x in mddefns if x.Key == k]
    if defns and len(defns) > 0:
        md_names[k] = defns[0].Name

cat_names = {}
cat_keys = scene.get_strip_categories()
for k in cat_keys:
    cat_defn = scene.get_category(k)
    cat_names[k] = cat_defn.Name

# Lookup shots
nshots = scene.get_num_shots()
print( "Found %d shot(s)" % nshots )

if nshots > 0:
    shots = scene.get_shot_ids(0, nshots)
    for shot_ix, shot_inf in enumerate(shots):
        print("Shot %d:" % shot_ix)

        # Get Shot object for shot with the given ID
        shot = scene.get_shot(shot_inf.ShotId)

        # Get start/end source and record timecode metadata as native Timecode objects
        # using the get_metadata() method
        shot_tcs = shot.get_metadata( tc_keys )
        for tc_key, tc_val in shot_tcs.items():
            print("%15s: %s - %s" % (md_names[tc_key], shot_tcs[tc_key][0], shot_tcs[tc_key][1]))

        # Get other shot metadata in String form using the get_metadata_strings() method
        shot_md = shot.get_metadata_strings(md_keys)
        for md_key, md_val in shot_md.items():
            print("%15s: %s" % (md_names[md_key], md_val))

        # Get marks in shot
        mark_ids = shot.get_mark_ids()
        if len(mark_ids) > 0:
            print( "%15s:" % "Marks" )
            for ix,m in enumerate(mark_ids):
                mark = shot.get_mark(m)
                print( "%20d: Frame %d Type '%s' Message '%s'" % (
                        ix,
                        mark.get_record_frame(),
                        mark.get_category(),
                        mark.get_note_text()
                    )
                )
                mark.release()

        # Get shot categories
        categories = shot.get_categories()
        if len(categories) > 0:
            print("%15s: %s" % ("Categories", set(map(lambda c: cat_names.get(c), categories ) )) )

        # Release Shot object
        shot.release()

scene.close_scene()
scene.release()

Querying SequenceDescriptors for Shots in a Scene

import flapi
import time
import sys
import six

if len(sys.argv) < 2:
    print( "No scene specified" )
    print( "Usage: %s host:job:scene" % sys.argv[0] )
    exit(1)

# Connect to FLAPI
conn = flapi.Connection()
conn.connect()

# Open scene
scene_path = conn.Scene.parse_path( sys.argv[1] )

try:
    scene = conn.Scene.open_scene( scene_path, { flapi.OPENFLAG_READ_ONLY } )
except flapi.FLAPIException as ex:
    print( "Error loading scene: %s" % ex )
    sys.exit(1)

# Lookup shots
nshots = scene.get_num_shots()
print( "Found %d shots" % nshots )

if nshots > 0:
    shots = scene.get_shot_ids(0, nshots)

    # Get Shot IDs
    for shot_ix, shot_inf in enumerate(shots):
        print("shot %d:" % shot_ix)

        #Get shot object
        shot = scene.get_shot(shot_inf.ShotId)

        # Get Shot SequenceDescriptor object
        shot_seq = shot.get_sequence_descriptor()
        if shot_seq:
            print("  Path:  %s" % shot_seq.get_full_filename_with_F() )
            print("  Start: %d" % shot_seq.get_start_frame() )
            print("  End:   %d" % shot_seq.get_end_frame() )
        else:
            print("  No SequenceDescriptor available" )

        shot_seq.release()
        shot.release()

six.moves.input( "Press Enter to close scene & exit" )
print( "Closing scene" )

scene.close_scene()
scene.release()

Inserting a Sequence into a Scene

import sys
import flapi

if len(sys.argv) < 2:
    print( "usage: insert_seq.py <path_to_sequence> [<start frame> <end frame>]" )
    sys.exit(1)

conn = flapi.Connection("localhost")

try:
    conn.connect()
except flapi.FLAPIException as ex:
    print( "Cannot connect to FLAPI: %s" % ex )
    sys.exit(1)

jm = conn.JobManager
if not jm.job_exists("localhost", "flapi"):
    jm.create_job( "localhost", "flapi" )

if jm.scene_exists( "localhost", "flapi", "insert_test" ):
    jm.delete_scene( "localhost", "flapi", "insert_test", ignoreLocks=1 )

sceneOptions = {
    "format": "HD 1920x1080",
    "colourspace": "FilmLight_TLog_EGamut",
    "frame_rate": 24.0,
    "field_order" : flapi.FIELDORDER_PROGRESSIVE
}

scene_path = flapi.ScenePath({ "Host": "localhost", "Job": "flapi", "Scene": "insert_test"})

try:
    scene = conn.Scene.new_scene( scene_path, sceneOptions )
except flapi.FLAPIException as ex:
    print( "Error creating scene: %s" % ex )
    sys.exit(1)

# Create SequenceDescriptor for the given path/frame-range
template = sys.argv[1]
if len(sys.argv) > 2:
    startFrame = int( sys.argv[2], 10 )
    endFrame = int( sys.argv[3], 10 )
else:
    startFrame = None
    endFrame = None

seqs = conn.SequenceDescriptor.get_for_template( template, None, None )
if len(seqs)==0:
    print( "Cannot find SequenceDescriptor for " + template )
    sys.exit(1)

# Insert SequenceDescriptor into Scene, producing a Shot object
scene.start_delta("Insert Sequence(s)")

shots = []
for seq in seqs:
    shot = scene.insert_sequence( seq, flapi.INSERT_END, None, None, None )
    shots.append(shot)
    seq.release()

scene.end_delta()

# Print out some info about the sequence we just inserted
for shot in shots:
    md = shot.get_metadata_strings( [ "clip", "tape", "srctc" ] )
    for mdk in md:
        print( "    %s: %s" % (mdk, md[mdk]) )

# Release Shot objects
for shot in shots:
    shot.release()

# Save changes
scene.save_scene()
scene.close_scene()
scene.release()

Rendering a Scene using the Queue

import flapi
import sys
import time

if len(sys.argv) < 2:
    print("usage: %s host:job:scene")
    sys.exit(1)

conn = flapi.Connection("localhost")
try:
    conn.connect()
except flapi.FLAPIException as ex:
    print( "Cannot connect to FLAPI: %s" % ex )
    sys.exit(1)

# Open the scene
scene_path = conn.Scene.parse_path( sys.argv[1] )

try:
    scene = conn.Scene.open_scene( scene_path )
except flapi.FLAPIException as ex:
    print( "Error loading scene: %s" % ex )
    sys.exit(1)

# Create RenderSetup
print( "Create RenderSetup for Scene")
renderSetup = conn.RenderSetup.create_from_scene( scene )

# Check that at least one deliverable is enabled
if 0 not in [renderSetup.get_deliverable(i).Disabled for i in range(renderSetup.get_num_deliverables())]:
    print("No render deliverables are enabled in this scene. Enable at least one in the Render View in the Baselight UI and save the scene.")
    sys.exit(1)

# Create Queue Manager
print( "Opening QueueManager connection" )
qm = conn.QueueManager.create_local()

# Submit render job to Queue
print( "Submitting to queue" )
opinfo = renderSetup.submit_to_queue( qm, "FLAPI Render Test " + sys.argv[1] )

print( "Created operation id %d" % opinfo.ID )
if opinfo.Warning != None:
    print( "Warning: %s" % opinfo.Warning )

# We're finished with RenderSetup now
renderSetup.release()

# We're finished with Scene now
scene.close_scene()
scene.release()

# Wait on job to finish
print( "Waiting on render job to complete" )
while True:
    opstat = qm.get_operation_status( opinfo.ID )
    print( "  Status: {Status} {Progress:.0%} {ProgressText}".format(**vars(opstat)) )
    if opstat.Status == "Done":
        break
    time.sleep(0.5)

print( "Operation complete" )

# Remove completed operation from queue
print( "Archiving operaton" )
qm.archive_operation( opinfo.ID )

qm.release()

Querying operation status in the Queue

import flapi
import sys

conn = flapi.Connection("localhost")

conn.connect()

qm = conn.QueueManager.create_local()

ids  = qm.get_operation_ids()
for id_ in ids:
    print( "Operation %d" % id_ )

    op = qm.get_operation( id_ )
    status = qm.get_operation_status( id_ )
    log = qm.get_operation_log( id_ )

    print( "  Desc:  %s" % op.Description  )

    print( "  Status: %s"  % status.Status )
    print( "  Progress: %.1f" % (status.Progress * 100.0) )
    print( "  Last Message:  %s" %  status.ProgressText )

    print( "  Log:" )
    for l in log:
        print( "   %s %s: %s" % (l.Time, l.Message, l.Detail) )

Generated on Tues 25 Jun 2024 at 12:50:27