fix clearing od the project
parent
5f124c3573
commit
4a2dc9e55e
|
@ -129,6 +129,7 @@ class VSETB_OT_load_projects(Operator):
|
|||
project.name = project_data['name']
|
||||
project.id = project_data['id']
|
||||
|
||||
|
||||
if project.type == 'TVSHOW':
|
||||
episode_datas = tracker.get_episodes(project_data)
|
||||
for episode_data in episode_datas:
|
||||
|
@ -146,6 +147,7 @@ class VSETB_OT_load_projects(Operator):
|
|||
if ep.name not in ep_names:
|
||||
project.episodes.remove(list(project.episodes).index(ep))
|
||||
|
||||
project.metadata_types.clear()
|
||||
for metadata_data in tracker.get_metadata_types(project_data):
|
||||
#pprint(metadata_data)
|
||||
metadata_type = project.metadata_types.add()
|
||||
|
@ -162,15 +164,18 @@ class VSETB_OT_load_projects(Operator):
|
|||
|
||||
metadata_type['entity_type'] = metadata_data['entity_type'].upper()
|
||||
|
||||
project.task_statuses.clear()
|
||||
for status_data in tracker.get_task_statuses(project_data):
|
||||
#print(metadata_data)
|
||||
task_status = project.task_statuses.add()
|
||||
task_status.name = status_data['short_name'].upper()
|
||||
|
||||
project.task_types.clear()
|
||||
for task_type_data in tracker.get_shot_task_types(project_data):
|
||||
task_type = project.task_types.add()
|
||||
task_type.name = task_type_data['name']
|
||||
|
||||
project.asset_types.clear()
|
||||
for asset_type_data in tracker.get_asset_types(project_data):
|
||||
asset_type = project.asset_types.add()
|
||||
asset_type.name = asset_type_data['name']
|
||||
|
|
Loading…
Reference in New Issue