Skip to content

Commit

Permalink
Preview update.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Dec 20, 2024
1 parent 90d11b1 commit 53be980
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion maps4fs/generator/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Background(Component):
def preprocess(self) -> None:
"""Registers the DEMs for the background terrain."""
self.light_version = self.kwargs.get("light_version", False)
self.stl_preview_path: str | None = None

if self.rotation:
self.logger.debug("Rotation is enabled: %s.", self.rotation)
Expand Down Expand Up @@ -335,7 +336,8 @@ def previews(self) -> list[str]:
cv2.imwrite(background_dem_preview_path, background_dem_preview_image)
preview_paths.append(background_dem_preview_path)

preview_paths.append(self.stl_preview_path)
if self.stl_preview_path:
preview_paths.append(self.stl_preview_path)

return preview_paths

Expand Down

0 comments on commit 53be980

Please sign in to comment.