[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 2f308f0b0d - Show all commits

View File

@ -313,7 +313,8 @@ class KITSU_OT_sqe_push_new_edit(bpy.types.Operator):
bl_label = "Submit New Kitsu Edit"
bl_description = "Creates a new edit on Kitsu server."
confirm: bpy.props.BoolProperty(name="confirm")
name: bpy.props.StringProperty(name="Edit Name")
description: bpy.props.StringProperty(name="Description")
@classmethod
def poll(cls, context: bpy.types.Context) -> bool:
@ -322,12 +323,25 @@ class KITSU_OT_sqe_push_new_edit(bpy.types.Operator):
and cache.project_active_get()
)
def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)
def draw(self, context: bpy.types.Context) -> None:
layout = self.layout
layout.prop(self, "name")
layout.prop(self, "description")
def execute(self, context: bpy.types.Context) -> Set[str]:
project_active = cache.project_active_get()
gazu.edit.new_edit(
project_active.id,
self.name,
self.description,
context.scene.frame_start,
) #TODO Pass actual render file to this function
self.report(
{"INFO"},
f"Submitted new edit", #TODO Add name of new edit
f"Submitted new edit '{self.name}'"
)
return {"FINISHED"}