maps4fs 0.9.98__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {maps4fs-0.9.98 → maps4fs-1.0.0}/PKG-INFO +16 -5
  2. {maps4fs-0.9.98 → maps4fs-1.0.0}/README.md +15 -4
  3. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/component.py +10 -0
  4. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/game.py +2 -1
  5. maps4fs-1.0.0/maps4fs/generator/i3d.py +360 -0
  6. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/texture.py +31 -0
  7. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/tile.py +3 -3
  8. maps4fs-1.0.0/maps4fs/toolbox/background.py +63 -0
  9. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs.egg-info/PKG-INFO +16 -5
  10. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs.egg-info/SOURCES.txt +1 -0
  11. {maps4fs-0.9.98 → maps4fs-1.0.0}/pyproject.toml +1 -1
  12. maps4fs-0.9.98/maps4fs/generator/i3d.py +0 -89
  13. {maps4fs-0.9.98 → maps4fs-1.0.0}/LICENSE.md +0 -0
  14. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/__init__.py +0 -0
  15. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/__init__.py +0 -0
  16. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/background.py +0 -0
  17. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/config.py +0 -0
  18. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/dem.py +0 -0
  19. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/grle.py +0 -0
  20. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/map.py +0 -0
  21. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/path_steps.py +0 -0
  22. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/generator/qgis.py +0 -0
  23. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/logger.py +0 -0
  24. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/toolbox/__init__.py +0 -0
  25. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs/toolbox/dem.py +0 -0
  26. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs.egg-info/dependency_links.txt +0 -0
  27. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs.egg-info/requires.txt +0 -0
  28. {maps4fs-0.9.98 → maps4fs-1.0.0}/maps4fs.egg-info/top_level.txt +0 -0
  29. {maps4fs-0.9.98 → maps4fs-1.0.0}/setup.cfg +0 -0
  30. {maps4fs-0.9.98 → maps4fs-1.0.0}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 0.9.98
3
+ Version: 1.0.0
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -31,8 +31,10 @@ Requires-Dist: pympler
31
31
  <p align="center">
32
32
  <a href="#Quick-Start">Quick Start</a> •
33
33
  <a href="#Overview">Overview</a> •
34
- <a href="#How-To-Run">How-To-Run</a> •
34
+ <a href="#Step-by-step">Create a map in 10 steps</a> •
35
+ <a href="#How-To-Run">How-To-Run</a><br>
35
36
  <a href="docs/FAQ.md">FAQ</a> •
37
+ <a href="docs/map_structure.md">Map Structure</a> •
36
38
  <a href="#Modder-Toolbox">Modder Toolbox</a><br>
37
39
  <a href="#Supported-objects">Supported objects</a> •
38
40
  <a href="#Generation-info">Generation info</a> •
@@ -68,6 +70,7 @@ Requires-Dist: pympler
68
70
  🔷 Generates *.obj files for background terrain based on the real-world height map<br>
69
71
  📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
70
72
  🧰 Modder Toolbox to help you with various of tasks 🆕<br>
73
+ 🌾 Automatically generates fields 🆕<br>
71
74
 
72
75
  <p align="center">
73
76
  <img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
@@ -76,6 +79,8 @@ Requires-Dist: pympler
76
79
  🛰️ Realistic background terrain objects with satellite images.<br><br>
77
80
  <img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
78
81
  🗒️ True-to-life blueprints for fast and precise modding.<br><br>
82
+ <img width="480" src="https://github.com/user-attachments/assets/1a8802d2-6a3b-4bfa-af2b-7c09478e199b"><br>
83
+ 🌾 Field generation with one click.<br><br>
79
84
  <img src="https://github.com/user-attachments/assets/cce45575-c917-4a1b-bdc0-6368e32ccdff"><br>
80
85
  📏 Almost any possible map sizes.
81
86
  </p>
@@ -126,6 +131,9 @@ Parameters:
126
131
  - coordinates: 45.15, 19.71
127
132
  - size: 16 x 16 km
128
133
 
134
+ ## Step by step
135
+ Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
136
+
129
137
  ## How-To-Run
130
138
 
131
139
  You'll find detailed instructions on how to run the project below. But if you prefer video tutorials, here's one for you:
@@ -202,12 +210,15 @@ The map will be saved in the `map_directory` directory.
202
210
  ## Modder Toolbox
203
211
  The tool now has a Modder Toolbox, which is a set of tools to help you with various tasks. You can open the toolbox by switching to the `🧰 Modder Toolbox` tab in the StreamLit app.<br>
204
212
 
205
- ![Modder Toolbox](https://github.com/user-attachments/assets/18f169e9-1a5b-474c-b488-6becfffadcea)
213
+ ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
206
214
 
207
215
  ### Tool categories
208
216
  Tools are divided into categories, which are listed below.
209
217
  #### Textures and DEM
210
- - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image.
218
+ - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create the height map using it.
219
+
220
+ #### Background terrain
221
+ - **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
211
222
 
212
223
  ## Supported objects
213
224
  The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data. So, refer to [this page](https://wiki.openstreetmap.org/wiki/Map_Features) to understand the list below.
@@ -376,7 +387,7 @@ Let's have a closer look at the fields:
376
387
 
377
388
  ## Background terrain
378
389
  The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture to look fine.<br>
379
- So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `objects/tiles` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
390
+ So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
380
391
  If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convinient approach to work with one file, one texture and then just cut the map from it.<br>
381
392
 
382
393
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
@@ -6,8 +6,10 @@
6
6
  <p align="center">
7
7
  <a href="#Quick-Start">Quick Start</a> •
8
8
  <a href="#Overview">Overview</a> •
9
- <a href="#How-To-Run">How-To-Run</a> •
9
+ <a href="#Step-by-step">Create a map in 10 steps</a> •
10
+ <a href="#How-To-Run">How-To-Run</a><br>
10
11
  <a href="docs/FAQ.md">FAQ</a> •
12
+ <a href="docs/map_structure.md">Map Structure</a> •
11
13
  <a href="#Modder-Toolbox">Modder Toolbox</a><br>
12
14
  <a href="#Supported-objects">Supported objects</a> •
13
15
  <a href="#Generation-info">Generation info</a> •
@@ -43,6 +45,7 @@
43
45
  🔷 Generates *.obj files for background terrain based on the real-world height map<br>
44
46
  📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
45
47
  🧰 Modder Toolbox to help you with various of tasks 🆕<br>
48
+ 🌾 Automatically generates fields 🆕<br>
46
49
 
47
50
  <p align="center">
48
51
  <img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
@@ -51,6 +54,8 @@
51
54
  🛰️ Realistic background terrain objects with satellite images.<br><br>
52
55
  <img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
53
56
  🗒️ True-to-life blueprints for fast and precise modding.<br><br>
57
+ <img width="480" src="https://github.com/user-attachments/assets/1a8802d2-6a3b-4bfa-af2b-7c09478e199b"><br>
58
+ 🌾 Field generation with one click.<br><br>
54
59
  <img src="https://github.com/user-attachments/assets/cce45575-c917-4a1b-bdc0-6368e32ccdff"><br>
55
60
  📏 Almost any possible map sizes.
56
61
  </p>
@@ -101,6 +106,9 @@ Parameters:
101
106
  - coordinates: 45.15, 19.71
102
107
  - size: 16 x 16 km
103
108
 
109
+ ## Step by step
110
+ Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
111
+
104
112
  ## How-To-Run
105
113
 
106
114
  You'll find detailed instructions on how to run the project below. But if you prefer video tutorials, here's one for you:
@@ -177,12 +185,15 @@ The map will be saved in the `map_directory` directory.
177
185
  ## Modder Toolbox
178
186
  The tool now has a Modder Toolbox, which is a set of tools to help you with various tasks. You can open the toolbox by switching to the `🧰 Modder Toolbox` tab in the StreamLit app.<br>
179
187
 
180
- ![Modder Toolbox](https://github.com/user-attachments/assets/18f169e9-1a5b-474c-b488-6becfffadcea)
188
+ ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
181
189
 
182
190
  ### Tool categories
183
191
  Tools are divided into categories, which are listed below.
184
192
  #### Textures and DEM
185
- - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image.
193
+ - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create the height map using it.
194
+
195
+ #### Background terrain
196
+ - **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
186
197
 
187
198
  ## Supported objects
188
199
  The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data. So, refer to [this page](https://wiki.openstreetmap.org/wiki/Map_Features) to understand the list below.
@@ -351,7 +362,7 @@ Let's have a closer look at the fields:
351
362
 
352
363
  ## Background terrain
353
364
  The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture to look fine.<br>
354
- So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `objects/tiles` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
365
+ So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
355
366
  If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convinient approach to work with one file, one texture and then just cut the map from it.<br>
356
367
 
357
368
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
@@ -50,6 +50,7 @@ class Component:
50
50
 
51
51
  os.makedirs(self.previews_directory, exist_ok=True)
52
52
  os.makedirs(self.scripts_directory, exist_ok=True)
53
+ os.makedirs(self.info_layers_directory, exist_ok=True)
53
54
 
54
55
  self.save_bbox()
55
56
  self.preprocess()
@@ -87,6 +88,15 @@ class Component:
87
88
  """
88
89
  return os.path.join(self.map_directory, "previews")
89
90
 
91
+ @property
92
+ def info_layers_directory(self) -> str:
93
+ """The directory where the info layers are stored.
94
+
95
+ Returns:
96
+ str: The directory where the info layers are stored.
97
+ """
98
+ return os.path.join(self.map_directory, "info_layers")
99
+
90
100
  @property
91
101
  def scripts_directory(self) -> str:
92
102
  """The directory where the scripts are stored.
@@ -38,7 +38,8 @@ class Game:
38
38
  _texture_schema: str | None = None
39
39
  _grle_schema: str | None = None
40
40
 
41
- components = [Config, Texture, GRLE, DEM, I3d, Background]
41
+ # Order matters! Some components depend on others.
42
+ components = [Texture, I3d, DEM, Config, GRLE, Background]
42
43
 
43
44
  def __init__(self, map_template_path: str | None = None):
44
45
  if map_template_path:
@@ -0,0 +1,360 @@
1
+ """This module contains the Config class for map settings and configuration."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import os
7
+ from xml.etree import ElementTree as ET
8
+
9
+ from shapely.geometry import Polygon, box # type: ignore
10
+
11
+ from maps4fs.generator.component import Component
12
+
13
+ DEFAULT_HEIGHT_SCALE = 2000
14
+ DEFAULT_MAX_LOD_DISTANCE = 10000
15
+ DEFAULT_MAX_LOD_OCCLUDER_DISTANCE = 10000
16
+ NODE_ID_STARTING_VALUE = 500
17
+
18
+
19
+ # pylint: disable=R0903
20
+ class I3d(Component):
21
+ """Component for map i3d file settings and configuration.
22
+
23
+ Arguments:
24
+ coordinates (tuple[float, float]): The latitude and longitude of the center of the map.
25
+ map_height (int): The height of the map in pixels.
26
+ map_width (int): The width of the map in pixels.
27
+ map_directory (str): The directory where the map files are stored.
28
+ logger (Any, optional): The logger to use. Must have at least three basic methods: debug,
29
+ info, warning. If not provided, default logging will be used.
30
+ """
31
+
32
+ _map_i3d_path: str | None = None
33
+
34
+ def preprocess(self) -> None:
35
+ """Gets the path to the map I3D file from the game instance and saves it to the instance
36
+ attribute. If the game does not support I3D files, the attribute is set to None."""
37
+ try:
38
+ self._map_i3d_path = self.game.i3d_file_path(self.map_directory)
39
+ self.logger.debug("Map I3D path: %s.", self._map_i3d_path)
40
+ except NotImplementedError:
41
+ self.logger.info("I3D file processing is not implemented for this game.")
42
+ self._map_i3d_path = None
43
+
44
+ def process(self) -> None:
45
+ """Updates the map I3D file with the default settings."""
46
+ self._update_i3d_file()
47
+ self._add_fields()
48
+
49
+ def _get_tree(self) -> ET.ElementTree | None:
50
+ """Returns the ElementTree instance of the map I3D file."""
51
+ if not self._map_i3d_path:
52
+ self.logger.info("I3D is not obtained, skipping the update.")
53
+ return None
54
+ if not os.path.isfile(self._map_i3d_path):
55
+ self.logger.warning("I3D file not found: %s.", self._map_i3d_path)
56
+ return None
57
+
58
+ return ET.parse(self._map_i3d_path)
59
+
60
+ def _update_i3d_file(self) -> None:
61
+ """Updates the map I3D file with the default settings."""
62
+
63
+ tree = self._get_tree()
64
+ if tree is None:
65
+ return
66
+
67
+ self.logger.debug("Map I3D file loaded from: %s.", self._map_i3d_path)
68
+
69
+ root = tree.getroot()
70
+ for map_elem in root.iter("Scene"):
71
+ for terrain_elem in map_elem.iter("TerrainTransformGroup"):
72
+ terrain_elem.set("heightScale", str(DEFAULT_HEIGHT_SCALE))
73
+ self.logger.debug(
74
+ "heightScale attribute set to %s in TerrainTransformGroup element.",
75
+ DEFAULT_HEIGHT_SCALE,
76
+ )
77
+ terrain_elem.set("maxLODDistance", str(DEFAULT_MAX_LOD_DISTANCE))
78
+ self.logger.debug(
79
+ "maxLODDistance attribute set to %s in TerrainTransformGroup element.",
80
+ DEFAULT_MAX_LOD_DISTANCE,
81
+ )
82
+
83
+ terrain_elem.set("occMaxLODDistance", str(DEFAULT_MAX_LOD_OCCLUDER_DISTANCE))
84
+ self.logger.debug(
85
+ "occMaxLODDistance attribute set to %s in TerrainTransformGroup element.",
86
+ DEFAULT_MAX_LOD_OCCLUDER_DISTANCE,
87
+ )
88
+
89
+ self.logger.debug("TerrainTransformGroup element updated in I3D file.")
90
+
91
+ tree.write(self._map_i3d_path) # type: ignore
92
+ self.logger.debug("Map I3D file saved to: %s.", self._map_i3d_path)
93
+
94
+ def previews(self) -> list[str]:
95
+ """Returns a list of paths to the preview images (empty list).
96
+ The component does not generate any preview images so it returns an empty list.
97
+
98
+ Returns:
99
+ list[str]: An empty list.
100
+ """
101
+ return []
102
+
103
+ # pylint: disable=R0914, R0915
104
+ def _add_fields(self) -> None:
105
+ """Adds fields to the map I3D file."""
106
+ tree = self._get_tree()
107
+ if tree is None:
108
+ return
109
+
110
+ textures_info_layer_path = os.path.join(self.info_layers_directory, "textures.json")
111
+ if not os.path.isfile(textures_info_layer_path):
112
+ self.logger.warning("Textures info layer not found: %s.", textures_info_layer_path)
113
+ return
114
+
115
+ with open(textures_info_layer_path, "r", encoding="utf-8") as textures_info_layer_file:
116
+ textures_info_layer = json.load(textures_info_layer_file)
117
+
118
+ fields: list[tuple[int, int]] | None = textures_info_layer.get("fields")
119
+ if not fields:
120
+ self.logger.warning("Fields data not found in textures info layer.")
121
+ return
122
+
123
+ self.logger.debug("Found %s fields in textures info layer.", len(fields))
124
+
125
+ root = tree.getroot()
126
+ gameplay_node = root.find(".//TransformGroup[@name='gameplay']")
127
+ if gameplay_node is not None:
128
+ self.logger.debug("Found the gameplay node.")
129
+
130
+ fields_node = gameplay_node.find(".//TransformGroup[@name='fields']")
131
+ user_attributes_node = root.find(".//UserAttributes")
132
+
133
+ if fields_node is not None:
134
+ node_id = NODE_ID_STARTING_VALUE
135
+
136
+ for field_id, field in enumerate(fields, start=1):
137
+ # Convert the top-left coordinates to the center coordinates system.
138
+ try:
139
+ fitted_field = self.fit_polygon_into_bounds(field) # type: ignore
140
+ except ValueError as e:
141
+ self.logger.warning(
142
+ "Field %s could not be fitted into the map bounds.", field_id
143
+ )
144
+ self.logger.debug("Error: %s", e)
145
+ continue
146
+ field_ccs = [
147
+ self.top_left_coordinates_to_center(point) for point in fitted_field
148
+ ]
149
+
150
+ # Creating the main field node.
151
+ field_node = ET.Element("TransformGroup")
152
+ field_node.set("name", f"field{field_id}")
153
+ cx, cy = self.get_polygon_center(field_ccs)
154
+ field_node.set("translation", f"{cx} 0 {cy}")
155
+ field_node.set("nodeId", str(node_id))
156
+
157
+ # Adding UserAttributes to the field node.
158
+ user_attribute_node = self.create_user_attribute_node(node_id)
159
+ user_attributes_node.append(user_attribute_node) # type: ignore
160
+
161
+ node_id += 1
162
+
163
+ # Creating the polygon points node, which contains the points of the field.
164
+ polygon_points_node = ET.Element("TransformGroup")
165
+ polygon_points_node.set("name", "polygonPoints")
166
+ polygon_points_node.set("nodeId", str(node_id))
167
+ node_id += 1
168
+
169
+ for point_id, point in enumerate(field_ccs, start=1):
170
+ rx, ry = self.absolute_to_relative(point, (cx, cy))
171
+
172
+ node_id += 1
173
+ point_node = ET.Element("TransformGroup")
174
+ point_node.set("name", f"point{point_id}")
175
+ point_node.set("translation", f"{rx} 0 {ry}")
176
+ point_node.set("nodeId", str(node_id))
177
+
178
+ polygon_points_node.append(point_node)
179
+
180
+ field_node.append(polygon_points_node)
181
+
182
+ # Adding the name indicator node to the field node.
183
+ name_indicator_node, node_id = self.get_name_indicator_node(node_id, field_id)
184
+ field_node.append(name_indicator_node)
185
+
186
+ # Adding the teleport indicator node to the field node.
187
+ teleport_indicator_node, node_id = self.get_teleport_indicator_node(node_id)
188
+ field_node.append(teleport_indicator_node)
189
+
190
+ # Adding the field node to the fields node.
191
+ fields_node.append(field_node)
192
+ self.logger.debug("Field %s added to the I3D file.", field_id)
193
+
194
+ node_id += 1
195
+
196
+ tree.write(self._map_i3d_path) # type: ignore
197
+ self.logger.debug("Map I3D file saved to: %s.", self._map_i3d_path)
198
+
199
+ def get_name_indicator_node(self, node_id: int, field_id: int) -> tuple[ET.Element, int]:
200
+ """Creates a name indicator node with given node ID and field ID.
201
+
202
+ Arguments:
203
+ node_id (int): The node ID of the name indicator node.
204
+ field_id (int): The ID of the field.
205
+
206
+ Returns:
207
+ tuple[ET.Element, int]: The name indicator node and the updated node ID.
208
+ """
209
+ node_id += 1
210
+ name_indicator_node = ET.Element("TransformGroup")
211
+ name_indicator_node.set("name", "nameIndicator")
212
+ name_indicator_node.set("nodeId", str(node_id))
213
+
214
+ node_id += 1
215
+ note_node = ET.Element("Note")
216
+ note_node.set("name", "Note")
217
+ note_node.set("nodeId", str(node_id))
218
+ note_node.set("text", f"field{field_id}&#xA;0.00 ha")
219
+ note_node.set("color", "4278190080")
220
+ note_node.set("fixedSize", "true")
221
+
222
+ name_indicator_node.append(note_node)
223
+
224
+ return name_indicator_node, node_id
225
+
226
+ def get_teleport_indicator_node(self, node_id: int) -> tuple[ET.Element, int]:
227
+ """Creates a teleport indicator node with given node ID.
228
+
229
+ Arguments:
230
+ node_id (int): The node ID of the teleport indicator node.
231
+
232
+ Returns:
233
+ tuple[ET.Element, int]: The teleport indicator node and the updated node ID.
234
+ """
235
+ node_id += 1
236
+ teleport_indicator_node = ET.Element("TransformGroup")
237
+ teleport_indicator_node.set("name", "teleportIndicator")
238
+ teleport_indicator_node.set("nodeId", str(node_id))
239
+
240
+ return teleport_indicator_node, node_id
241
+
242
+ def get_polygon_center(self, polygon_points: list[tuple[int, int]]) -> tuple[int, int]:
243
+ """Calculates the center of a polygon defined by a list of points.
244
+
245
+ Arguments:
246
+ polygon_points (list[tuple[int, int]]): The points of the polygon.
247
+
248
+ Returns:
249
+ tuple[int, int]: The center of the polygon.
250
+ """
251
+ polygon = Polygon(polygon_points)
252
+ center = polygon.centroid
253
+ return int(center.x), int(center.y)
254
+
255
+ def absolute_to_relative(
256
+ self, point: tuple[int, int], center: tuple[int, int]
257
+ ) -> tuple[int, int]:
258
+ """Converts a pair of absolute coordinates to relative coordinates.
259
+
260
+ Arguments:
261
+ point (tuple[int, int]): The absolute coordinates.
262
+ center (tuple[int, int]): The center coordinates.
263
+
264
+ Returns:
265
+ tuple[int, int]: The relative coordinates.
266
+ """
267
+ cx, cy = center
268
+ x, y = point
269
+ return x - cx, y - cy
270
+
271
+ def top_left_coordinates_to_center(self, top_left: tuple[int, int]) -> tuple[int, int]:
272
+ """Converts a pair of coordinates from the top-left system to the center system.
273
+ In top-left system, the origin (0, 0) is in the top-left corner of the map, while in the
274
+ center system, the origin is in the center of the map.
275
+
276
+ Arguments:
277
+ top_left (tuple[int, int]): The coordinates in the top-left system.
278
+
279
+ Returns:
280
+ tuple[int, int]: The coordinates in the center system.
281
+ """
282
+ x, y = top_left
283
+ cs_x = x - self.map_width // 2
284
+ cs_y = y - self.map_height // 2
285
+
286
+ return cs_x, cs_y
287
+
288
+ def fit_polygon_into_bounds(
289
+ self, polygon_points: list[tuple[int, int]]
290
+ ) -> list[tuple[int, int]]:
291
+ """Fits a polygon into the bounds of the map.
292
+
293
+ Arguments:
294
+ polygon_points (list[tuple[int, int]]): The points of the polygon.
295
+
296
+ Returns:
297
+ list[tuple[int, int]]: The points of the polygon fitted into the map bounds.
298
+ """
299
+ min_x = min_y = 0
300
+ max_x, max_y = self.map_width, self.map_height
301
+
302
+ # Create a polygon from the given points
303
+ polygon = Polygon(polygon_points)
304
+
305
+ # Create a bounding box for the map bounds
306
+ bounds = box(min_x, min_y, max_x, max_y)
307
+
308
+ # Intersect the polygon with the bounds to fit it within the map
309
+ fitted_polygon = polygon.intersection(bounds)
310
+
311
+ if not isinstance(fitted_polygon, Polygon):
312
+ raise ValueError("The fitted polygon is not a valid polygon.")
313
+
314
+ # Return the fitted polygon points
315
+ return list(fitted_polygon.exterior.coords)
316
+
317
+ @staticmethod
318
+ def create_user_attribute_node(node_id: int) -> ET.Element:
319
+ """Creates an XML user attribute node with given node ID.
320
+
321
+ Arguments:
322
+ node_id (int): The node ID of the user attribute node.
323
+
324
+ Returns:
325
+ ET.Element: The created user attribute node.
326
+ """
327
+ user_attribute_node = ET.Element("UserAttribute")
328
+ user_attribute_node.set("nodeId", str(node_id))
329
+
330
+ attributes = [
331
+ ("angle", "integer", "0"),
332
+ ("missionAllowed", "boolean", "true"),
333
+ ("missionOnlyGrass", "boolean", "false"),
334
+ ("nameIndicatorIndex", "string", "1"),
335
+ ("polygonIndex", "string", "0"),
336
+ ("teleportIndicatorIndex", "string", "2"),
337
+ ]
338
+
339
+ for name, attr_type, value in attributes:
340
+ user_attribute_node.append(I3d.create_attribute_node(name, attr_type, value))
341
+
342
+ return user_attribute_node
343
+
344
+ @staticmethod
345
+ def create_attribute_node(name: str, attr_type: str, value: str) -> ET.Element:
346
+ """Creates an XML attribute node with given name, type, and value.
347
+
348
+ Arguments:
349
+ name (str): The name of the attribute.
350
+ attr_type (str): The type of the attribute.
351
+ value (str): The value of the attribute.
352
+
353
+ Returns:
354
+ ET.Element: The created attribute node.
355
+ """
356
+ attribute_node = ET.Element("Attribute")
357
+ attribute_node.set("name", name)
358
+ attribute_node.set("type", attr_type)
359
+ attribute_node.set("value", value)
360
+ return attribute_node
@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  import json
6
6
  import os
7
7
  import warnings
8
+ from collections import defaultdict
8
9
  from typing import Any, Callable, Generator, Optional
9
10
 
10
11
  import cv2
@@ -41,6 +42,9 @@ class Texture(Component):
41
42
  tags (dict[str, str | list[str]]): Dictionary of tags to search for.
42
43
  width (int | None): Width of the polygon in meters (only for LineString).
43
44
  color (tuple[int, int, int]): Color of the layer in BGR format.
45
+ exclude_weight (bool): Flag to exclude weight from the texture.
46
+ priority (int | None): Priority of the layer.
47
+ info_layer (str | None): Name of the corresnponding info layer.
44
48
 
45
49
  Attributes:
46
50
  name (str): Name of the layer.
@@ -58,6 +62,7 @@ class Texture(Component):
58
62
  color: tuple[int, int, int] | list[int] | None = None,
59
63
  exclude_weight: bool = False,
60
64
  priority: int | None = None,
65
+ info_layer: str | None = None,
61
66
  ):
62
67
  self.name = name
63
68
  self.count = count
@@ -66,6 +71,7 @@ class Texture(Component):
66
71
  self.color = color if color else (255, 255, 255)
67
72
  self.exclude_weight = exclude_weight
68
73
  self.priority = priority
74
+ self.info_layer = info_layer
69
75
 
70
76
  def to_json(self) -> dict[str, str | list[str] | bool]: # type: ignore
71
77
  """Returns dictionary with layer data.
@@ -80,6 +86,7 @@ class Texture(Component):
80
86
  "color": list(self.color),
81
87
  "exclude_weight": self.exclude_weight,
82
88
  "priority": self.priority,
89
+ "info_layer": self.info_layer,
83
90
  }
84
91
 
85
92
  data = {k: v for k, v in data.items() if v is not None}
@@ -178,6 +185,9 @@ class Texture(Component):
178
185
  self.info_save_path = os.path.join(self.map_directory, "generation_info.json")
179
186
  self.logger.debug("Generation info save path: %s.", self.info_save_path)
180
187
 
188
+ self.info_layer_path = os.path.join(self.info_layers_directory, "textures.json")
189
+ self.logger.debug("Info layer path: %s.", self.info_layer_path)
190
+
181
191
  def get_base_layer(self) -> Layer | None:
182
192
  """Returns base layer.
183
193
 
@@ -297,6 +307,10 @@ class Texture(Component):
297
307
 
298
308
  cumulative_image = None
299
309
 
310
+ # Dictionary to store info layer data.
311
+ # Key is a layer.info_layer, value is a list of polygon points as tuples (x, y).
312
+ info_layer_data = defaultdict(list)
313
+
300
314
  for layer in layers:
301
315
  if not layer.tags:
302
316
  self.logger.debug("Layer %s has no tags, there's nothing to draw.", layer.name)
@@ -317,6 +331,8 @@ class Texture(Component):
317
331
  mask = cv2.bitwise_not(cumulative_image)
318
332
 
319
333
  for polygon in self.polygons(layer.tags, layer.width): # type: ignore
334
+ if layer.info_layer:
335
+ info_layer_data[layer.info_layer].append(self.np_to_polygon_points(polygon))
320
336
  cv2.fillPoly(layer_image, [polygon], color=255) # type: ignore
321
337
 
322
338
  output_image = cv2.bitwise_and(layer_image, mask)
@@ -326,6 +342,10 @@ class Texture(Component):
326
342
  cv2.imwrite(layer_path, output_image)
327
343
  self.logger.debug("Texture %s saved.", layer_path)
328
344
 
345
+ # Save info layer data.
346
+ with open(self.info_layer_path, "w", encoding="utf-8") as f:
347
+ json.dump(info_layer_data, f, ensure_ascii=False, indent=4)
348
+
329
349
  if cumulative_image is not None:
330
350
  self.draw_base_layer(cumulative_image)
331
351
 
@@ -428,6 +448,17 @@ class Texture(Component):
428
448
  """
429
449
  return int(self.map_height * (1 - (y - self.minimum_y) / (self.maximum_y - self.minimum_y)))
430
450
 
451
+ def np_to_polygon_points(self, np_array: np.ndarray) -> list[tuple[int, int]]:
452
+ """Converts numpy array of polygon points to list of tuples.
453
+
454
+ Arguments:
455
+ np_array (np.ndarray): Numpy array of polygon points.
456
+
457
+ Returns:
458
+ list[tuple[int, int]]: List of tuples.
459
+ """
460
+ return [(int(x), int(y)) for x, y in np_array.reshape(-1, 2)]
461
+
431
462
  # pylint: disable=W0613
432
463
  def _to_np(self, geometry: shapely.geometry.polygon.Polygon, *args) -> np.ndarray:
433
464
  """Converts Polygon geometry to numpy array of polygon points.
@@ -36,10 +36,10 @@ class Tile(DEM):
36
36
 
37
37
  self.logger.debug("Generating tile for code %s", self.code)
38
38
 
39
- tiles_directory = os.path.join(self.map_directory, "objects", "tiles")
40
- os.makedirs(tiles_directory, exist_ok=True)
39
+ background_directory = os.path.join(self.map_directory, "background")
40
+ os.makedirs(background_directory, exist_ok=True)
41
41
 
42
- self._dem_path = os.path.join(tiles_directory, f"{self.code}.png")
42
+ self._dem_path = os.path.join(background_directory, f"{self.code}.png")
43
43
  self.logger.debug("DEM path for tile %s is %s", self.code, self._dem_path)
44
44
 
45
45
  def get_output_resolution(self) -> tuple[int, int]:
@@ -0,0 +1,63 @@
1
+ """This module contains functions to work with the background terrain of the map."""
2
+
3
+ import cv2
4
+ import numpy as np
5
+ import trimesh # type: ignore
6
+
7
+
8
+ # pylint: disable=R0801, R0914
9
+ def plane_from_np(
10
+ dem_data: np.ndarray,
11
+ resize_factor: float,
12
+ simplify_factor: int,
13
+ save_path: str,
14
+ ) -> None:
15
+ """Generates a 3D obj file based on DEM data.
16
+
17
+ Arguments:
18
+ dem_data (np.ndarray) -- The DEM data as a numpy array.
19
+ resize_factor (float) -- The factor by which the DEM data will be resized. Bigger values
20
+ will result in a bigger mesh.
21
+ simplify_factor (int) -- The factor by which the mesh will be simplified. Bigger values
22
+ will result in a simpler mesh.
23
+ save_path (str) -- The path to save the obj file.
24
+ """
25
+ dem_data = cv2.resize( # pylint: disable=no-member
26
+ dem_data, (0, 0), fx=resize_factor, fy=resize_factor
27
+ )
28
+
29
+ # Invert the height values.
30
+ dem_data = dem_data.max() - dem_data
31
+
32
+ rows, cols = dem_data.shape
33
+ x = np.linspace(0, cols - 1, cols)
34
+ y = np.linspace(0, rows - 1, rows)
35
+ x, y = np.meshgrid(x, y)
36
+ z = dem_data
37
+
38
+ vertices = np.column_stack([x.ravel(), y.ravel(), z.ravel()])
39
+ faces = []
40
+
41
+ for i in range(rows - 1):
42
+ for j in range(cols - 1):
43
+ top_left = i * cols + j
44
+ top_right = top_left + 1
45
+ bottom_left = top_left + cols
46
+ bottom_right = bottom_left + 1
47
+
48
+ faces.append([top_left, bottom_left, bottom_right])
49
+ faces.append([top_left, bottom_right, top_right])
50
+
51
+ faces = np.array(faces) # type: ignore
52
+ mesh = trimesh.Trimesh(vertices=vertices, faces=faces)
53
+
54
+ # Apply rotation: 180 degrees around Y-axis and Z-axis
55
+ rotation_matrix_y = trimesh.transformations.rotation_matrix(np.pi, [0, 1, 0])
56
+ rotation_matrix_z = trimesh.transformations.rotation_matrix(np.pi, [0, 0, 1])
57
+ mesh.apply_transform(rotation_matrix_y)
58
+ mesh.apply_transform(rotation_matrix_z)
59
+
60
+ # Simplify the mesh to reduce the number of faces.
61
+ mesh = mesh.simplify_quadric_decimation(face_count=len(faces) // simplify_factor)
62
+
63
+ mesh.export(save_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 0.9.98
3
+ Version: 1.0.0
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -31,8 +31,10 @@ Requires-Dist: pympler
31
31
  <p align="center">
32
32
  <a href="#Quick-Start">Quick Start</a> •
33
33
  <a href="#Overview">Overview</a> •
34
- <a href="#How-To-Run">How-To-Run</a> •
34
+ <a href="#Step-by-step">Create a map in 10 steps</a> •
35
+ <a href="#How-To-Run">How-To-Run</a><br>
35
36
  <a href="docs/FAQ.md">FAQ</a> •
37
+ <a href="docs/map_structure.md">Map Structure</a> •
36
38
  <a href="#Modder-Toolbox">Modder Toolbox</a><br>
37
39
  <a href="#Supported-objects">Supported objects</a> •
38
40
  <a href="#Generation-info">Generation info</a> •
@@ -68,6 +70,7 @@ Requires-Dist: pympler
68
70
  🔷 Generates *.obj files for background terrain based on the real-world height map<br>
69
71
  📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
70
72
  🧰 Modder Toolbox to help you with various of tasks 🆕<br>
73
+ 🌾 Automatically generates fields 🆕<br>
71
74
 
72
75
  <p align="center">
73
76
  <img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
@@ -76,6 +79,8 @@ Requires-Dist: pympler
76
79
  🛰️ Realistic background terrain objects with satellite images.<br><br>
77
80
  <img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
78
81
  🗒️ True-to-life blueprints for fast and precise modding.<br><br>
82
+ <img width="480" src="https://github.com/user-attachments/assets/1a8802d2-6a3b-4bfa-af2b-7c09478e199b"><br>
83
+ 🌾 Field generation with one click.<br><br>
79
84
  <img src="https://github.com/user-attachments/assets/cce45575-c917-4a1b-bdc0-6368e32ccdff"><br>
80
85
  📏 Almost any possible map sizes.
81
86
  </p>
@@ -126,6 +131,9 @@ Parameters:
126
131
  - coordinates: 45.15, 19.71
127
132
  - size: 16 x 16 km
128
133
 
134
+ ## Step by step
135
+ Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
136
+
129
137
  ## How-To-Run
130
138
 
131
139
  You'll find detailed instructions on how to run the project below. But if you prefer video tutorials, here's one for you:
@@ -202,12 +210,15 @@ The map will be saved in the `map_directory` directory.
202
210
  ## Modder Toolbox
203
211
  The tool now has a Modder Toolbox, which is a set of tools to help you with various tasks. You can open the toolbox by switching to the `🧰 Modder Toolbox` tab in the StreamLit app.<br>
204
212
 
205
- ![Modder Toolbox](https://github.com/user-attachments/assets/18f169e9-1a5b-474c-b488-6becfffadcea)
213
+ ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
206
214
 
207
215
  ### Tool categories
208
216
  Tools are divided into categories, which are listed below.
209
217
  #### Textures and DEM
210
- - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image.
218
+ - **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create the height map using it.
219
+
220
+ #### Background terrain
221
+ - **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
211
222
 
212
223
  ## Supported objects
213
224
  The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data. So, refer to [this page](https://wiki.openstreetmap.org/wiki/Map_Features) to understand the list below.
@@ -376,7 +387,7 @@ Let's have a closer look at the fields:
376
387
 
377
388
  ## Background terrain
378
389
  The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture to look fine.<br>
379
- So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `objects/tiles` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
390
+ So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj` and so on.<br>
380
391
  If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convinient approach to work with one file, one texture and then just cut the map from it.<br>
381
392
 
382
393
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
@@ -22,5 +22,6 @@ maps4fs/generator/qgis.py
22
22
  maps4fs/generator/texture.py
23
23
  maps4fs/generator/tile.py
24
24
  maps4fs/toolbox/__init__.py
25
+ maps4fs/toolbox/background.py
25
26
  maps4fs/toolbox/dem.py
26
27
  tests/test_generator.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "0.9.98"
7
+ version = "1.0.0"
8
8
  description = "Generate map templates for Farming Simulator from real places."
9
9
  authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
10
10
  license = {text = "MIT License"}
@@ -1,89 +0,0 @@
1
- """This module contains the Config class for map settings and configuration."""
2
-
3
- from __future__ import annotations
4
-
5
- import os
6
- from xml.etree import ElementTree as ET
7
-
8
- from maps4fs.generator.component import Component
9
-
10
- DEFAULT_HEIGHT_SCALE = 2000
11
- DEFAULT_MAX_LOD_DISTANCE = 10000
12
- DEFAULT_MAX_LOD_OCCLUDER_DISTANCE = 10000
13
-
14
-
15
- # pylint: disable=R0903
16
- class I3d(Component):
17
- """Component for map i3d file settings and configuration.
18
-
19
- Arguments:
20
- coordinates (tuple[float, float]): The latitude and longitude of the center of the map.
21
- map_height (int): The height of the map in pixels.
22
- map_width (int): The width of the map in pixels.
23
- map_directory (str): The directory where the map files are stored.
24
- logger (Any, optional): The logger to use. Must have at least three basic methods: debug,
25
- info, warning. If not provided, default logging will be used.
26
- """
27
-
28
- _map_i3d_path: str | None = None
29
-
30
- def preprocess(self) -> None:
31
- """Gets the path to the map I3D file from the game instance and saves it to the instance
32
- attribute. If the game does not support I3D files, the attribute is set to None."""
33
- try:
34
- self._map_i3d_path = self.game.i3d_file_path(self.map_directory)
35
- self.logger.debug("Map I3D path: %s.", self._map_i3d_path)
36
- except NotImplementedError:
37
- self.logger.info("I3D file processing is not implemented for this game.")
38
- self._map_i3d_path = None
39
-
40
- def process(self) -> None:
41
- """Updates the map I3D file with the default settings."""
42
- self._update_i3d_file()
43
-
44
- def _update_i3d_file(self) -> None:
45
- """Updates the map I3D file with the default settings."""
46
- if not self._map_i3d_path:
47
- self.logger.info("I3D is not obtained, skipping the update.")
48
- return
49
- if not os.path.isfile(self._map_i3d_path):
50
- self.logger.warning("I3D file not found: %s.", self._map_i3d_path)
51
- return
52
-
53
- tree = ET.parse(self._map_i3d_path)
54
-
55
- self.logger.debug("Map I3D file loaded from: %s.", self._map_i3d_path)
56
-
57
- root = tree.getroot()
58
- for map_elem in root.iter("Scene"):
59
- for terrain_elem in map_elem.iter("TerrainTransformGroup"):
60
- terrain_elem.set("heightScale", str(DEFAULT_HEIGHT_SCALE))
61
- self.logger.debug(
62
- "heightScale attribute set to %s in TerrainTransformGroup element.",
63
- DEFAULT_HEIGHT_SCALE,
64
- )
65
- terrain_elem.set("maxLODDistance", str(DEFAULT_MAX_LOD_DISTANCE))
66
- self.logger.debug(
67
- "maxLODDistance attribute set to %s in TerrainTransformGroup element.",
68
- DEFAULT_MAX_LOD_DISTANCE,
69
- )
70
-
71
- terrain_elem.set("occMaxLODDistance", str(DEFAULT_MAX_LOD_OCCLUDER_DISTANCE))
72
- self.logger.debug(
73
- "occMaxLODDistance attribute set to %s in TerrainTransformGroup element.",
74
- DEFAULT_MAX_LOD_OCCLUDER_DISTANCE,
75
- )
76
-
77
- self.logger.debug("TerrainTransformGroup element updated in I3D file.")
78
-
79
- tree.write(self._map_i3d_path)
80
- self.logger.debug("Map I3D file saved to: %s.", self._map_i3d_path)
81
-
82
- def previews(self) -> list[str]:
83
- """Returns a list of paths to the preview images (empty list).
84
- The component does not generate any preview images so it returns an empty list.
85
-
86
- Returns:
87
- list[str]: An empty list.
88
- """
89
- return []
File without changes
File without changes
File without changes
File without changes
File without changes