Skip to content

Commit

Permalink
manual tool: bugfx: don't error when getting mesh for non-existant face
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Apr 17, 2024
1 parent ec2a95a commit 3f69d9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/manual/faceviewer/viewport.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def get_mesh(self, face: DetectedFace) -> dict[T.Literal["polygon", "line"], lis
asset_type, asset_id)

This comment has been minimized.

Copy link
@nrrm1

nrrm1 Apr 17, 2024

smart


This comment has been minimized.

Copy link
@nrrm1

nrrm1 Apr 17, 2024

smart

retval.setdefault(asset_type, []).append(asset_id)
logger.trace("Got mesh: %s", retval) # type:ignore[attr-defined]
logger.info("Got mesh: %s", retval) # type:ignore[attr-defined]
return retval


Expand Down Expand Up @@ -647,7 +647,8 @@ def _add_rows(self, existing_rows: int, required_rows: int) -> None:
y_coord = base_coords[0][1] + (row * self._size)
images.append([self._recycler.get_image((coords[0], y_coord))
for coords in base_coords])
meshes.append([self._recycler.get_mesh(face) for face in self._visible_faces[row]])
meshes.append([{} if face is None else self._recycler.get_mesh(face)
for face in self._visible_faces[row]])

a_images = np.array(images)
a_meshes = np.array(meshes)
Expand Down

0 comments on commit 3f69d9f

Please sign in to comment.