Previous topic

stalker.models.type.Type

This Page

stalker.models.version.Version

Inheritance diagram of stalker.models.version.Version

class stalker.models.version.Version(task=None, take_name='Main', inputs=None, outputs=None, parent=None, full_path=None, **kwargs)[source]

Bases: stalker.models.link.Link, stalker.models.mixins.StatusMixin

Holds information about the created versions (files) for a class:~stalker.models.task.Task

A Version holds information about the created files related to a class:~stalker.models.task.Task. So if one creates a new version for a file or a sequences of file for a Task then the information is hold in the Version instance.

Parameters:
  • take_name (str) – A short string holding the current take name. Takes in Stalker are used solely for grouping individual versions together. Versions with the same take_name (of the same Task) are numbered together. It can be any alphanumeric value (a-zA-Z0-9_). The default is the string “Main”. When skipped or given as None or an empty string then it will use the default value. It can not start with a number. It can not have white spaces.
  • inputs (list of Link) – A list o Link instances, holding the inputs of the current version. It could be a texture for a Maya file or an image sequence for Nuke, or anything those you can think as the input for the current Version.
  • outputs (list of Link instances) – A list of Link instances, holding the outputs of the current version. It could be the rendered image sequences out of Maya or Nuke, or it can be a Targa file which is the output of a Photoshop file (*.psd), or anything that you can think as the output which is created out of this Version.
  • task (Task) – A Task instance showing the owner of this Version.
  • parent (Version) – A Version instance which is the parent of this Version. It is mainly used to see which Version is derived from which in the Version history of a Task.
__init__(task=None, take_name='Main', inputs=None, outputs=None, parent=None, full_path=None, **kwargs)[source]

Methods

__init__([task, take_name, inputs, outputs, ...])
update_paths() updates the path variables

Attributes

absolute_full_path Returns the absolute full path of this version including the
absolute_path Returns the absolute path of this version including the repository
children The children Version instances
created_by The User who has created this object.
created_by_id The id of the User who has created
date_created A datetime.datetime instance showing the creation date and time of this object.
date_updated A datetime.datetime instance showing the update date and time of this object.
description Description of this object.
entity_id
entity_type
extension the extension property
filename the filename property
full_path The full path of the url to the link.
generic_data This attribute can hold any kind of data which exists in SOM.
id
inputs The inputs of the current version.
is_published
link_id
max_version_number returns the maximum version number for this Version
metadata A collection of Table objects and their associated schema
name Name of this object
nice_name Nice name of this object.
notes All the Notess attached to this entity.
original_filename
outputs The outputs of the current version.
parent
parent_id
path the path property
plural_class_name the plural name of this class
query ORM-level SQL construction object.
status The current status of the object.
status_id
status_list
status_list_id
tags A list of tags attached to this object.
take_name Takes in Versions are used solely for grouping individual
task The Task instance that this Version is created for.
task_id
thumbnail
thumbnail_id
tjp_id returns TaskJuggler compatible id
to_tjp renders a TaskJuggler compliant string used for TaskJuggler
type The type of the object.
type_id The id of the Type of this entity.
updated_by The User who has updated this object.
updated_by_id The id of the User who has updated
version_id
version_number The version_number attribute is read-only.
children

The children Version instances which are derived from this particular Version instance.

take_name

Takes in Versions are used solely for grouping individual versions together.

task

The Task instance that this Version is created for.

version_number

The version_number attribute is read-only. Trying to change it will produce an AttributeError.

inputs

The inputs of the current version.

It is a list of Link instances.

outputs

The outputs of the current version.

It is a list of Link instances.

max_version_number[source]

returns the maximum version number for this Version :return: int

created_by

The User who has created this object.

created_by_id

The id of the User who has created this entity.

date_created

A datetime.datetime instance showing the creation date and time of this object.

date_updated

A datetime.datetime instance showing the update date and time of this object.

description

Description of this object.

extension

the extension property

filename

the filename property

full_path

The full path of the url to the link.

generic_data

This attribute can hold any kind of data which exists in SOM.

name

Name of this object

nice_name

Nice name of this object.

It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.

notes

All the Notess attached to this entity.

It is a list of Note instances or an empty list, setting it None will raise a TypeError.

path

the path property

plural_class_name

the plural name of this class

status

The current status of the object.

It is a Status instance which is one of the Statuses stored in the status_list attribute of this object.

tags

A list of tags attached to this object.

It is a list of Tag instances which shows the tags of this object

tjp_id

returns TaskJuggler compatible id

to_tjp

renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.

type

The type of the object.

It is an instance of Type with a proper target_entity_type.

type_id

The id of the Type of this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.

updated_by

The User who has updated this object.

updated_by_id

The id of the User who has updated this entity.

update_paths()[source]

updates the path variables

absolute_full_path[source]

Returns the absolute full path of this version including the repository path of the related project

Returns:str
absolute_path[source]

Returns the absolute path of this version including the repository path of the related project

Returns:str