2.4 KiB
2.4 KiB
Plan: Update GUI Preview Status
Objective: Modify the Asset Processor GUI preview to distinguish between files explicitly marked as "Extra" by preset patterns and those that are simply unclassified.
Current Statuses:
- Mapped
- Ignored
- Extra (Includes both explicitly matched and unclassified files)
Proposed Statuses:
- Mapped
- Ignored
- Extra (Files explicitly matched by
move_to_extra_patternsin the preset) - Unrecognised (Files not matching any map, model, or explicit extra pattern)
Visual Plan:
graph TD
A[Start: User Request] --> B{Analyze Request: Split 'Extra' status};
B --> C{Info Gathering};
C --> D[Read gui/prediction_handler.py];
D --> E[Read asset_processor.py];
E --> F[Read Presets/Poliigon.json];
F --> G[Read gui/main_window.py];
G --> H{Identify Code Locations};
H --> I[asset_processor.py: get_detailed_file_predictions()];
H --> J[gui/main_window.py: on_prediction_results_ready()];
I --> K{Plan Code Changes};
J --> K;
K --> L[Modify asset_processor.py: Differentiate status based on 'reason'];
K --> M[Modify gui/main_window.py: Add color rule for 'Unrecognised' (#92371f)];
L --> N{Final Plan};
M --> N;
N --> O[Present Plan to User];
O --> P{User Approval + Color Choice};
P --> Q[Switch to Code Mode for Implementation];
subgraph "Code Modification"
L
M
end
subgraph "Information Gathering"
D
E
F
G
end
Implementation Steps:
-
Modify
asset_processor.py(get_detailed_file_predictionsmethod):- Locate the loop processing the
self.classified_files["extra"]list (around line 1448). - Inside this loop, check the
reasonassociated with each file:- If
reason == 'Unclassified', set the outputstatusto"Unrecognised". - Otherwise (if the reason indicates an explicit pattern match), set the output
statusto"Extra".
- If
- Adjust the
detailsstring provided in the output for clarity (e.g., show pattern match reason for "Extra", maybe just "[Unrecognised]" for the new status).
- Locate the loop processing the
-
Modify
gui/main_window.py(on_prediction_results_readymethod):- Locate the section where text color is applied based on the
status(around line 673). - Add a new
elifcondition to handlestatus == "Unrecognised"and assign it the colorQColor("#92371f").
- Locate the section where text color is applied based on the