tik_manager4.objects.publisher

Publisher Handler module.

This module is responsible for handling the publish process.

Attributes

LOG

Classes

Publisher

Publisher class to handle the publish process.

SnapshotPublisher

Separate publisher to handle arbitrary file and folder publishing.

Module Contents

class Publisher(project_object)

Publisher class to handle the publish process.

discard()

Discard the reserved slot.

extract()

Extract the elements.

Uses all resolved extractors to extract the elements.

extract_single(extract_object)

Extract only from the given extract object.

Args:

extract_object (Extract): The extract object to extract.

get_management_tasks()

Get the management tasks from the platform manager (i.e. Shotgrid).

This method collects the platform tasks associated with the work object and returns them. It is important to note that platform tasks are not the same as the tik tasks.

publish(notes=None, preview_context=None, message_callback=None, management_task_id=None, management_task_status_to=None)

Finalize the publish by updating the reserved slot.

Args:

notes (str, optional): The notes to add to the publish. preview_context (PreviewContext, optional): The preview context. message_callback (function, optional): The message callback function. management_task_id (str, optional): The management task id. management_task_status_to (str, optional): When defined, the task

on management platform will be set to the given value.

Returns:

PublishVersion: The published object.

publish_to_management(management_task_id, status, description='', thumbnail=None, preview=None)

Publish the data to the management system.

reserve()

Reserve the slot for publish.

Makes sure that no other process overrides the publish.

resolve()

Resolve the publish data file name.

Returns:

str: The resolved publish data file name.

validate()

Validate the scene using the resolved validators.

property absolute_data_path
Resolved absolute data path.
property absolute_scene_path
Resolved absolute scene path.
property extractors
List of resolved extractors.
guard
property metadata
Metadata associated with the parent subproject.
property publish_name
Resolved publish name.
property publish_version
Resolved publish version.
property relative_data_path
Resolved relative path.
property relative_scene_path
Resolved relative path.
property task_object
The Task object that will be published.
property validators
List of resolved validators.
property work_object
The Work object that will be published.
class SnapshotPublisher(*args)

Bases: Publisher

Separate publisher to handle arbitrary file and folder publishing.

Handles automatically creating a new work version if the current work is not there.

resolve()

Resolve the file name for the snapshot.

Returns:

str: The resolved publish file name.

property work_object
Work object.
property work_version
Work version.
LOG