Bases: sqlalchemy.ext.declarative.Base
Manages project related data.
The Project class is in the center of the Asset Management system. Everything starts with the Project instance.
Creating a Project
All Projects have their own folder structure in the repository. Creating a Project instance is not enough to physically create the project folder structure. To make it happen the create() should be called to finish the creation process. This will both create the project folder and the general structure of the project and a .metadata.db file. Any Project, which has a .metadata.db file (thus a folder with a name of Project.name) considered an existing Project and Project.exists returns True.
A Project can not be created without a name or with a name which is None or with an invalid name. For example, a project with name “’^+’^” can not be created because the name will become an empty string after the name validation process.
The name of the project can freely be changed, but the path of the project will not change after the name of the project is changed.
Parameters: |
|
---|
Methods
__init__(name[, code, client]) | |
create() | Creates the project directory structure and saves the project, thus |
query() | |
save() | Saves the Project related information to the database. |
Attributes
active | |
client | |
client_id | |
code | Returns the code of this Project instance. |
description | |
fps | The frames per second setting of this project. |
full_path | The full_path of this project instance. |
height | |
id | |
metadata | A collection of Table objects and their associated schema constructs. |
name | |
path | The path of this project instance. |
pixel_aspect | |
rev_number_padding | |
rev_number_prefix | |
sequences | |
shot_number_padding | |
shot_number_prefix | |
structure | |
ver_number_padding | |
ver_number_prefix | |
width |
The frames per second setting of this project. The default value is 25
Saves the Project related information to the database.
If there is no .metadata.db file it will be created, but be careful that the project structure will not be created. The safest way to both create the project structure and the .metadata.db file is to call the create() method.
Creates the project directory structure and saves the project, thus creates the .metadata.db file in the repository.