tik_manager4.objects.category

Module for Category object.

Category object is responsible for handling the works and publishes under a task.

Attributes

LOG

Classes

Category

Category object to handle works and publishes under a task.

Module Contents

class Category(parent_task, definition=None, **kwargs)

Bases: tik_manager4.objects.entity.Entity

Category object to handle works and publishes under a task.

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.

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.

Returns:

tik_manager4.objects.work: Work object.

create_work_from_path(name, file_path, override_dcc='standalone', notes='', ignore_checks=True)

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.

Returns:

tik_manager4.objects.work: Work object.

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

delete_works()

Mark the category as deleted.

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.

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.

is_empty()

Check if the category is empty.

Returns:

bool: True if the category is empty, False otherwise.

scan_works()

Scan the category folder and return the works.

Returns:

dict: Dictionary of works under the category.

property all_works
Return all the works under the category.
object_type
property works
Return the works under the category.
LOG