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 de62448a5d - Show all commits

View File

@ -443,6 +443,12 @@ def load_post_handler_init_version_model(dummy: Any) -> None:
opsdata.init_playblast_file_model(bpy.context) opsdata.init_playblast_file_model(bpy.context)
def draw_frame_range_warning(self, context):
layout = self.layout
layout.alert = True
layout.label(text="Please update Frame Range")
@persistent @persistent
def load_post_handler_check_frame_range(dummy: Any) -> None: def load_post_handler_check_frame_range(dummy: Any) -> None:
""" """
@ -452,6 +458,13 @@ def load_post_handler_check_frame_range(dummy: Any) -> None:
""" """
active_shot = cache.shot_active_get() active_shot = cache.shot_active_get()
if not active_shot: if not active_shot:
bpy.ops.kitsu.print_report()
logger.warning("Active Shot was not found on server.")
bpy.context.window_manager.popup_menu(
draw_frame_range_warning,
title="Warning: Frame Range Error.",
icon='ERROR',
)
return return
# Pull update for shot. # Pull update for shot.
@ -473,6 +486,11 @@ def load_post_handler_check_frame_range(dummy: Any) -> None:
return return
bpy.context.scene.kitsu_error.frame_range = True bpy.context.scene.kitsu_error.frame_range = True
bpy.context.window_manager.popup_menu(
draw_frame_range_warning,
title="Warning: Frame Range Error.",
icon='ERROR',
)
logger.warning("Current frame range is outdated!") logger.warning("Current frame range is outdated!")