tik_manager4.objects.publisher ============================== .. py:module:: tik_manager4.objects.publisher .. autoapi-nested-parse:: Publisher Handler module. This module is responsible for handling the publish process. Attributes ---------- .. autoapisummary:: tik_manager4.objects.publisher.LOG Classes ------- .. autoapisummary:: tik_manager4.objects.publisher.Publisher tik_manager4.objects.publisher.SnapshotPublisher Module Contents --------------- .. py:class:: Publisher(project_object) Publisher class to handle the publish process. .. py:method:: discard() Discard the reserved slot. .. py:method:: extract() Extract the elements. Uses all resolved extractors to extract the elements. .. py:method:: extract_single(extract_object) Extract only from the given extract object. Args: extract_object (Extract): The extract object to extract. .. py:method:: 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. .. py:method:: 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. .. py:method:: publish_to_management(management_task_id, status, description='', thumbnail=None, preview=None) Publish the data to the management system. .. py:method:: reserve() Reserve the slot for publish. Makes sure that no other process overrides the publish. .. py:method:: resolve() Resolve the publish data file name. Returns: str: The resolved publish data file name. .. py:method:: validate() Validate the scene using the resolved validators. .. py:property:: absolute_data_path Resolved absolute data path. .. py:property:: absolute_scene_path Resolved absolute scene path. .. py:property:: extractors List of resolved extractors. .. py:attribute:: guard .. py:property:: metadata Metadata associated with the parent subproject. .. py:property:: publish_name Resolved publish name. .. py:property:: publish_version Resolved publish version. .. py:property:: relative_data_path Resolved relative path. .. py:property:: relative_scene_path Resolved relative path. .. py:property:: task_object The Task object that will be published. .. py:property:: validators List of resolved validators. .. py:property:: work_object The Work object that will be published. .. py:class:: SnapshotPublisher(*args) Bases: :py:obj:`Publisher` Separate publisher to handle arbitrary file and folder publishing. Handles automatically creating a new work version if the current work is not there. .. py:method:: resolve() Resolve the file name for the snapshot. Returns: str: The resolved publish file name. .. py:property:: source_path Source path to publish. .. py:property:: work_object Work object. .. py:property:: work_version Work version. .. py:data:: LOG