[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 .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
|
||||||
|
|
||||||
@ -46,4 +47,18 @@ def add_comment_on_edit_task(task_id:str,
|
|||||||
task_entity = gazu.task.get_task(task_id)
|
task_entity = gazu.task.get_task(task_id)
|
||||||
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]]
|
Loading…
Reference in New Issue
Block a user