Blender Kitsu: Add Frame Range Pop-up #128
@ -412,6 +412,26 @@ class KITSU_OT_pull_frame_range(bpy.types.Operator):
|
||||
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):
|
||||
bl_idname = "kitsu.anim_increment_playblast_version"
|
||||
bl_label = "Add Version Increment"
|
||||
@ -500,6 +520,7 @@ classes = [
|
||||
KITSU_OT_playblast_increment_playblast_version,
|
||||
KITSU_OT_pull_frame_range,
|
||||
KITSU_OT_push_frame_range,
|
||||
KITSU_OT_check_frame_range,
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user