Asset-Frameworker/Tickets/Resolved/ISSUE-007-respect-variant-single-map.md
2025-04-29 18:26:13 +02:00

30 lines
2.1 KiB
Markdown

---
ID: ISSUE-007 # e.g., FEAT-001, ISSUE-002
Type: Issue # Choose one: Issue or Feature
Status: Resolved # Choose one
Priority: Medium # Choose one
Labels: [core, bug, map_processing, suffix, regression] # Add relevant labels from the list or define new ones
Created: 2025-04-22
Updated: 2025-04-22
Related: #ISSUE-006-col-increment-multi-asset.md # Links to other tickets (e.g., #ISSUE-YYY), relevant files, or external URLs
---
# [ISSUE-007]: Suffix Not Applied to Single Maps in RESPECT_VARIANT_MAP_TYPES
## Description
Map types listed in `config.py`'s `RESPECT_VARIANT_MAP_TYPES` (e.g., "COL") are expected to always receive a numeric suffix (e.g., "-1"), even if only one map of that type exists for a given asset. Following the fix for #ISSUE-006, this behavior is no longer occurring. Single maps of these types are now output without a suffix.
## Current Behavior
An asset containing only one map file designated as "COL" (e.g., `AssetA_COL.png`) results in processed output files named like `AssetA_COL_4K.png`, without the `-1` suffix.
## Desired Behavior / Goals
An asset containing only one map file designated as "COL" (or any other type listed in `RESPECT_VARIANT_MAP_TYPES`) should result in processed output files named like `AssetA_COL-1_4K.png`, correctly applying the numeric suffix even when it's the sole variant.
## Implementation Notes (Optional)
- The per-asset suffix assignment logic added in `AssetProcessor.process` (around line 233 in the previous diff) likely needs adjustment.
- The condition `if respect_variants:` might need to be modified, or the loop/enumeration logic needs to explicitly handle the case where `len(maps_in_group) == 1` for types listed in `RESPECT_VARIANT_MAP_TYPES`.
## Acceptance Criteria (Optional)
* [ ] Processing an asset with a single "COL" map results in output files with the `COL-1` suffix.
* [ ] Processing an asset with multiple "COL" maps still results in correctly incremented suffixes (`COL-1`, `COL-2`, etc.).
* [ ] Map types *not* listed in `RESPECT_VARIANT_MAP_TYPES` continue to receive no suffix if only one exists.