Пример #1
0
 def generate_fixture_task_type(self):
     self.task_type = TaskType.create(name="Shaders",
                                      short_name="shd",
                                      color="#FFFFFF",
                                      department_id=self.department.id)
     self.task_type_animation = TaskType.create(
         name="Animation",
         short_name="anim",
         color="#FFFFFF",
         department_id=self.department_animation.id)
Пример #2
0
def get_or_create_task_type(
    department,
    name,
    color="#888888",
    priority=1,
    for_shots=False,
    for_entity="Asset",
    short_name="",
    shotgun_id=None,
):
    """
    Create a new task type if it doesn't exist. If it exists, it returns the
    type from database.
    """
    task_type = TaskType.get_by(name=name)
    if task_type is None:
        task_type = TaskType.create(
            name=name,
            short_name=short_name,
            department_id=department["id"],
            color=color,
            priority=priority,
            for_shots=for_shots,
            shotgun_id=shotgun_id,
        )
        events.emit("task_type:new", {"task_type_id": task_type.id})
    return task_type.serialize()
Пример #3
0
Файл: base.py Проект: cgwire/zou
 def generate_fixture_task_type(self):
     self.task_type = TaskType.create(
         name="Shaders",
         short_name="shd",
         color="#FFFFFF",
         for_entity="Asset",
         department_id=self.department.id,
     )
     self.task_type_concept = TaskType.create(
         name="Concept",
         short_name="cpt",
         color="#FFFFFF",
         for_entity="Asset",
         department_id=self.department.id,
     )
     self.task_type_modeling = TaskType.create(
         name="Modeling",
         short_name="mdl",
         color="#FFFFFF",
         for_entity="Asset",
         department_id=self.department.id,
     )
     self.task_type_animation = TaskType.create(
         name="Animation",
         short_name="anim",
         color="#FFFFFF",
         for_entity="Shot",
         department_id=self.department_animation.id,
     )
     self.task_type_layout = TaskType.create(
         name="Layout",
         short_name="layout",
         color="#FFFFFF",
         for_entity="Shot",
         department_id=self.department_animation.id,
     )
     self.task_type_edit = TaskType.create(
         name="Edit",
         short_name="edit",
         color="#FFFFFF",
         for_entity="Edit",
     )