ftrack_connect_pipeline.client¶
- class ftrack_connect_pipeline.client.HostConnection(event_manager, host_data)[source]¶
Bases:
object
Host Connection Base class. This class is used to communicate between the client and the host.
- property context_id¶
Returns the current context id as fetched from the host
- property event_manager¶
Returns instance of
EventManager
- property session¶
Returns instance of
ftrack_api.session.Session
- property definitions¶
Returns the current definitions, filtered on discoverable.
- property id¶
Returns the current host id.
- property name¶
Returns the current host name.
- property host_types¶
Returns the list of compatible host for the current definitions.
- __init__(event_manager, host_data)[source]¶
Initialise HostConnection with instance of
EventManager
, and host_datahost_data : Dictionary containing the host information.
provide_host_information()
- run(data, engine, callback=None)[source]¶
Publish an event with the topic
PIPELINE_HOST_RUN
with the given data and engine.
- class ftrack_connect_pipeline.client.Client(event_manager, multithreading_enabled=True)[source]¶
Bases:
object
Base client class.
- ui_types = [None]¶
Compatible UI for this client.
- definition_filters = None¶
Use only definitions that matches the definition_filters
- definition_extensions_filter = None¶
(Open) Only show definitions and components capable of accept these filename extensions.
- property session¶
Returns instance of
ftrack_api.session.Session
- property event_manager¶
Returns instance of
EventManager
- property connected¶
Returns True if client is connected to a
HOST
- property context_id¶
Returns the current context id from host
- property context¶
Returns the current context
- property host_connections¶
Return the current list of host_connections
- property host_connection¶
Return instance of
HostConnection
- property schema¶
Return the current schema.
- property definition¶
Returns the current definition.
- property definitions¶
Returns the definitions list of the current host connection
- property engine_type¶
Return the current engine type
- property logs¶
Return the log items
- property multithreading_enabled¶
Return True if DCC supports multithreading (write operations)
- __init__(event_manager, multithreading_enabled=True)[source]¶
Initialise Client with instance of
EventManager
- discover_hosts(force_rediscover=False, time_out=3)[source]¶
Find for available hosts during the optional time_out and Returns a list of discovered
HostConnection
.Skip this and use existing singleton host connection if previously detected, unless force_rediscover is True.
- filter_host(host_connection)[source]¶
Return True if the host_connection should be considered
host_connection:
ftrack_connect_pipeline.client.HostConnection
- change_host(host_connection)[source]¶
Client(user) has chosen the host connection to use, set it to host_connection
- on_hosts_discovered(host_connections)[source]¶
Callback, hosts has been discovered. To be overridden by the qt client
- on_host_changed(host_connection)[source]¶
Called when the host has been (re-)selected by the user. To be overridden by the qt client.
- subscribe_host_context_change()[source]¶
Have host connection subscribe to context change events, to be able to notify client
- on_context_changed(context_id)[source]¶
Called when the context has been set or changed within the host connection, either from this client or remote (other client or the host). Should be overridden by client.
- run_definition(definition=None, engine_type=None)[source]¶
Calls the
run()
to run the entire given definition with the given engine_type.Callback received at
_run_callback()
- change_definition(definition, schema=None)[source]¶
Assign the given schema and the given definition as the current
schema
anddefinition
- run_plugin(plugin_data, method, engine_type)[source]¶
Calls the
run()
to run one single plugin.Callback received at
_run_callback()
plugin_data : Dictionary with the plugin information.
method : method of the plugin to be run
- on_ready(callback, time_out=3)[source]¶
calls the given callback method when host is been discovered with the optional time_out
- change_engine(engine_type)[source]¶
Assign the given engine_type as the current
engine_type
- on_client_notification()[source]¶
Subscribe to topic
PIPELINE_CLIENT_NOTIFICATION
to receive client notifications from the host in_notify_client()
ftrack_connect_pipeline.client.asset_manager¶
- class ftrack_connect_pipeline.client.asset_manager.AssetManagerClient(event_manager, multithreading_enabled=True)[source]¶
Bases:
Client
Asset Manager Client Base Class
- definition_filters = ['asset_manager']¶
Use only definitions that matches the definition_filters
- __init__(event_manager, multithreading_enabled=True)[source]¶
Initialise AssetManagerClient with instance of
EventManager
- on_host_changed(host_connection)[source]¶
Asset manager host has been selected, fetch definition. Return False if no definitions.
- resolve_dependencies(context_id, resolve_dependencies_callback, options=None)[source]¶
Calls the
run()
to run the methodresolve_dependencies()
To fetch list of version dependencies on the given context_id.Callback received resolve_dependencies_callback
context_id : Should be the ID of an existing task.
resolve_dependencies_callback : Callback function that should take the result as argument.
options : The options to supply to the plugin.
- discover_assets(plugin=None)[source]¶
Calls the
ftrack_connect_pipeline.client.HostConnection.run()
to run the methodftrack_connect_pipeline.host.engine.AssetManagerEngine.discover_assets()
Callback received at
_asset_discovered_callback()
plugin : Optional plugin to be run in the method. (Not implremented yet)
- load_assets(asset_info_list)[source]¶
Calls the
run()
to run the methodload_assets()
To load the assets of the given asset_info_list.Callback received at
_load_assets_callback()
asset_info_list : Should a list pf be instances of
FtrackAssetInfo
- select_assets(asset_info_list)[source]¶
Calls the
run()
to run the methodselect_assets()
To select the assets of the given asset_info_listasset_info_list : Should a list pf be instances of
FtrackAssetInfo
- update_assets(asset_info_list, plugin)[source]¶
Calls the
run()
to run the methodupdate_assets()
To update to the last version the assets of the given asset_info_list.Callback received at
_update_assets_callback()
asset_info_list : Should a list pf be instances of
FtrackAssetInfo
plugin : The plugin definition of the plugin to run during the update_assets method
- change_version(asset_info, new_version_id)[source]¶
Calls the
ftrack_connect_pipeline.client.HostConnection.run()
to run the methodftrack_connect_pipeline.host.engine.AssetManagerEngine.change_version()
To change the version of the given asset_info.Callback received at
_change_version_callback()
asset_info : Should be instance of
ftrack_connect_pipeline.asset.FtrackAssetInfo
new_version_id : Should be an AssetVersion id.
ftrack_connect_pipeline.client.loader_loader¶
- class ftrack_connect_pipeline.client.loader.LoaderClient(event_manager, multithreading_enabled=True)[source]¶
Bases:
Client
Loader Client Base Class
- definition_filters = ['loader']¶
Use only definitions that matches the definition_filters
- __init__(event_manager, multithreading_enabled=True)[source]¶
Initialise OpenerClient with instance of
EventManager
ftrack_connect_pipeline.client.opener_opener¶
ftrack_connect_pipeline.client.publisher_publisher¶
- class ftrack_connect_pipeline.client.publisher.PublisherClient(event_manager)[source]¶
Bases:
Client
Publisher Client Base Class
- definition_filters = ['publisher']¶
Use only definitions that matches the definition_filters
- __init__(event_manager)[source]¶
Initialise PublisherClient with instance of
EventManager
ftrack_connect_pipeline.client.log_viewer¶
- class ftrack_connect_pipeline.client.log_viewer.LogViewerClient(event_manager)[source]¶
Bases:
Client
Log Viewer Client Base Class
- definition_filters = ['log_viewer']¶
Use only definitions that matches the definition_filters
- __init__(event_manager)[source]¶
Initialise LogViewerClient with instance of
EventManager