Skip to content

Commit 8b2f025

Browse files
author
Brook Roberts
committed
When loading shots, load mesh if it exists
1 parent 641e29a commit 8b2f025

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

opensfm/io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ def shot_from_json(key, obj, cameras):
8282
shot.covariance = np.array(obj['covariance'])
8383
if 'merge_cc' in obj:
8484
shot.merge_cc = obj['merge_cc']
85+
if 'vertices' in obj and 'faces' in obj:
86+
shot.mesh = types.ShotMesh()
87+
shot.mesh.vertices = obj['vertices']
88+
shot.mesh.faces = obj['faces']
8589

8690
return shot
8791

0 commit comments

Comments
 (0)