63 lines
2.4 KiB
Markdown
63 lines
2.4 KiB
Markdown
# 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_patterns` in the preset)
|
|
* Unrecognised (Files not matching any map, model, or explicit extra pattern)
|
|
|
|
**Visual Plan:**
|
|
|
|
```mermaid
|
|
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:**
|
|
|
|
1. **Modify `asset_processor.py` (`get_detailed_file_predictions` method):**
|
|
* Locate the loop processing the `self.classified_files["extra"]` list (around line 1448).
|
|
* Inside this loop, check the `reason` associated with each file:
|
|
* If `reason == 'Unclassified'`, set the output `status` to `"Unrecognised"`.
|
|
* Otherwise (if the reason indicates an explicit pattern match), set the output `status` to `"Extra"`.
|
|
* Adjust the `details` string provided in the output for clarity (e.g., show pattern match reason for "Extra", maybe just "[Unrecognised]" for the new status).
|
|
|
|
2. **Modify `gui/main_window.py` (`on_prediction_results_ready` method):**
|
|
* Locate the section where text color is applied based on the `status` (around line 673).
|
|
* Add a new `elif` condition to handle `status == "Unrecognised"` and assign it the color `QColor("#92371f")`. |