Blender Kitsu: Refactor Shot Builder #183
@ -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 []
|
||||
seq = active_project.get_sequence(self.seq_id)
|
||||
return cache.get_shots_enum_for_seq(self, context, seq)
|
||||
if self.seq_id != '':
|
||||
seq = active_project.get_sequence(self.seq_id)
|
||||
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 []
|
||||
shot = active_project.get_shot(self.shot_id)
|
||||
return cache.get_shot_task_types_enum_for_shot(self, context, shot)
|
||||
if not (self.shot_id == '' or self.shot_id == 'NONE'):
|
||||
shot = active_project.get_shot(self.shot_id)
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user