Blender Kitsu: Add Frame Range Pop-up #128

Merged
Nick Alberelli merged 18 commits from :fix/frame-range-popup into main 2023-07-19 17:32:39 +02:00
Showing only changes of commit e70fd35970 - Show all commits

View File

@ -412,6 +412,26 @@ class KITSU_OT_pull_frame_range(bpy.types.Operator):
return {"FINISHED"} return {"FINISHED"}
class KITSU_OT_check_frame_range(bpy.types.Operator):
bl_idname = "kitsu.check_frame_range"
bl_label = "Check Frame Range"
bl_options = {"REGISTER", "UNDO"}
bl_description = (
"Checks frame range of active shot from the server matches current file"
)
@classmethod
def poll(cls, context: bpy.types.Context) -> bool:
return bool(prefs.session_auth(context) and cache.shot_active_get())
def execute(self, context: bpy.types.Context) -> Set[str]:
if core.check_frame_range():
self.report({"INFO"}, f"Frame Range is accurate")
return {"FINISHED"}
self.report({"ERROR"}, f"Failed: Frame Range Check")
return {"CANCELLED"}
class KITSU_OT_playblast_increment_playblast_version(bpy.types.Operator): class KITSU_OT_playblast_increment_playblast_version(bpy.types.Operator):
bl_idname = "kitsu.anim_increment_playblast_version" bl_idname = "kitsu.anim_increment_playblast_version"
bl_label = "Add Version Increment" bl_label = "Add Version Increment"
@ -500,6 +520,7 @@ classes = [
KITSU_OT_playblast_increment_playblast_version, KITSU_OT_playblast_increment_playblast_version,
KITSU_OT_pull_frame_range, KITSU_OT_pull_frame_range,
KITSU_OT_push_frame_range, KITSU_OT_push_frame_range,
KITSU_OT_check_frame_range,
] ]