Skip to content

Commit

Permalink
Preview rotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Dec 20, 2024
1 parent 3b1b4cb commit f46e323
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions maps4fs/generator/texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,17 @@ def rotate_textures(self) -> None:
if layer.tags:
self.logger.debug("Rotating layer %s.", layer.name)
layer_paths = layer.paths(self._weights_dir)
layer_paths += [layer.path_preview(self._weights_dir)]
for layer_path in layer_paths:
self.rotate_image(
layer_path,
self.rotation,
output_height=self.map_size,
output_width=self.map_size,
)
if os.path.isfile(layer_path):
self.rotate_image(
layer_path,
self.rotation,
output_height=self.map_size,
output_width=self.map_size,
)
else:
self.logger.warning("Layer path %s not found.", layer_path)
else:
self.logger.debug(
"Skipping rotation of layer %s because it has no tags.", layer.name
Expand Down
2 changes: 1 addition & 1 deletion webui/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GeneratorUI:

def __init__(self):
self.download_path = None
self.logger = mfs.Logger(level="DEBUG", to_file=False)
self.logger = mfs.Logger(level="INFO", to_file=False)

self.community = config.is_on_community_server()
self.logger.debug("The application launched on the community server: %s", self.community)
Expand Down

0 comments on commit f46e323

Please sign in to comment.