[Blender_Kitsu] Publish VSE Edit as Revision on Kitsu #7

Merged
Nick Alberelli merged 28 commits from :feature/upload_render_to_kitsu into master 2023-04-17 19:02:15 +02:00
Showing only changes of commit 8bba239422 - Show all commits

View File

@ -3,6 +3,7 @@ from . import client as raw
from .sorting import sort_by_name from .sorting import sort_by_name
from .cache import cache from .cache import cache
from .helpers import normalize_model_parameter
default = raw.default_client 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) 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) uploaded_preview = gazu.task.add_preview(task_entity, new_comment, rendered_filepath)
return new_comment 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]]