Previous topic

oyProjectManager.core.models.Project

Next topic

oyProjectManager.core.models.Shot

This Page

oyProjectManager.core.models.Sequence

Inheritance diagram of oyProjectManager.core.models.Sequence

class oyProjectManager.core.models.Sequence(project, name, code=None)[source]

Bases: sqlalchemy.ext.declarative.Base

Sequence object to help manage sequence related data.

By definition a Sequence is a group of Shots.

The class should be initialized with a Project instance and a sequenceName.

When a Sequence instance is created it is not persisted in the project database. To do it the save() should be called.

The structure of the Sequence should be created by calling its create() method after it is saved.

Two sequences are considered to be the same if their name and their project names are matching.

Parameters:
  • project (Project or string) – The owner Project. A Sequence instance can not be created without a proper Project instance passed to it with the project argument.
  • name (str) – The name of the sequence. It is heavily formatted. Follows the same naming rules with the Project.
__init__(project, name, code=None)[source]

Methods

__init__(project, name[, code])
add_alternative_shot(shot_number) adds a new alternative to the given shot
add_shots(shot_range_formula) adds new shots to the sequence
create() creates the sequence structure
get_next_alternate_shot_number(shot_number) returns the next alternate shot_number number for the given shot_number number
query()
save() persists the sequence in the database

Attributes

code
description
id
metadata A collection of Table objects and their associated schema constructs.
name
project a read-only attribute to return the related Project of this Sequence
project_id
shots
create()[source]

creates the sequence structure

save()[source]

persists the sequence in the database

add_shots(shot_range_formula)[source]

adds new shots to the sequence

shot_range_formula should be a range in on of the following format: # #,# #-# (not supported anymore) #,#-# (not supported anymore) #,#-#,# (not supported anymore) #-#,# (not supported anymore) etc.

add_alternative_shot(shot_number)[source]

adds a new alternative to the given shot

returns the alternative shot number

get_next_alternate_shot_number(shot_number)[source]

returns the next alternate shot_number number for the given shot_number number

project[source]

a read-only attribute to return the related Project of this Sequence instance