GUI - File Type Keybinds And F2 Renaming

This commit is contained in:
2025-05-06 20:31:53 +02:00
parent ff548e902e
commit 9a27d23a4c
7 changed files with 530 additions and 73 deletions

View File

@@ -28,6 +28,15 @@ python -m gui.main_window
* **Drag-and-Drop Re-parenting:** File rows can be dragged and dropped onto different Asset rows to change their parent asset association.
* **Right-Click Context Menu:** Right-clicking on Source, Asset, or File rows brings up a context menu:
* **Re-interpret selected source:** This sub-menu allows re-running the prediction process for the selected source item(s) using either a specific preset or the LLM predictor. The available presets and the "LLM" option are listed dynamically. This replaces the previous standalone "Re-interpret Selected with LLM" button.
* **Keybinds for Item Management:** When items are selected in the Preview Table, the following keybinds can be used:
* `Ctrl + C`: Sets the file type of selected items to Color/Albedo (`MAP_COL`).
* `Ctrl + R`: Toggles the file type of selected items between Roughness (`MAP_ROUGH`) and Glossiness (`MAP_GLOSS`).
* `Ctrl + N`: Sets the file type of selected items to Normal (`MAP_NRM`).
* `Ctrl + M`: Toggles the file type of selected items between Metalness (`MAP_METAL`) and Reflection/Specular (`MAP_REFL`).
* `Ctrl + D`: Sets the file type of selected items to Displacement/Height (`MAP_DISP`).
* `Ctrl + E`: Sets the file type of selected items to Extra (`EXTRA`).
* `Ctrl + X`: Sets the file type of selected items to Ignore (`FILE_IGNORE`).
* `F2`: Prompts to set the asset name for all selected items. This name propagates to the `AssetRule` name or the `FileRule` `target_asset_name_override` for the files under the selected assets. If individual files are selected, it will affect their `target_asset_name_override`.
* **Prediction Population:** If a valid preset is selected in the Preset Selector (or if re-interpretation is triggered), the table populates with prediction results as they become available. If no preset is selected, added items show empty prediction fields.
* **Columns:** The table displays columns: Name, Target Asset, Supplier, Asset Type, Item Type. The "Target Asset" column stretches to fill available space.
* **Coloring:** The *text color* of file items is determined by their Item Type (colors defined in `config/app_settings.json`). The *background color* of file items is a 30% darker shade of their parent asset's background, helping to visually group files within an asset. Asset rows themselves may use alternating background colors based on the application theme.