[Blender_Kitsu] Publish VSE Edit as Revision on Kitsu #7
@ -3,6 +3,7 @@ from . import client as raw
|
||||
from .sorting import sort_by_name
|
||||
|
||||
from .cache import cache
|
||||
from .helpers import normalize_model_parameter
|
||||
|
||||
default = raw.default_client
|
||||
|
||||
@ -47,3 +48,17 @@ def add_comment_on_edit_task(task_id:str,
|
||||
new_comment = gazu.task.add_comment(task_entity, task_entity["task_status"], comment)
|
||||
uploaded_preview = gazu.task.add_preview(task_entity, new_comment, rendered_filepath)
|
||||
return new_comment
|
||||
|
||||
@cache
|
||||
def get_all_previews_for_edit(edit, client=default):
|
||||
"""
|
||||
Args:
|
||||
episode (str / dict): The episode dict or the episode ID.
|
||||
|
||||
Returns:
|
||||
list: Shots which are children of given episode.
|
||||
"""
|
||||
edit = normalize_model_parameter(edit)
|
||||
edit_previews = (raw.fetch_all(f"edits/{edit['id']}/preview-files", client=client))
|
||||
for key in [key for key in enumerate(edit_previews.keys())]:
|
||||
return edit_previews[key[1]]
|
Loading…
Reference in New Issue
Block a user