Blender Kitsu: Add Operator to Import Playblasts into Edit #274
@ -2481,7 +2481,7 @@ class KITSU_OT_shot_image_sequence(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context: bpy.types.Context) -> Set[str]:
|
def execute(self, context: bpy.types.Context) -> Set[str]:
|
||||||
# Get closest empty channel
|
# Get closest empty channel
|
||||||
successes = []
|
succeeded = []
|
||||||
failed = []
|
failed = []
|
||||||
channel = int(self.channel_selection)
|
channel = int(self.channel_selection)
|
||||||
addon_prefs = prefs.addon_prefs_get(context)
|
addon_prefs = prefs.addon_prefs_get(context)
|
||||||
@ -2511,19 +2511,19 @@ class KITSU_OT_shot_image_sequence(bpy.types.Operator):
|
|||||||
failed.append(str(directory))
|
failed.append(str(directory))
|
||||||
continue
|
continue
|
||||||
self.import_strip(context, strip, directory, channel)
|
self.import_strip(context, strip, directory, channel)
|
||||||
successes.append(str(directory))
|
succeeded.append(str(directory))
|
||||||
|
|
||||||
if len(metadata_strips) == 1:
|
if len(metadata_strips) == 1:
|
||||||
if len(failed) == 1:
|
if len(failed) == 1:
|
||||||
self.report(
|
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"}
|
return {"CANCELLED"}
|
||||||
if len(successes) == 1:
|
if len(succeeded) == 1:
|
||||||
self.report({"INFO"}, f"Imported Image Sequence from `{successes[0]}`")
|
self.report({"INFO"}, f"Imported Image Sequence from `{succeeded[0]}`")
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
report_str = f"Imported {len(successes)} Image Sequences"
|
report_str = f"Imported {len(succeeded)} Image Sequences"
|
||||||
report_state = "INFO"
|
report_state = "INFO"
|
||||||
if failed:
|
if failed:
|
||||||
report_state = "WARNING"
|
report_state = "WARNING"
|
||||||
|
Loading…
Reference in New Issue
Block a user