diff options
Diffstat (limited to 'rpc')
| -rw-r--r-- | rpc/img_ops.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/rpc/img_ops.py b/rpc/img_ops.py index 3dc52bc..05bbf9f 100644 --- a/rpc/img_ops.py +++ b/rpc/img_ops.py @@ -16,7 +16,7 @@ def process_image(opt, data_opt, im): img = im[:, :, ::-1].copy() processed = False - if data_opt.process_frac == 0: + if data_opt.process_frac == 1.0: return img if data_opt.transform != False: @@ -77,14 +77,17 @@ def mix_next_image(opt, data_opt, rpc_client, im, i, sequence, sequence_i): 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) - meta = { 'i': i, 'sequence_i': sequence_i, 'sequence_len': len(sequence) } + meta = { 'i': i, 'sequence_i': math.floor(sequence_i), 'sequence_len': len(sequence) } if data_opt.sequence and len(sequence): - sequence_path = sequence[sequence_i] - if sequence_i >= len(sequence)-1: + sequence_path = sequence[math.floor(sequence_i)] + if not data_opt.sequence_paused and data_opt.sequence_step != 0: + sequence_i += data_opt.sequence_step + if sequence_i >= len(sequence): print('(((( sequence looped ))))') - sequence_i = 1 - else: - sequence_i += 1 + sequence_i = sequence_i % len(sequence) + else if sequence_i < 0: + print('(((( sequence looped ))))') + sequence_i += len(sequence) if data_opt.store_a is not True: os.remove(last_path) |
