Asset-Frameworker/Tickets/Resolved/ISSUE-006-col-increment-multi-asset.md
2025-04-29 18:26:13 +02:00

32 lines
2.5 KiB
Markdown

---
ID: ISSUE-006 # e.g., FEAT-001, ISSUE-002
Type: Issue # Choose one: Issue or Feature
Status: Mostly Resolved # Choose one
Priority: Medium # Choose one
Labels: [core, bug, map_processing, multi_asset] # Add relevant labels from the list or define new ones
Created: 2025-04-22
Updated: 2025-04-22
Related: #FEAT-004-handle-multi-asset-inputs.md # Links to other tickets (e.g., #ISSUE-YYY), relevant files, or external URLs
---
# [ISSUE-006]: COL-# Suffixes Incorrectly Increment Across Multi-Asset Inputs
## Description
When processing an input (ZIP or folder) that contains files for multiple distinct assets, the numeric suffixes applied to map types listed in `RESPECT_VARIANT_MAP_TYPES` (such as "COL") are currently incremented globally across all files in the input, rather than being reset and incremented independently for each detected asset group.
## Current Behavior
If an input contains files for AssetA (e.g., AssetA_COL.png, AssetA_COL_Variant.png) and AssetB (e.g., AssetB_COL.png), the output might incorrectly number them as AssetA_COL-1.png, AssetA_COL-2.png, and AssetB_COL-3.png. The expectation is that numbering should restart for each asset, resulting in AssetA_COL-1.png, AssetA_COL-2.png, and AssetB_COL-1.png.
## Desired Behavior / Goals
The numeric suffix for map types in `RESPECT_VARIANT_MAP_TYPES` should be determined and applied independently for each distinct asset detected within a multi-asset input. The numbering should start from -1 for each asset group.
## Implementation Notes (Optional)
- The logic for assigning suffixes is primarily within `AssetProcessor._inventory_and_classify_files`.
- This method currently classifies all files from the input together before determining asset groups.
- The classification logic needs to be adjusted to perform suffix assignment *after* files have been grouped by their determined asset name.
- This might require modifying the output of `_inventory_and_classify_files` or adding a new step after `_determine_base_metadata` to re-process or re-structure the classified files per asset for suffix assignment.
## Acceptance Criteria (Optional)
* [ ] Processing a multi-asset input containing multiple "COL" variants for different assets results in correct COL-# suffixes starting from -1 for each asset's output files.
* [ ] The GUI preview accurately reflects the correct COL-# numbering for each file based on its predicted asset name.
* [ ] The CLI processing output confirms the correct numbering in the generated filenames.