fix(hiero): loading Tasks correctly

This commit is contained in:
Jakub Jezek 2020-10-07 17:02:05 +02:00
parent 0eaf09101e
commit dc77711d51
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
11 changed files with 33 additions and 26 deletions

View file

@ -143,15 +143,17 @@ class IntegrateHierarchyToFtrack(pyblish.api.ContextPlugin):
# existing_tasks.append(child['type']['name'])
for task in tasks:
if task.lower() in existing_tasks:
task_name = next(iter(task))
task_type = task[task_name]["type"]
if task_name.lower() in existing_tasks:
print("Task {} already exists".format(task))
continue
tasks_to_create.append(task)
tasks_to_create.append((task_name, task_type))
for task in tasks_to_create:
for task_name, task_type in tasks_to_create:
self.create_task(
name=task,
task_type=task,
name=task_name,
task_type=task_type,
parent=entity
)
try: