realitycapture: allow periods within filename, not only for file extension (#1649)

allow periods within filename, not only for file extension
This commit is contained in:
machenmusik authored and GitHub committed 2023-03-22 22:03:23 -04:00
1 parent 9b99802042
commit 2c79d9fe52
1 file changed
+2 -2
@@ -60,7 +60,7 @@ def realitycapture_to_json(
cameras.setdefault(column, []).append(value) cameras.setdefault(column, []).append(value)
for name in cameras["#name"]: for name in cameras["#name"]:
camera_label = name.split(".")[0] camera_label = name.rpartition(".")[0]
if camera_label in image_filename_map: if camera_label in image_filename_map:
img = np.array(Image.open(output_dir / image_filename_map[camera_label])) img = np.array(Image.open(output_dir / image_filename_map[camera_label]))
break break
@@ -73,7 +73,7 @@ def realitycapture_to_json(
missing_image_data = 0 missing_image_data = 0
for i, name in enumerate(cameras["#name"]): for i, name in enumerate(cameras["#name"]):
basename = name.split(".")[0] basename = name.rpartition(".")[0]
if basename not in image_filename_map: if basename not in image_filename_map:
if verbose: if verbose:
CONSOLE.print(f"Missing image for camera data {basename}, Skipping") CONSOLE.print(f"Missing image for camera data {basename}, Skipping")