An OpenAssetIO manager plugin for Flow Production Tracking (formerly ShotGrid/Shotgun).
This plugin provides OpenAssetIO integration with Flow Production Tracking, allowing applications to interact with FPT assets through the OpenAssetIO interface.
Flow Production Tracking (FPT) is highly configurable, and its usage is likely to vary wildly between facilities. As such, this OpenAssetIO plugin should be viewed as a starter/example/template plugin, that can be customised for a facility's bespoke FPT configuration.
The plugin is known to work with
- Python 3.10
- OpenAssetIO 1.0.0-rc.1.0
- OpenAssetIO-MediaCreation 1.0.0-alpha.11
- Flow Production Tracking Python API 3.3
- (Optional) Flow Production Tracking Core API 0.21 - required for resolving workfiles.
From the project root:
python -m pip install .
Note that this will install all dependencies, including openassetio
,
openassetio-mediacreation
and shotgun_api3
, which may already be
available (and potentially different versions) in the host application
environment.
An alternative for environments that already include all dependencies
is to add the plugin
directory in this repository to the
OPENASSETIO_PLUGIN_PATH
environment variable.
See the OpenAssetIO documentation for general instructions on host application configuration.
See the example config file for available settings.
There are three broad modes of operation, explained the following subsections.
This is the most basic mode of operation.
It requires the standalone shotgun_api3
Python package to be
installed.
Authentication credentials must be configured in the OpenAssetIO configuration.
Metadata can then be resolved from a remote FPT instance. However, workfile metadata (i.e. paths) cannot be resolved, since these exist only on disk and not in the FPT database. See the following subsections for options that allow workfiles to be resolved.
This is perhaps the most flexible mode of operation. The Python
environment must have access to a configured FPT toolkit, i.e.
PYTHONPATH
must contain a /path/to/fpt/conf/install/core/python
-like
directory.
Authentication credentials must be configured in the OpenAssetIO configuration.
In addition, a project ID must be given in the OpenAssetIO configuration, providing the pipeline configuration to use for resolving workfiles.
Metadata from both a remote FPT instance and workfiles can then be resolved.
Typically, this would be an application launched through the Flow Production Tracking Desktop launcher.
The launcher and "engine" (e.g. tk-nuke) handles authentication and configures the Python environment, meaning the OpenAssetIO configuration does not require any authentication credentials or project ID.
Metadata from both a remote FPT instance and workfiles can then be resolved, in the context of the launched application engine.
Entity references use two formats.
Entities that exist as records in the FPT database can be referenced using
fpt://asset/{object_type}/{object_id}
For example, fpt://asset/PublishedFile/123
.
Workfiles, a special case of entities that exist only on disk, may not have a corresponding FPT database entry. These can be referenced using
fpt://workfile/{template_name}/{field_1}/{field_2}/...
where the template_name
is the name of an FPT file path template, and
field_1
, field_2
, etc., are the fields required to fill in that
template, in the correct order.
This is the first iteration of the plugin with minimal functionality:
- Authentication via Script keys.
- Authentication via Legacy Login username/password.
- Authentication via Shotgun Desktop.
- Authentication via Personal Access Token.
- Authentication via web login.
- Resolving paths to PublishedFile objects.
- Resolving other metadata - partial support - e.g. frame range, name, Version path/URL.
- Resolving paths to workfiles.
- Querying related entities.
- Publishing.
- UI delegation.
The tests make use of the OpenAssetIO API Compliance Test Harness.
The required test fixtures are facility-dependent, and so several environment variables must be provided for use by the tests.
OPENASSETIO_TEST_SERVER_URL
- the FPT server to use for tests.- For authentication, either set
OPENASSETIO_TEST_SCRIPT_NAME
andOPENASSETIO_TEST_API_KEY
to an FPT API Script name and key, respectively; orOPENASSETIO_TEST_LEGACY_USER
andOPENASSETIO_TEST_LEGACY_PASSWORD
to the login and password of FPT Legacy Login Credentials, respectively.
OPENASSETIO_TEST_EXISTING_PUBLISHEDFILE_ID
- the numeric ID of an existing PublishedFile objectOPENASSETIO_TEST_MISSING_PUBLISHEDFILE_ID
- the numeric ID of a non-existent PublishedFile object.- For workfile tests (optional)
PYTHONPATH
- ensure this contains the path to an installation of FPT Toolkit Core, e.g./path/to/fpt/conf/install/core/python
.OPENASSETIO_TEST_PROJECT_ID
- the numeric ID of a project from which to retrieve pipeline configuration.OPENASSETIO_TEST_WORKFILE_TEMPLATE_NAME
- the name of a file path template to use in tests.OPENASSETIO_TEST_WORKFILE_TEMPLATE_FIELDS
- fields required to fill in the above path template, in order,/
-delimited.
The test harness tests are conveniently wrapped in pytest
:
python -m pip install . -r tests/requirements.txt
python -m pytest tests
The plugin and tests conform to the pylint linter, configured through
the pyproject.toml
file. To run pylint
python -m pip install -r tests/requirements.txt
python -m pylint --rcfile pyproject.toml plugin tests
Apache-2.0 - See LICENSE file for details.
This project does not bundle or embed commercial components, but it does provide interoperability with commercial components. The licences terms of dependencies related to this are linked below for convenience:
- Flow Production Tracking Python API: LICENSE
- (An optional dependency) Flow Production Tracking Core API: SHOTGUN PIPELINE TOOLKIT SOURCE CODE LICENSE
Please feel free to contribute pull requests or issues. Note that contributions will require signing a CLA.
See the OpenAssetIO contribution docs for how to structure commit messages, the pull request process, and coding style guide.