Skip to content

Commit

Permalink
Minor fixes on how snapshots for thumbnails are created; Added suppor…
Browse files Browse the repository at this point in the history
…t for Cura 5.7
  • Loading branch information
Molodos committed Mar 19, 2024
1 parent 9bc5332 commit 68247c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[4.3.0]
- Minor fixes on how snapshots for thumbnails are created
- Added support for Cura 5.7

[4.2.0]
- Added Elegoo OrangeStorm Giga printer (beta)

Expand Down
2 changes: 1 addition & 1 deletion package_plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"display_name": "Elegoo Neptune Thumbnails",
"package_id": "ElegooNeptune3Thumbnails",
"package_type": "plugin",
"package_version": "4.2.0",
"package_version": "4.3.0",
"sdk_version": 8,
"sdk_version_semver": "8.0.0",
"website": "https://github.com/Molodos/ElegooNeptuneThumbnails"
Expand Down
5 changes: 3 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "[email protected]",
"website": "https://github.com/Molodos"
},
"version": "4.2.0",
"version": "4.3.0",
"description": "Adds Elegoo Neptune printer thumbnail to G-code. Contains options to display parameters like estimated print time or model height on the thumbnail",
"supported_sdk_versions": [
"8.0.0",
Expand All @@ -16,7 +16,8 @@
"8.3.0",
"8.4.0",
"8.5.0",
"8.6.0"
"8.6.0",
"8.7.0"
],
"api": 8
}
4 changes: 2 additions & 2 deletions tools/thumbnail_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def generate_klipper_thumbnail_gcode(cls, slice_data: SliceData) -> str:
"""
Generate klipper thumbnail gcode for thumbnails in sizes 32x32 and 300x300
"""
small_icon: QImage = Snapshot.snapshot(width=32, height=32)
small_icon: QImage = Snapshot.isometricSnapshot(width=32, height=32)
big_icon: QImage = cls._render_thumbnail(slice_data=slice_data, is_preview=False, add_background=False)
big_icon = big_icon.scaled(300, 300)
g_code: str = "\r"
Expand Down Expand Up @@ -153,7 +153,7 @@ def _render_thumbnail(cls, slice_data: SliceData, is_preview: bool = True, add_b
if not SettingsManager.get_settings().thumbnails_enabled and not SettingsManager.get_settings().klipper_thumbnails_enabled:
foreground = QImage(cls.NO_FOREGROUND_IMAGE_PATH)
elif SettingsManager.get_settings().use_current_model or not is_preview:
foreground = Snapshot.snapshot(width=600, height=600)
foreground = Snapshot.isometricSnapshot(width=600, height=600)
else:
foreground = QImage(cls.FOREGROUND_IMAGE_PATH)

Expand Down

0 comments on commit 68247c1

Please sign in to comment.