tik_manager4.objects.project ============================ .. py:module:: tik_manager4.objects.project .. autoapi-nested-parse:: Project Module. Inherits from Subproject and adds project specific methods and properties. Classes ------- .. autoapisummary:: tik_manager4.objects.project.Project Module Contents --------------- .. py:class:: Project(path=None, name=None) Bases: :py:obj:`tik_manager4.objects.subproject.Subproject` Project class to handle project specific data and methods. .. py:method:: create_sub_project(name, parent_uid=None, parent_path=None, uid=None, **properties) Create a sub-project under a specified parent sub and write data to persistent database. Either parent_uid or parent_path should be provided. Args: name (str): Name of the subproject parent_uid (int): Parent Subproject Unique ID or project itself. Either this or parent_path needs to be defined parent_path (str): Parent Sub-Project Relative path. If uid defined this will be skipped uid (int): Unique ID of the subproject. If not provided, a new one will be generated. **properties: Additional properties to be added to the subproject Returns: Subproject: The created subproject object if successful, -1 otherwise. .. py:method:: create_task(name, categories=None, parent_uid=None, parent_path=None, metadata_overrides=None) Create a task and stores it in persistent database. Either parent_uid or parent_path must be provided. Args: name (str): Name of the task. categories (list): List of categories. parent_uid (int): Parent subproject unique id. parent_path (str): Parent subproject relative path. metadata_overrides (dict): Metadata overrides for the task. Returns: int: 1 if successful, -1 otherwise. .. py:method:: delete_sub_project(uid=None, path=None) Delete a subproject and all its children. Either uid or path should be provided. Args: uid (int): The unique id of the subproject. path (str): The relative path of the subproject. Returns: int: 1 if successful, -1 otherwise. .. py:method:: edit_sub_project(uid=None, path=None, name=None, **properties) Edit a subproject and store it in persistent database. Either uid or path must be provided. Args: uid (int): Unique id of the subproject. path (str): Relative path of the subproject. name (str): New name of the subproject. **properties: Additional properties to be added to the subproject. Returns: int: 1 if successful, -1 otherwise. .. py:method:: find_work_by_absolute_path(file_path) Using the absolute path of the scene file return work object and version number. Args: file_path: (String) Absolute path of the scene file. Returns: Tuple: (, ) .. py:method:: get_current_work() Get the current work object AND version by resolving the current scene. Returns: Tuple(, ) .. py:method:: get_project() Return the project object. .. py:method:: save_structure() Save the project structure to the database. Project structure is the tree of subprojects. .. py:property:: absolute_path Return the absolute path of the project. .. py:property:: database_path Return the database path of the project. .. py:property:: folder Return the root of the project, where all projects lives happily .. py:attribute:: log .. py:attribute:: object_type .. py:property:: path Return an empty string indicating the project root.