mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[ui] Check for the existence of the poses
key before accessing it
When parsing the input JSON file, there might be some instances where the `poses` key, unlike the `views` and `intrinsics` keys, does not exist. If that is the case, an unhandled exception is raised while connections are being made, which then causes issues for the lifetime of the Meshroom instance. This commit checks that the key exists before trying to access it, which prevents raising unhandled exceptions while the active project is being set up.
This commit is contained in:
parent
05080b2ba9
commit
7fc52f2028
1 changed files with 3 additions and 2 deletions
|
@ -373,8 +373,9 @@ def parseSfMJsonFile(sfmJsonFile):
|
|||
for view in report['views']:
|
||||
views[view['viewId']] = view
|
||||
|
||||
for pose in report['poses']:
|
||||
poses[pose['poseId']] = pose['pose']
|
||||
if "poses" in report:
|
||||
for pose in report['poses']:
|
||||
poses[pose['poseId']] = pose['pose']
|
||||
|
||||
for intrinsic in report['intrinsics']:
|
||||
intrinsics[intrinsic['intrinsicId']] = intrinsic
|
||||
|
|
Loading…
Add table
Reference in a new issue