models¶
- jukedj.models.GLOBAL_NAME = 'Global'¶
Name for global shots and sequences
- jukedj.models.RNDSEQ_NAME = 'RnD'¶
Name for the rnd sequence
- jukedj.models.DEFAULT_ASSETTYPES = [('prop', 'props that might be animated. props usually have a simple rig.'), ('char', 'characters, that will be animated.'), ('loc', 'locations and static objects.')]¶
Tuples with name and description for the default assettypes that should always be available.
- jukedj.models.DEFAULT_DEPARTMENTS = [('Modeling', 'mod', 100, True), ('Shading', 'shd', 200, True), ('Rigging', 'rig', 300, True), ('Animation', 'ani', 100, False), ('Fx', 'fx', 200, False), ('Lighting', 'lgt', 300, False), ('Rendering', 'rdr', 400, False), ('Compositing', 'comp', 500, False), ('Grading', 'grd', 600, False)]¶
Tuples with name, short, ordervalue and assetflag for the default departments. Every project will get these departments by default.
- class jukedj.models.Project(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a project
A project is at the top of the organisation hierarchy. All shots, assets etc belong to a certain project. When a project is created, muke.models.prj_post_save_handler() is executed. To make a project fully functional it needs at least a few entitys. the handler creates them automatically:
- create all default departments (for shots and assets). These are required, because we need them for example for handoff files.
- create all default assettypes. This will be ‘char’, ‘prop’ and ‘loc’.
- create all default sequences. Creates a global and a rnd sequence. The global squence contains a global shot where you can store project wide stuff, like caches, lightrigs etc. The rnd sequence has one shot for every user, where users can test, research and develop.
The name of a project should only contain alphanumerical characters, spaces and underscores. The short of a project will be used in filenames and should only contain alphanumerical characters.
- users¶
- globalseq[source]¶
Return the global sequence
Returns: the global sequence of the project Return type: muke.models.Sequence Raises: None
- rndseq[source]¶
Return the rnd sequence
Returns: the rnd sequence of the project Return type: muke.models.Sequence Raises: None
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Project.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Project.asset_set¶
- Project.atype_set¶
- Project.department_set¶
- Project.get_next_by_date_created(*moreargs, **morekwargs)¶
- Project.get_previous_by_date_created(*moreargs, **morekwargs)¶
- Project.objects = <django.db.models.manager.Manager object at 0x0000000004E9A630>¶
- Project.sequence_set¶
- Project.shot_set¶
- Project.task_set¶
- class jukedj.models.Atype(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for an assettype.
Assettypes group assets into categories. A assettype can belong to several projects. E.g. every project has a ‘prop’ type. You can create new ones and projects. These projects then have a new asset category.
- projects¶
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Atype.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Atype.asset_set¶
- Atype.objects = <django.db.models.manager.Manager object at 0x0000000004E9AE80>¶
- class jukedj.models.Sequence(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a sequence
sequences group shots together. There are two special sequences in each project: ‘Global’ and ‘RnD’. See muke.models.Project for details
- project¶
- globalshot[source]¶
Return the global shot
Returns: the global shot of the sequence Return type: muke.models.Shot Raises: None
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Sequence.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Sequence.objects = <django.db.models.manager.Manager object at 0x0000000004EA9320>¶
- Sequence.shot_set¶
- class jukedj.models.Department(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a department
A department describes what kind of work/data we handle. E.g. the shading department handles shaders. The modeling department handles models. There are a few default ones that should always be available. They get created with the first project. Projects can share departments. So there is only one modeling department. A department can either be for assets or for shots, depending on muke.models.Department.assetflag()
- projects¶
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Department.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Department.objects = <django.db.models.manager.Manager object at 0x0000000004EA9D68>¶
- Department.task_set¶
- class jukedj.models.Task(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a task
A task describes what kind of work (department) a set of users should do on a specific element (shot or asset). E.g. you create new tasks linked to the modeling department for asset ‘wolf’. If you add users to the task, these users know that they have to create the model of wolf.
A task can be linked to either a shot or an asset.
- project¶
- department¶
- users¶
- content_type¶
- element¶
Provides a generic relation to any object through content-type/object-id fields.
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Task.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Task.objects = <django.db.models.manager.Manager object at 0x0000000004EB3A20>¶
- Task.taskfile_set¶
- class jukedj.models.Asset(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for an asset
On creation an asset gets a task assigned for each asset department that is connected to the project.
- project¶
- atype¶
- tasks¶
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
- assets¶
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Asset.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Asset.asset_set¶
- Asset.objects = <django.db.models.manager.Manager object at 0x00000000069184E0>¶
- Asset.shot_set¶
- class jukedj.models.Shot(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a shot
there is one special shot in every sequence. It is the ‘Global’ shot. In the ‘RnD’ sequence, every user has its own shot. On creation a shot gets a task assigned for each shot department that is connected to the project.
- project¶
- sequence¶
- tasks¶
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
- assets¶
- duration[source]¶
Return the duration
Returns: duration of the shot in frames Return type: int Raises: None
- clean()[source]¶
Reimplemented from models.Model. Check if startframe is before endframe
Returns: None Return type: None Raises: ValidationError
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Shot.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Shot.objects = <django.db.models.manager.Manager object at 0x00000000069272E8>¶
- class jukedj.models.Software(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a software e.g. Maya that can store a thumbnail etc
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Software.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Software.file_set¶
- Software.objects = <django.db.models.manager.Manager object at 0x0000000006927518>¶
- class jukedj.models.Note(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for comments to objects
- content_type¶
- parent¶
Provides a generic relation to any object through content-type/object-id fields.
- user¶
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Note.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Note.get_next_by_date_created(*moreargs, **morekwargs)¶
- Note.get_next_by_date_updated(*moreargs, **morekwargs)¶
- Note.get_previous_by_date_created(*moreargs, **morekwargs)¶
- Note.get_previous_by_date_updated(*moreargs, **morekwargs)¶
- Note.objects = <django.db.models.manager.Manager object at 0x0000000006927A58>¶
- class jukedj.models.File(*args, **kwargs)[source]¶
Bases: django.db.models.base.Model
Model for a general file that is stored somewhere on a disk
- user¶
- software¶
- notes¶
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
- ext[source]¶
Return the extension of the file
Returns: the extension with the extension seperator, e.g .mb or an empty string if there is no extension Return type: str Raises: None
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception File.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- File.get_next_by_date_created(*moreargs, **morekwargs)¶
- File.get_next_by_date_updated(*moreargs, **morekwargs)¶
- File.get_previous_by_date_created(*moreargs, **morekwargs)¶
- File.get_previous_by_date_updated(*moreargs, **morekwargs)¶
- File.objects = <django.db.models.manager.Manager object at 0x0000000006935080>¶
- File.taskfile¶
- class jukedj.models.TaskFile(*args, **kwargs)[source]¶
Bases: jukedj.models.File
Model for a file that belongs to a specific task
- task¶
- exception DoesNotExist¶
Bases: jukedj.models.DoesNotExist
- exception TaskFile.MultipleObjectsReturned¶
Bases: jukedj.models.MultipleObjectsReturned
- TaskFile.file_ptr¶
- TaskFile.notes¶
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
- TaskFile.objects = <django.db.models.manager.Manager object at 0x00000000069356A0>¶
- jukedj.models.add_default_deps(project)[source]¶
Add or create the default departments for the given project
Parameters: project (muke.models.Project) – the project that needs default departments Returns: None Return type: None Raises: None
- jukedj.models.add_default_atypes(project)[source]¶
Add or create the default assettypes for the given project
Parameters: project (muke.models.Project) – the project that needs default assettypes Returns: None Return type: None Raises: None
- jukedj.models.add_default_sequences(project)[source]¶
Add or create the default sequences for the given project
Parameters: project (muke.models.Project) – the project that needs default sequences Returns: None Return type: None Raises: None
- jukedj.models.add_userrnd_shot(project)[source]¶
Add a rnd shot for every user in the project
Parameters: project (muke.models.Project) – the project that needs its rnd shots updated Returns: None Return type: None Raises: None
- jukedj.models.prj_post_save_handler(sender, **kwargs)[source]¶
Post save receiver for when a Project is saved.
Creates a rnd shot for every user.
On creations does:
- create all default departments
- create all default assettypes
- create all default sequences
Parameters: sender (muke.models.Project) – the project class Returns: None Raises: None
- jukedj.models.seq_post_save_handler(sender, **kwargs)[source]¶
Post save receiver for when a sequence is saved.
creates a global shot.
Parameters: sender (muke.models.Sequence) – the sequence class Returns: None Raises: None
- jukedj.models.create_all_tasks(element)[source]¶
Create all tasks for the element
Parameters: element (muke.models.Shot | muke.models.Asset) – The shot or asset that needs tasks Returns: None Return type: None Raises: None