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 64d0432d25 - 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)
def draw_frame_range_failed_context(self, context):
layout = self.layout
layout.alert = True
layout.label(text="Kitsu Context could not be detected from current file")
def draw_frame_range_warning(self, context):
active_shot = cache.shot_active_get()
layout = self.layout
@ -469,11 +475,10 @@ def load_post_handler_check_frame_range(dummy: Any) -> None:
"""
active_shot = cache.shot_active_get()
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.",
draw_frame_range_failed_context,
title="Warning: Kitsu Context Failed.",
icon='ERROR',
)
return