Blender Kitsu: Add Frame Range Pop-up #128
@ -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_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):
|
def draw_frame_range_warning(self, context):
|
||||||
active_shot = cache.shot_active_get()
|
active_shot = cache.shot_active_get()
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -469,11 +475,10 @@ 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.")
|
logger.warning("Active Shot was not found on server.")
|
||||||
bpy.context.window_manager.popup_menu(
|
bpy.context.window_manager.popup_menu(
|
||||||
draw_frame_range_warning,
|
draw_frame_range_failed_context,
|
||||||
title="Warning: Frame Range Error.",
|
title="Warning: Kitsu Context Failed.",
|
||||||
icon='ERROR',
|
icon='ERROR',
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user