Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Check for the existence of the poses key in SfM JSON files before accessing it #2190

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions meshroom/ui/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@
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
Expand Down Expand Up @@ -553,13 +554,13 @@

self.setSfm(self.lastSfmNode())

# TODO: listen specifically for cameraInit creation/deletion

Check notice on line 557 in meshroom/ui/reconstruction.py

View check run for this annotation

codefactor.io / CodeFactor

meshroom/ui/reconstruction.py#L557

unresolved comment '# TODO: listen specifically for cameraInit creation/deletion' (C100)
self._graph.nodes.countChanged.connect(self.updateCameraInits)

@Slot(QObject)
def getViewpoints(self):
""" Return the Viewpoints model. """
# TODO: handle multiple Viewpoints models

Check notice on line 563 in meshroom/ui/reconstruction.py

View check run for this annotation

codefactor.io / CodeFactor

meshroom/ui/reconstruction.py#L563

unresolved comment '# TODO: handle multiple Viewpoints models' (C100)
if self.tempCameraInit:
return self.tempCameraInit.viewpoints.value
elif self._cameraInit:
Expand Down