Пример #1
0
 def generate_fixture_shot_working_file(self):
     self.working_file = WorkingFile(name="S01_P01_animation",
                                     comment="",
                                     revision=1,
                                     task_id=self.task.id,
                                     entity_id=self.shot.id,
                                     person_id=self.person.id)
     self.working_file.save()
Пример #2
0
 def generate_fixture_working_file(self):
     self.working_file = WorkingFile(name="S01_P01_modeling",
                                     comment="",
                                     revision=1,
                                     task_id=self.task.id,
                                     entity_id=self.entity.id,
                                     person_id=self.person.id)
     self.working_file.save()
Пример #3
0
 def generate_fixture_shot_working_file(self):
     self.working_file = WorkingFile(name="main",
                                     comment="",
                                     revision=1,
                                     task_id=self.shot_task.id,
                                     entity_id=self.shot.id,
                                     person_id=self.person.id,
                                     software_id=self.software.id)
     self.working_file.save()
Пример #4
0
 def generate_fixture_working_file(self, name="main", revision=1):
     self.working_file = WorkingFile(name=name,
                                     comment="",
                                     revision=revision,
                                     task_id=self.task.id,
                                     entity_id=self.entity.id,
                                     person_id=self.person.id,
                                     software_id=self.software.id)
     self.working_file.save()
     return self.working_file
Пример #5
0
def create_new_working_revision(entity_id,
                                task_id,
                                person_id,
                                comment,
                                revision=0):
    working_files = WorkingFile.query.filter_by(
        entity_id=entity_id,
        task_id=task_id).order_by(desc(WorkingFile.revision)).all()

    if revision == 0 and len(working_files) > 0:
        revision = working_files[0].revision + 1
    elif revision == 0:
        revision = 1

    working_file = WorkingFile(comment=comment,
                               revision=revision,
                               task_id=task_id,
                               entity_id=entity_id,
                               person_id=person_id)
    working_file.save()

    return working_file