[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 1cdc515034 - Show all commits

View File

@ -2407,11 +2407,6 @@ def set_revision_int(prev_rev=None):
if prev_rev is None:
return 1
return prev_rev+1
def get_enum_item_name(items, key):
for item in items:
if item[0] == key:
return item[1]
class KITSU_OT_vse_publish_edit_revision(bpy.types.Operator):
bl_idname = "kitsu.vse_publish_edit_revision"
bl_label = "Render and 'Publish as Revision'"
@ -2481,9 +2476,8 @@ class KITSU_OT_vse_publish_edit_revision(bpy.types.Operator):
f"Render path is not set to a directory. '{self.render_dir}'"
)
return {"CANCELLED"}
edits = self.get_edit_entry_items(context)
edit_name = get_enum_item_name(edits, self.edit_entry)
render_name = f"{active_project.name}_{edit_name}_v{revision}.mp4"
edit_entry = gazu.edit.get_edit(self.edit_entry)
render_name = f"{active_project.name}_{edit_entry.get('name')}_v{revision}.mp4"
render_path = Path(render_dir).joinpath(render_name)
# Render Sequence to .mp4