# akshayalix/collect-assets architecture

> Architecture diagram of the GitHub repository akshayalix/collect-assets, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akshayalix/collect-assets
- Repository: https://github.com/akshayalix/collect-assets

## Overview

##### Main Components
- 3ds Max Integration:
- The plugin is executed from within the 3ds Max environment.
- It appears in the Customize interface under the “ModX” category.
- Asset Collection Module:
- The core functionality that scans the scene and collects textures, materials, and other files.
- Handles various “standart” materials and integrations with multiple renderers.
- Resource/Assets Management:
- External script files (e.g., collect_asset_2.099.ms, installCA.ms) containing the core plugin logic.
- Build and Packaging System:
- build.bat and related files (module.prop, mzp.run) indicate an automated build process.
- Integration with 7-Zip (directory “7z” with the executable) to assist with packaging the plugin.
- External Dependencies:
- Requirement for 7-Zip and Git for building from source.
- Instructions in the README explain the integration with the build process.

##### Relationships and Interactions
- The 3ds Max User Interface triggers the plugin using a script (via “Scripting -> Run script”) which loads the asset collection functionality.
- Once executed, the plugin scans the scene, gathers references to textures and materials, and copies the appropriate files from the project’s asset directories.
- The process interacts with configuration files (collect_asset.ini) for customizable options.
- During the build process, the build.bat script orchestrates compilation/packaging by invoking external tools (7-Zip) and using files such as module.prop to prepare the final plugin (.mzp file).

##### Architectural Patterns and Important Details
- External dependency management (7-Zip, Git) is encapsulated within the build process.
- The plugin acts as an adapter between the 3ds Max environment and external asset files.

- 3ds Max Environment / UI Integration (noting “Customize -> Toolbars, ModX category”).
- Collect Assets Core Module (script files: collect_asset_2.099.ms, installCA.ms, collect_asset.ini).
- Build System (build.bat, module.prop, 7z directory, and references to 7-Zip).
- How a user action in 3ds Max triggers the plugin.
- Data flow from scanning the scene to copying assets and using configuration files.
- Build pipeline flow from source code to final packaged .mzp output.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Runtime Environment"
        UI["3ds Max UI Integration"]:::ui
        Helper["installCA.ms Helper Script"]:::ui
        ACM["Asset Collection Module"]:::acm
        CFG["collect_asset.ini (Config)"]:::cfg
        UI -->|"trigger"| ACM
        UI -->|"loads"| Helper
        ACM -->|"reads"| CFG

        subgraph "Asset Resources"
            Icons["Icons (GUI)"]:::ram
            IconsDark["IconsDark (GUI)"]:::ram
            Assets["assets (Additional Assets)"]:::ram
        end
        ACM -->|"collects from"| Icons
        ACM -->|"collects from"| IconsDark
        ACM -->|"collects from"| Assets
    end

    subgraph "Build & Packaging Pipeline"
        BS["Build Script (build.bat)"]:::build
        PC["Packaging Config (module.prop, mzp.run)"]:::build
        ZIP["7-Zip Integration (7zG.exe)"]:::build
        BS -->|"invokes"| PC
        PC -->|"packages via"| ZIP
    end

    ext7["7-Zip (external)"]:::external
    extGit["Git (external)"]:::external
    BS ---|"requires"| ext7
    BS ---|"requires"| extGit

    click UI "https://github.com/akshayalix/collect-assets/blob/master/collect_asset_2.099.ms"
    click Helper "https://github.com/akshayalix/collect-assets/blob/master/installCA.ms"
    click ACM "https://github.com/akshayalix/collect-assets/blob/master/collect_asset_2.099.ms"
    click CFG "https://github.com/akshayalix/collect-assets/blob/master/collect_asset.ini"
    click Icons "https://github.com/akshayalix/collect-assets/tree/master/Icons/"
    click IconsDark "https://github.com/akshayalix/collect-assets/tree/master/IconsDark/"
    click Assets "https://github.com/akshayalix/collect-assets/tree/master/assets/"
    click BS "https://github.com/akshayalix/collect-assets/blob/master/build.bat"
    click PC "https://github.com/akshayalix/collect-assets/blob/master/module.prop"
    click ZIP "https://github.com/akshayalix/collect-assets/tree/master/7z/"

    classDef ui fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef acm fill:#AED6F1,stroke:#3498DB,stroke-width:2px;
    classDef cfg fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
    classDef ram fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef build fill:#F5EEF8,stroke:#8E44AD,stroke-width:2px;
    classDef external fill:#FDEDEC,stroke:#C0392B,stroke-width:2px;
```
