Skip to content

Commit 460e340

Browse files
devonjonesclaude
andcommitted
feat: make sprite generation the default behavior
Changed sprite generation from opt-in to opt-out across the codebase: - bin/dropbox_scanner: --sprites flag now defaults to True - openforge/data/scanner.py: ENABLE_SPRITE_THUMBNAILS defaults to True - openforge/data/incremental.py: ENABLE_SPRITE_THUMBNAILS defaults to True - openforge/data/io.py: use_sprites parameter defaults to True Users can now use --no-sprites to generate legacy single thumbnails instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b1b2833 commit 460e340

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

bin/dropbox_scanner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ from openforge.data.scanner import clean_files, find_files, parse_files, print_f
2828
@click.option("--verbose/--no-verbose", default=False, help="Verbose output")
2929
@click.option("--upload/--no-upload", default=False, help="Upload files to R2")
3030
@click.option(
31-
"--sprites/--no-sprites", default=False, help="Generate sprite sheet thumbnails"
31+
"--sprites/--no-sprites", default=True, help="Generate sprite sheet thumbnails"
3232
)
3333
@click.option("--update", help="Update existing fixture file incrementally")
3434
@click.option("--dry-run", is_flag=True, help="Preview changes without writing files")

openforge/data/incremental.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ def _get_metadata(path, fn):
628628

629629
# Only create thumbnail if file has changed
630630
if file_changed:
631-
use_sprites = config.get("ENABLE_SPRITE_THUMBNAILS", False)
631+
use_sprites = config.get("ENABLE_SPRITE_THUMBNAILS", True)
632632
try:
633633
thumbnail_image = create_and_upload_thumbnail(
634634
result["file_metadata"],

openforge/data/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def create_and_upload_thumbnail(
337337
s3_key_cache: Set[str],
338338
config: Dict,
339339
verbose: bool = False,
340-
use_sprites: bool = False,
340+
use_sprites: bool = True,
341341
) -> Dict:
342342
"""Create and upload thumbnail or sprite sheet for an STL file.
343343

openforge/data/scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def _get_metadata(path, fn):
494494
f["storage_address"] = f"{config['FILE_DOMAIN']}/{model_address}"
495495

496496
# Generate and upload thumbnail (sprite or single based on config)
497-
use_sprites = config.get("ENABLE_SPRITE_THUMBNAILS", False)
497+
use_sprites = config.get("ENABLE_SPRITE_THUMBNAILS", True)
498498
try:
499499
thumbnail_image = create_and_upload_thumbnail(
500500
f, full_file, s3_client, s3_key_cache, config, verbose, use_sprites

0 commit comments

Comments
 (0)