6.0 KiB

Asset Processor Tool Documentation

This documentation provides information about the Asset Processor Tool, covering both user-facing features and technical details for developers.

Overview

This tool processes 3D asset source files (texture sets, models, etc., provided as ZIP, RAR, 7z archives, or folders) into a standardized library format. It uses configurable presets to interpret different asset sources and automates tasks like file classification, image resizing, channel merging, and metadata generation.

The tool offers both a Graphical User Interface (GUI) for interactive use and a Command-Line Interface (CLI) for batch processing and scripting. It also includes a Directory Monitor for automated processing of assets dropped into a watched folder, and optional integration with Blender for automated material/nodegroup creation.

This documentation strictly excludes details on environment setup, dependency installation, building the project, or deployment procedures, assuming familiarity with Python and the relevant libraries (OpenCV, NumPy, PySide6).

Architecture and Codebase Summary

For developers interested in contributing, the tool's architecture centers on a Core Processing Engine (processing_engine.py) which initializes and runs a Pipeline Orchestrator (processing/pipeline/orchestrator.py::PipelineOrchestrator). This orchestrator executes a defined sequence of Processing Stages (located in processing/pipeline/stages/) based on a Hierarchical Rule System (rule_structure.py) and a Configuration System (configuration.py loading config/app_settings.json and Presets/*.json). The Graphical User Interface (gui/) has been significantly refactored: MainWindow (main_window.py) acts as a coordinator, delegating tasks to specialized widgets (MainPanelWidget, PresetEditorWidget, LogConsoleWidget) and background handlers (RuleBasedPredictionHandler, LLMPredictionHandler, LLMInteractionHandler, AssetRestructureHandler). The Directory Monitor (monitor.py) now processes archives asynchronously using a thread pool and utility functions (utils/prediction_utils.py, utils/workspace_utils.py). The Command-Line Interface entry point (main.py) primarily launches the GUI, with core CLI functionality currently non-operational. Optional Blender Integration (blenderscripts/) remains. A new utils/ directory houses shared helper functions.

The codebase reflects this structure. The gui/ directory contains the refactored UI components, utils/ holds shared utilities, processing/pipeline/ contains the orchestrator and individual processing stages, Presets/ contains JSON presets, and blenderscripts/ holds Blender scripts. Core logic resides in processing_engine.py, processing/pipeline/orchestrator.py, configuration.py, rule_structure.py, monitor.py, and main.py. The processing pipeline, initiated by processing_engine.py and executed by the PipelineOrchestrator, relies entirely on the input SourceRule and static configuration. Each stage in the pipeline operates on an AssetProcessingContext object (processing/pipeline/asset_context.py) to perform specific tasks like map processing, channel merging, and metadata generation.

Table of Contents