[Blender_Kitsu] Publish VSE Edit as Revision on Kitsu #7
@ -2407,11 +2407,6 @@ def set_revision_int(prev_rev=None):
|
|||||||
if prev_rev is None:
|
if prev_rev is None:
|
||||||
return 1
|
return 1
|
||||||
return prev_rev+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):
|
class KITSU_OT_vse_publish_edit_revision(bpy.types.Operator):
|
||||||
bl_idname = "kitsu.vse_publish_edit_revision"
|
bl_idname = "kitsu.vse_publish_edit_revision"
|
||||||
bl_label = "Render and 'Publish as 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}'"
|
f"Render path is not set to a directory. '{self.render_dir}'"
|
||||||
)
|
)
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
edits = self.get_edit_entry_items(context)
|
edit_entry = gazu.edit.get_edit(self.edit_entry)
|
||||||
edit_name = get_enum_item_name(edits, self.edit_entry)
|
render_name = f"{active_project.name}_{edit_entry.get('name')}_v{revision}.mp4"
|
||||||
render_name = f"{active_project.name}_{edit_name}_v{revision}.mp4"
|
|
||||||
render_path = Path(render_dir).joinpath(render_name)
|
render_path = Path(render_dir).joinpath(render_name)
|
||||||
|
|
||||||
# Render Sequence to .mp4
|
# Render Sequence to .mp4
|
||||||
|
Loading…
Reference in New Issue
Block a user