Blender Kitsu: Add Operator to Import Playblasts into Edit #274

Merged
Nick Alberelli merged 16 commits from TinyNick/blender-studio-pipeline:feature/import-playblasts into main 2024-04-03 17:38:07 +02:00
Showing only changes of commit 645e6de936 - Show all commits

View File

@ -2481,7 +2481,7 @@ class KITSU_OT_shot_image_sequence(bpy.types.Operator):
def execute(self, context: bpy.types.Context) -> Set[str]:
# Get closest empty channel
successes = []
succeeded = []
failed = []
channel = int(self.channel_selection)
addon_prefs = prefs.addon_prefs_get(context)
@ -2511,19 +2511,19 @@ class KITSU_OT_shot_image_sequence(bpy.types.Operator):
failed.append(str(directory))
continue
self.import_strip(context, strip, directory, channel)
successes.append(str(directory))
succeeded.append(str(directory))
if len(metadata_strips) == 1:
if len(failed) == 1:
self.report(
{"ERROR"}, f"Failed to import Image Sequence `{failed[0]}` does not exist"
{"WARNING"}, f"Failed to import Image Sequence `{failed[0]}` does not exist"
)
return {"CANCELLED"}
if len(successes) == 1:
self.report({"INFO"}, f"Imported Image Sequence from `{successes[0]}`")
if len(succeeded) == 1:
self.report({"INFO"}, f"Imported Image Sequence from `{succeeded[0]}`")
return {"FINISHED"}
report_str = f"Imported {len(successes)} Image Sequences"
report_str = f"Imported {len(succeeded)} Image Sequences"
report_state = "INFO"
if failed:
report_state = "WARNING"