(outpath, basename, ext, suffix='')
| 350 | |
| 351 | |
| 352 | def get_uniquefn(outpath, basename, ext, suffix=''): |
| 353 | basecount = backbone.get_next_sequence_number(outpath, basename) |
| 354 | if basecount > 0: |
| 355 | basecount -= 1 |
| 356 | if suffix != '': |
| 357 | suffix = f'-{suffix}' # Dash is important for selecting unique filenames (see get_next_sequence_number) |
| 358 | for i in range(500): |
| 359 | fullfn = os.path.join(outpath, f"{basename}-{basecount + i:04}{suffix}.{ext}") |
| 360 | if not os.path.exists(fullfn): |
| 361 | return fullfn |
| 362 | return f"{basename}-99999{suffix}.{ext}" # Failback, should never be executed |
| 363 | |
| 364 | |
| 365 | def run_3dphoto(device, img_rgb, img_depth, inputnames, outpath, gen_inpainted_mesh_demos, vid_ssaa, vid_format): |
no outgoing calls
no test coverage detected