GUI FIXES

This commit is contained in:
2025-05-01 19:16:37 +02:00
parent 51ff45bd5c
commit 2f8bbc3a7d
16 changed files with 1397 additions and 198 deletions

View File

@@ -2,16 +2,19 @@
This document explains how to configure the Asset Processor Tool and use presets.
## Core Settings (`config.py`)
## Application Settings (`config/app_settings.json`)
The tool's behavior is controlled by core settings defined in `config.py`. While primarily for developers, some settings are important for users to be aware of:
The tool's core settings are now stored in `config/app_settings.json`. This JSON file contains the base configuration for the application.
* `OUTPUT_BASE_DIR`: The default root directory where processed assets will be saved.
* `IMAGE_RESOULTIONS`: Defines the target resolutions for processed texture maps (e.g., 4K, 2K).
* `BLENDER_EXECUTABLE_PATH`: The path to your Blender installation, required for optional Blender integration.
* Other settings control aspects like default asset category, filename patterns, map merge rules, and output formats.
The `configuration.py` module is responsible for loading the settings from `app_settings.json` and merging them with the rules from the selected preset file.
These settings can often be overridden via the GUI or CLI arguments.
## GUI Configuration Editor
You can modify the `app_settings.json` file using the built-in GUI editor. Access it via the **Edit** -> **Preferences...** menu.
This editor allows you to view and change the core application settings. Note that any changes made through the GUI editor require an application restart to take effect.
*(Ideally, a screenshot of the GUI Configuration Editor would be included here.)*
## Preset Files (`presets/*.json`)
@@ -22,6 +25,6 @@ Preset files define supplier-specific rules for interpreting asset source files.
* Presets contain rules based on filename patterns and keywords to identify map types, models, and other files.
* They also define how variants (like different resolutions or bit depths) are handled and how asset names and categories are determined from the source filename.
When processing assets, you must specify which preset to use. The tool then loads the core settings from `config.py` and merges them with the rules from the selected preset to determine how to process the input.
When processing assets, you must specify which preset to use. The tool then loads the core settings from `config/app_settings.json` and merges them with the rules from the selected preset to determine how to process the input.
A template preset file (`presets/_template.json`) is provided as a base for creating new presets.

View File

@@ -12,24 +12,32 @@ python -m gui.main_window
## Interface Overview
* **Menu Bar:** The "View" menu allows you to toggle the visibility of the Log Console and the Detailed File Preview.
* **Menu Bar:** The "Edit" menu contains the "Preferences..." option to open the GUI Configuration Editor. The "View" menu allows you to toggle the visibility of the Log Console and the Detailed File Preview.
* **Preset Editor Panel (Left):**
* **Optional Log Console:** Displays application logs (toggle via View menu).
* **Preset List:** Create, delete, load, edit, and save presets. On startup, the "-- Select a Preset --" item is explicitly selected. You must select a specific preset from this list to load it into the editor below, enable the detailed file preview, and enable the "Start Processing" button.
* **Preset Editor Tabs:** Edit the details of the selected preset.
* **Processing Panel (Right):**
* **Preset Selector:** Choose the preset to use for *processing* the current queue.
* **Output Directory:** Set the output path (defaults to `config.py`, use "Browse...")
* **Output Directory:** Set the output path (defaults to `config/app_settings.json`, use "Browse...")
* **Drag and Drop Area:** Add asset `.zip`, `.rar`, `.7z` files, or folders by dragging and dropping them here.
* **Preview Table:** Shows queued assets. Initially, this area displays a message prompting you to select a preset. Once a preset is selected from the Preset List, the detailed file preview will load here. The mode of the preview depends on the "View" menu:
* **Detailed Preview (Default):** Lists all files, predicted status (`Mapped`, `Model`, `Extra`, `Unrecognised`, `Ignored`, `Error`), output name, etc., based on the selected *processing* preset. Text colors are applied to cells based on the status of the individual file they represent. Rows use alternating background colors per asset group for visual separation.
* **Simple View (Preview Disabled):** Lists only top-level input asset paths.
* **Progress Bar:** Shows overall processing progress.
* **Blender Post-Processing:** Checkbox to enable Blender scripts. If enabled, shows fields and browse buttons for target `.blend` files (defaults from `config.py`).
* **Blender Post-Processing:** Checkbox to enable Blender scripts. If enabled, shows fields and browse buttons for target `.blend` files (defaults from `config/app_settings.json`).
* **Options & Controls (Bottom):**
* `Overwrite Existing`: Checkbox to force reprocessing.
* `Workers`: Spinbox for concurrent processes.
* `Clear Queue`: Button to clear the queue and preview.
* `Start Processing`: Button to start processing the queue. This button is disabled until a valid preset is selected from the Preset List.
* `Cancel`: Button to attempt stopping processing.
* **Status Bar:** Displays current status, errors, and completion messages.
* **Status Bar:** Displays current status, errors, and completion messages.
## GUI Configuration Editor
Access the GUI Configuration Editor via the **Edit** -> **Preferences...** menu. This dialog allows you to directly edit the `config/app_settings.json` file, which contains the core application settings.
Any changes made in the GUI Configuration Editor require you to restart the application for them to take effect.
*(Ideally, a screenshot of the GUI Configuration Editor would be included here.)*