Project

class odin.source.core.project.Project(root=None, name=None, data=None)

Project object.

Usage:

project = Project.new(‘root/path’, ‘NAME’)

project = Project.load(‘root/path’, ‘NAME’)

project.new_asset(“asset_name”, “ASSET_TYPE”): CHARA, PROPS, SET or FX

assets = project.get_assets(“ASSET_TYPE”): List of created assets

Parameters
  • name (str) – name of the loaded project

  • root (str) – path of the loaded project

  • data (str) – dictionary containing data of the loaded project

Return type

None

property data
Return type

Dict[str]

get_assets(asset_type)
Return type

List[str]

Parameters

asset_type (str) –

get_sequences()
Return type

List[str]

static list(root=None)

List the projects found in the given root path.

Parameters

root (Optional[str]) – folder path that contain the projects

Return type

List[str]

Returns

List of projects names

classmethod load(root, name)

Load an existing project.

Parameters
  • root (str) – Path where the project is

  • name (str) – Name of the project to load

Return type

Project

Returns

Project object

Raises

RuntimeError – if the project does not exist

property name
Return type

str

classmethod new(root, name)

Create a new project.

Parameters
  • root (str) – Path to put the project in

  • name (str) – Name of the project

Return type

Project

Returns

Project object

new_asset(name, asset_type)
Return type

Asset

Parameters
  • name (str) –

  • asset_type (str) –

new_sequence(name)
Return type

Sequence

Parameters

name (str) –

property project_path
Return type

str