Blender Kitsu: Move Render Review into Blender Kitsu #296

Merged
2 changed files with 54 additions and 13 deletions
Showing only changes of commit f952efe5e3 - Show all commits

View File

@ -431,7 +431,16 @@ class RR_OT_sqe_inspect_exr_sequence(bpy.types.Operator):
active_strip = context.scene.sequence_editor.active_strip
image_editor = opsdata.get_image_editor(context)
if not (active_strip and active_strip.rr.is_render and image_editor):
if not active_strip:
cls.poll_message_set("No sequence strip selected")
return False
if not active_strip.rr.is_render:
cls.poll_message_set("Selected sequence strip is not an imported render")
return False
if not image_editor:
cls.poll_message_set("No image editor open in the current workspace")
return False
output_dir = opsdata.get_strip_folder(active_strip)
@ -440,6 +449,9 @@ class RR_OT_sqe_inspect_exr_sequence(bpy.types.Operator):
if f.is_file() and f.suffix == ".exr":
return True
cls.poll_message_set("Selected strip is not EXR sequence")
return False
def execute(self, context: bpy.types.Context) -> Set[str]:
active_strip = context.scene.sequence_editor.active_strip
image_editor = opsdata.get_image_editor(context)
@ -489,7 +501,13 @@ class RR_OT_sqe_clear_exr_inspect(bpy.types.Operator):
@classmethod
def poll(cls, context: bpy.types.Context) -> bool:
image_editor = cls._get_image_editor(context)
return bool(image_editor and image_editor.spaces.active.image)
if not image_editor:
cls.poll_message_set("No image editor open in the current workspace")
return False
if not image_editor.spaces.active.image:
cls.poll_message_set("No image to clear from image editor")
return False
return True
def execute(self, context: bpy.types.Context) -> Set[str]:
image_editor = self._get_image_editor(context)
@ -521,12 +539,23 @@ class RR_OT_sqe_approve_render(bpy.types.Operator):
active_strip = context.scene.sequence_editor.active_strip
addon_prefs = prefs.addon_prefs_get(bpy.context)
return bool(
addon_prefs.is_shot_frames_valid
and active_strip
and active_strip.rr.is_render
and not active_strip.rr.is_approved
)
if not addon_prefs.shot_playblast_root_dir:
cls.poll_message_set("Playblast directory not set")
return False
if not active_strip:
cls.poll_message_set("No sequence strip selected")
return False
if not active_strip.rr.is_render:
cls.poll_message_set("Selected sequence strip is not an imported render")
return False
if active_strip.rr.is_approved:
cls.poll_message_set("Selected sequence strip is already approved")
return False
return True
def execute(self, context: bpy.types.Context) -> Set[str]:
active_strip = context.scene.sequence_editor.active_strip
@ -764,13 +793,24 @@ class RR_OT_sqe_push_to_edit(bpy.types.Operator):
@classmethod
def poll(cls, context: bpy.types.Context) -> bool:
addon_prefs = prefs.addon_prefs_get(context)
if not addon_prefs.shot_previews_path:
active_strip = context.scene.sequence_editor.active_strip
if not addon_prefs.shot_playblast_root_dir:
cls.poll_message_set("No shot playblast root dir set")
return False
active_strip = context.scene.sequence_editor.active_strip
return bool(
active_strip and active_strip.rr.is_render and not active_strip.rr.is_pushed_to_edit
)
if not active_strip:
cls.poll_message_set("No active strip")
return False
if not active_strip.rr.is_render:
cls.poll_message_set("Selected sequence strip is not an imported render")
return False
if not active_strip.rr.is_pushed_to_edit:
cls.poll_message_set("Selected sequence strip is already pushed to edit")
return False
return True
def execute(self, context: bpy.types.Context) -> Set[str]:
active_strip = context.scene.sequence_editor.active_strip

View File

@ -1517,6 +1517,7 @@ class KITSU_OT_sqe_push_shot(bpy.types.Operator):
def poll(cls, context: bpy.types.Context) -> bool:
active_strip = context.scene.sequence_editor.active_strip
if not hasattr(active_strip, 'filepath'):
cls.poll_message_set("Selected Strip is not a Video")
return False
return bool(prefs.session_auth(context))