[Blender_Kitsu] Publish VSE Edit as Revision on Kitsu #7
@ -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"}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user