tik_manager4.objects.category ============================= .. py:module:: tik_manager4.objects.category .. autoapi-nested-parse:: Module for Category object. Category object is responsible for handling the works and publishes under a task. Attributes ---------- .. autoapisummary:: tik_manager4.objects.category.LOG Classes ------- .. autoapisummary:: tik_manager4.objects.category.Category Module Contents --------------- .. py:class:: Category(parent_task, definition=None, **kwargs) Bases: :py:obj:`tik_manager4.objects.entity.Entity` Category object to handle works and publishes under a task. .. py:method:: construct_name(name) Construct the name for the work file. Useful to preview in UI. Args: name (str): Name of the work. Returns: str: Constructed name. .. py:method:: create_work(name, file_format=None, notes='', ignore_checks=True, from_selection=False) Create a work under the category. Args: name (str): Name of the work. file_format (str): File format of the work. notes (str): Notes for the work. ignore_checks (bool): If True, the checks for the work creation. will be ignored. from_selection (bool): If True, the work will be created from the current selection in the DCC. Returns: tik_manager4.objects.work: Work object. .. py:method:: create_work_from_path(name, file_path, override_dcc='standalone', notes='', ignore_checks=True, direct_publish=False) Register a given path (file or folder) as a work. Args: name (str): Name of the work. file_path (str): Path to the file or folder. notes (str): Notes for the work. ignore_checks (bool): If True, the checks for the work creation. will be ignored. direct_publish (bool): If True, the work will be directly published and the work version will be a mock version. Returns: tik_manager4.objects.work: Work object. .. py:method:: create_work_from_template(name, template_file, dcc, notes='', ignore_checks=True) Creates a task under the category. Args: name (str): Name of the work template_file (str): Path to the template file dcc (str): DCC name. notes (str): Notes for the work ignore_checks (bool): Ignore the checks for the work creation Returns: tik_manager4.objects.work: Work object .. py:method:: delete_works() Mark the category as deleted. .. py:method:: get_relative_work_path(override_dcc=None) Return the relative path of the category. Args: override_dcc (str): If provided, the resolved dcc will be overridden with this value. Returns: str: Relative path of the category. .. py:method:: get_works_by_wildcard(wildcard) Return a list of works that match the wildcard. Args: wildcard (str): The wildcard to match. Returns: list: List of works that match the wildcard. .. py:method:: is_empty() Check if the category is empty. Returns: bool: True if the category is empty, False otherwise. .. py:method:: scan_works() Scan the category folder and return the works. Returns: dict: Dictionary of works under the category. .. py:property:: all_works Return all the works under the category. .. py:attribute:: object_type .. py:property:: works Return the works under the category. .. py:data:: LOG