# dreamwall-animation/dwpicker architecture

> Architecture diagram of the GitHub repository dreamwall-animation/dwpicker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dreamwall-animation/dwpicker
- Repository: https://github.com/dreamwall-animation/dwpicker

## Overview

##### Project type and purpose
- Dreamwall Picker is a Python-based plugin/tool for Autodesk Maya (2017+).
- It provides an in-scene “picker” UI (menus, markmenus, hotboxes) to drive character animation workflows, plus import/convert AnimSchool pickers.

##### File structure
- Top level:
- dwpicker/        ← core Python package
- docs/            ← MkDocs-based documentation site
- scripts/         ← standalone convenience scripts
- drag_and_drop_to_maya_install.py ← Maya installer helper
- mkdocs.yml       ← doc build config
- dwpicker/ substructure suggests a modular MVC pattern:
- dwpicker/designer/    ← all editor UI components (views/controllers)
- dwpicker/ingest/      ← import/convert AnimSchool & mGear pickers
- individual modules (commands.py, document.py, picker.py, etc.) implement business logic, data model, Maya-SDK integration
- qtutils.py, pyside.py provide cross-platform Qt integration
- scripts/ folder shows how end users automate installation or generate pickers outside of Maya.

##### README
- Confirms it’s an animation picker creator/editor for Maya
- Lists key features: fast creation, import legacy pickers, store data in scene, advanced editor
- Points to online docs for deeper architectural notes

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Host
    subgraph "Autodesk Maya Host"
        Maya["Maya Host Application"]:::external
    end

    %% Entry Points
    PluginLoader["Plugin Loader / Entry Point"]:::external
    Installer["Installer Script"]:::external

    Maya --> PluginLoader
    Maya --> Installer
    click PluginLoader "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/main.py"
    click Installer "https://github.com/dreamwall-animation/dwpicker/blob/main/drag_and_drop_to_maya_install.py"

    %% Core Library
    subgraph "Core Library (dwpicker/)"
        %% Model Layer
        subgraph "Model Layer" 
            Document["document.py"]:::model
            Picker["picker.py"]:::model
            SceneData["scenedata.py"]:::model
        end
        click Document "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/document.py"
        click Picker "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/picker.py"
        click SceneData "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/scenedata.py"

        %% Controller Layer
        subgraph "Controller Layer"
            Commands["commands.py"]:::controller
            Interaction["interactionmanager.py"]:::controller
            Undo["undo.py"]:::controller
        end
        click Commands "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/commands.py"
        click Interaction "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/interactionmanager.py"
        click Undo "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/undo.py"

        %% View Layer
        subgraph "View Layer (designer/)"
            Canvas["canvas.py"]:::view
            Editor["editor.py"]:::view
            Attributes["attributes.py"]:::view
            Hotkeys["hotkeyseditor.py"]:::view
            Menu["menu.py"]:::view
            Layer["layer.py"]:::view
            Stack["stackeditor.py"]:::view
            PathEditor["patheditor.py"]:::view
            Display["display.py"]:::view
            Highlighter["highlighter.py"]:::view
        end
        click Canvas "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/canvas.py"
        click Editor "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/editor.py"
        click Attributes "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/attributes.py"
        click Hotkeys "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/hotkeyseditor.py"
        click Menu "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/menu.py"
        click Layer "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/layer.py"
        click Stack "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/stackeditor.py"
        click PathEditor "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/patheditor.py"
        click Display "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/display.py"
        click Highlighter "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/designer/highlighter.py"

        %% Utilities
        subgraph "Utilities"
            QtUtils["qtutils.py"]:::utils
            Pyside["pyside.py"]:::utils
            ArrayUtils["arrayutils.py"]:::utils
            Clipboard["clipboard.py"]:::utils
            ColorWheel["colorwheel.py"]:::utils
        end
        click QtUtils "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/qtutils.py"
        click Pyside "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/pyside.py"
        click ArrayUtils "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/arrayutils.py"
        click Clipboard "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/clipboard.py"
        click ColorWheel "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/colorwheel.py"

        %% Ingest Modules
        subgraph "Ingest Modules"
            AnimParser["animschool/parser.py"]:::model
            AnimConverter["animschool/converter.py"]:::model
            MGearTemplate["mgear/template.py"]:::model
            MGearConverter["mgear/converter.py"]:::model
        end
        click AnimParser "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/ingest/animschool/parser.py"
        click AnimConverter "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/ingest/animschool/converter.py"
        click MGearTemplate "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/ingest/mgear/template.py"
        click MGearConverter "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/ingest/mgear/converter.py"

        %% Shape Storage
        subgraph "Shape Storage"
            Shapes["*.dws"]:::model
            ShapeLib["shapelibrary.py"]:::model
        end
        click ShapeLib "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/shapelibrary.py"

        %% Business Logic & SDK
        subgraph "Biz Logic & SDK"
            Selection["selection.py"]:::utils
            References["references.py"]:::utils
            Transform["transform.py"]:::utils
            Viewport["viewport.py"]:::utils
            UpdateChecker["updatechecker.py"]:::utils
        end
        click Selection "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/selection.py"
        click References "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/references.py"
        click Transform "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/transform.py"
        click Viewport "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/viewport.py"
        click UpdateChecker "https://github.com/dreamwall-animation/dwpicker/blob/main/dwpicker/updatechecker.py"
    end

    %% Scripts and Docs
    Scripts["User Scripts (scripts/)"]:::external
    Docs["Documentation (MkDocs)"]:::external

    click Scripts "https://github.com/dreamwall-animation/dwpicker/tree/main/scripts/"
    click Docs "https://github.com/dreamwall-animation/dwpicker/blob/main/mkdocs.yml"

    %% Relationships
    PluginLoader --> Commands
    Commands --> Document
    Commands --> Picker
    Document --> Canvas
    Picker --> Canvas
    SceneData --> Canvas
    Canvas --> Maya

    AnimParser --> Document
    AnimConverter --> Document
    MGearTemplate --> Document
    MGearConverter --> Document

    Shapes --> ShapeLib
    ShapeLib --> Document

    Scripts --> Document
    Docs --> Document

    %% Styling
    classDef model fill:#dae8fc,stroke:#6c8ebf,color:#000;
    classDef controller fill:#d5e8d4,stroke:#82b366,color:#000;
    classDef view fill:#ffe6cc,stroke:#d79b00,color:#000;
    classDef utils fill:#f2f2f2,stroke:#999999,color:#000;
    classDef external fill:#e1d5e7,stroke:#9673a6,color:#000;
```
