ftrack_connect_pipeline.host

ftrack_connect_pipeline.host.provide_host_information(context_id, host_id, definitions, host_name, event)[source]

Returns dictionary with host id, host name, context id and definition from the given host_id, definitions and host_name.

host_id : Host id

definitions : Dictionary with a valid definitions

host_name : Host name

class ftrack_connect_pipeline.host.Host(event_manager)[source]

Bases: object

host_types = ['python']

Compatible Host types for this HOST.

engines = {'asset_manager': <class 'ftrack_connect_pipeline.host.engine.asset_manager.AssetManagerEngine'>, 'loader': <class 'ftrack_connect_pipeline.host.engine.load.LoaderEngine'>, 'opener': <class 'ftrack_connect_pipeline.host.engine.open.OpenerEngine'>, 'publisher': <class 'ftrack_connect_pipeline.host.engine.publish.PublisherEngine'>}

Available engines for this host.

property context_id

Return the the default context id set at host launch

property host_id

Returns the current host id.

property host_name

Returns the current host name

property session

Returns instance of ftrack_api.session.Session

__init__(event_manager)[source]

Initialise Host with instance of EventManager

run(event)[source]

Runs the data with the defined engine type of the givent event

Returns result of the engine run.

event : Published from the client host connection at run()

on_register_definition(event)[source]

Callback of the register() Validates the given event and subscribes to the ftrack_api.event.base.Event events with the topics PIPELINE_DISCOVER_HOST and PIPELINE_HOST_RUN

event : Should be a validated and complete definitions, schema and packages dictionary coming from ftrack_connect_pipeline_definition.resource.definitions.register.register_definitions()

validate(data)[source]

Validates the given data against the correspondant plugin validator. Returns a validated data.

data : Should be a validated and complete definitions and schemas coming from ftrack_connect_pipeline_definition.resource.definitions.register.register_definitions()

register()[source]

Publishes the ftrack_api.event.base.Event with the topic PIPELINE_REGISTER_TOPIC with the first host_type in the list host_types and type definition as the data.

Callback of the event points to on_register_definition()

reset()[source]

Empty the variables host_type, host_id and __registry

launch_client(name, source=None)[source]

Send a widget launch event, to be picked up by DCC.

ftrack_connect_pipeline.host.validation

ftrack_connect_pipeline.host.validation.get_schema(definition_type, schemas)[source]

Returns the schema in the given schemas for the given definition_type

definition_type : Type of the definition. (asset_manager, publisher…)

schemas : List of schemas.

ftrack_connect_pipeline.host.validation.validate_schema(schemas, definition)[source]

Validates the schema of the given definition from the given schemas using the _validate_jsonschema function of the jsonschema.validate library.

schemas : List of schemas.

definition : Definition to be validated against the schema.

class ftrack_connect_pipeline.host.validation.PluginDiscoverValidation(session, host_types)[source]

Bases: object

Plugin discover validation base class

__init__(session, host_types)[source]

Initialise PluginDiscoverValidation with instance of ftrack_api.session.Session and host_types.

host_types : List of compatible host types. (maya, python, nuke….)

validate_plugins(definitions, schema_type)[source]

Validates all the definitions in the given definitions definitions calling the validate_context_plugins(), validate_components_plugins(), vaildate_finalizers_plugins().

Returns the invalid definition indices.

definitions : List of definitions (opener, loader, publisher and so on).

vaildate_definition_plugins(steps, definition_name, schema_type)[source]

Validates plugins in the given steps running the _discover_plugin()

steps : List of dictionaries with steps, stages and plugins.

definition_name : Name of the current definition.

schema_type : Schema type of the current definition.