Previous topic

oyProjectManager.core.models.Sequence

Next topic

oyProjectManager.core.models.Repository

This Page

oyProjectManager.core.models.Shot

Inheritance diagram of oyProjectManager.core.models.Shot

class oyProjectManager.core.models.Shot(sequence, number, start_frame=1, end_frame=1, description='')[source]

Bases: oyProjectManager.core.models.VersionableBase

The class that enables the system to manage shot data.

Note

There is a design flaw, which I’ve recognized at the day I’ll release version 0.2.0. The _code of the Shot is not stored in the database, whereas the _code of a the Asset is. So one can not query Shot’s by using the _code attribute, but it is easy to get the same effect by using the number attribute. So you need to create you queries with number instead of _code.

I hope I’ll fix it in a later version.

The total of the handle attributes should not be bigger then duration-1, in which results no frame for the real shot.

Parameters:
  • sequence – The Sequence instance that this Shot should belong to. The Sequence may not be created yet. Skipping it or passing None will raise TypeError, and anything other than a Sequence will raise a TypeError.
  • number – A string or integer holding the number of this shot. Can not be None or can not be skipped, a TypeError will be raised either way. It will be used to create the code attribute.
  • start_frame – The start frame of this shot. Should be an integer, any other type will raise TypeError. The default value is 1 and skipping it will result the start_frame to be set to 1.
  • end_frame – The end frame of this shot. Should be an integer, any other type will raise TypeError. The default value is 1 and skipping it will result the end_frame to be set to 1.
  • description – A string holding the short description of this shot. Can be skipped.
__init__(sequence, number, start_frame=1, end_frame=1, description='')[source]

Methods

__init__(sequence, number[, start_frame, ...])
query()
save() commits the shot to the database

Attributes

code Returns the code of this shot by composing the
description
duration the duration
end_frame
handle_at_end
handle_at_start
id
metadata A collection of Table objects and their associated schema constructs.
number
project the Project instance which this object is related to
project_id
sequence The sequence of the current Shot instance.
sequence_id
shot_id
start_frame
thumbnail_full_path returns the thumbnail full path for this versionable
versionable_type
versions the Version instances attached to this object
sequence[source]

The sequence of the current Shot instance. :returns: Sequence

duration[source]

the duration

save()[source]

commits the shot to the database

code[source]
Returns the code of this shot by composing the
number with the

shot_prefix attribute of the Project

>> shot.number
  "1"
>> shot.code
  "SH001"
>> shot.number
  "12A"
>> shot.code
  "SH012A"
project

the Project instance which this object is related to

It is a read-only attribute

thumbnail_full_path

returns the thumbnail full path for this versionable

versions

the Version instances attached to this object

It is a read-only attribute