Blender Kitsu: Refactor Shot Builder #183

Merged
Nick Alberelli merged 55 commits from TinyNick/blender-studio-pipeline:feature/shot-builder-2 into main 2023-12-21 23:58:21 +01:00
Showing only changes of commit d978f575c5 - Show all commits

View File

@ -10,20 +10,24 @@ active_project = None
def get_shots_for_seq(
self: Any, context: bpy.types.Context
) -> List[Tuple[str, str, str]]:
if not self.seq_id:
return []
if self.seq_id != '':
seq = active_project.get_sequence(self.seq_id)
return cache.get_shots_enum_for_seq(self, context, seq)
shot_enum = cache.get_shots_enum_for_seq(self, context, seq)
if shot_enum != []:
return shot_enum
return [('NONE', "No Shots Found", '')]
def get_tasks_for_shot(
self: Any, context: bpy.types.Context
) -> List[Tuple[str, str, str]]:
global active_project
if not self.seq_id:
return []
if not (self.shot_id == '' or self.shot_id == 'NONE'):
shot = active_project.get_shot(self.shot_id)
return cache.get_shot_task_types_enum_for_shot(self, context, shot)
task_enum = cache.get_shot_task_types_enum_for_shot(self, context, shot)
if task_enum != []:
return task_enum
return [('NONE', "No Tasks Found", '')]
class KITSU_OT_build_new_shot(bpy.types.Operator):