diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 18:31:30 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 18:31:30 +0200 |
| commit | d665cf4f6d82396c422d1213e8b99fbf434f6693 (patch) | |
| tree | 94ce0a9f2dba9a731453cf9ad9f934b347d6676b /live-mogrify.py | |
| parent | 56c0c24d6c53868fb4efe8a704715ae40ef5aebf (diff) | |
cmdz
Diffstat (limited to 'live-mogrify.py')
| -rw-r--r-- | live-mogrify.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/live-mogrify.py b/live-mogrify.py index 3cb61c4..480c35d 100644 --- a/live-mogrify.py +++ b/live-mogrify.py @@ -272,8 +272,13 @@ def process_live_input(opt, data_opt, rpc_client, model): tmp_path = opt.render_dir + "frame_{:05d}_tmp.png".format(i+1) next_path = opt.render_dir + "frame_{:05d}.png".format(i+1) current_path = opt.render_dir + "ren_{:05d}.png".format(i+1) - if sequence: + if data_opt.sequence and len(sequence): sequence_path = sequence[sequence_i] + if sequence_i >= len(sequence)-1: + print('(((( sequence looped ))))') + sequence_i = 1 + else: + sequence_i += 1 if data_opt.send_image == 'b': image_pil = Image.fromarray(im, mode='RGB') @@ -341,11 +346,6 @@ def process_live_input(opt, data_opt, rpc_client, model): if data_opt.pause: data_opt.pause = False break - if sequence_i >= len(sequence)-1: - print('(((( sequence looped ))))') - sequence_i = 1 - else: - sequence_i += 1 data_opt.processing = False if __name__ == '__main__': |
