# nxt-dev/nxt_editor architecture

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

- Interactive diagram: https://gitdiagram.com/nxt-dev/nxt_editor
- Repository: https://github.com/nxt-dev/nxt_editor

## Overview

##### Main Components

a. Core Editor Components:
- Main Editor Interface (Qt-based)
- Stage Model & View System
- Node Graph System
- Code Composition Engine

b. Integration Layer:
- Maya Plugin
- Blender Plugin
- Unreal Plugin

c. Supporting Systems:
- Documentation System
- Build System
- Resource Management

**┌─ User Interface Layer ─────────────────────┐**
- Main Window                             │
- Dock Widgets                            │
- Node Graphics                           │
- Connection Graphics                     │
- ┬──────────────────────┬─┘

**┌─ Core Layer ─────┴──────────────────────┴─┐**
- Stage Model                             │
- Command System                          │
- Action System                           │
- ┬──────────────────────┬─┘

**┌─ Integration Layer ──────────────────────┬─┐**
- ┌─────────┐    ┌───────┐    ┌─────────┐│ │
- Maya   │    │Blender│    │ Unreal  ││ │
- ┘    └───────┘    └─────────┘│ │
- ┬─┘ │

**┌─ Resource Layer ─┴─────────────────────┴─┐**
- Styles                                 │
- Fonts                                  │
- ┬─┘

##### Important Elements to Highlight

a. Data Flow:
- How node data flows through the system
- Command/action propagation
- Plugin communication channels

b. Key Subsystems:
- Dockwidgets system (property editor, code editor, etc.)
- Node graphics system
- Stage model/view relationship
- Plugin architecture

##### Specific Implementation Details

- Qt dependency relationship
- Python version requirements (3.9+)
- Virtual environment integration points
- Documentation generation flow

##### Integration Points

- Detail how each DCC plugin interfaces with the core system
- Resource sharing between standalone and integrated modes
- Configuration paths for different environments

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef integration fill:#e67e22,stroke:#d35400,color:white
    classDef resource fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef docs fill:#9b59b6,stroke:#8e44ad,color:white
    classDef build fill:#e74c3c,stroke:#c0392b,color:white

    %% UI Layer
    subgraph UI
        MainWindow["Main Window"]
        DockWidgets["Dock Widgets System"]
        NodeGraphics["Node Graphics"]
        ConnGraphics["Connection Graphics"]
    end

    %% Core Layer
    subgraph Core
        StageModel["Stage Model"]
        StageView["Stage View"]
        CommandSys["Command System"]
        ActionSys["Action System"]
    end

    %% Integration Layer
    subgraph Integration
        Maya["Maya Plugin"]
        Blender["Blender Plugin"]
        Unreal["Unreal Plugin"]
    end

    %% Resource Layer
    subgraph Resources
        Icons["Icons"]
        Styles["Styles"]
        Fonts["Fonts"]
    end

    %% Documentation Layer
    subgraph Documentation
        UserDocs["User Documentation"]
        ApiDocs["API Documentation"]
    end

    %% Build Layer
    subgraph BuildSystem
        MayaBuild["Maya Build"]
        BlenderBuild["Blender Build"]
        UnrealBuild["Unreal Build"]
        Release["Release System"]
    end

    %% Relationships
    MainWindow --> DockWidgets
    MainWindow --> NodeGraphics
    MainWindow --> ConnGraphics
    NodeGraphics --> StageModel
    ConnGraphics --> StageModel
    StageModel --> StageView
    StageModel --> CommandSys
    CommandSys --> ActionSys
    
    Maya --> Core
    Blender --> Core
    Unreal --> Core
    
    Resources --> UI
    BuildSystem --> Integration

    %% Click Events
    click MainWindow "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/main_window.py"
    click StageModel "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/stage_model.py"
    click StageView "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/stage_view.py"
    click NodeGraphics "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/node_graphics_item.py"
    click ConnGraphics "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/connection_graphics_item.py"
    click CommandSys "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/commands.py"
    click ActionSys "https://github.com/nxt-dev/nxt_editor/blob/release/nxt_editor/actions.py"
    click Maya "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/integration/maya"
    click Blender "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/integration/blender"
    click Unreal "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/integration/unreal"
    click DockWidgets "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/dockwidgets"
    click Icons "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/resources/icons"
    click Styles "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/resources/styles"
    click Fonts "https://github.com/nxt-dev/nxt_editor/tree/release/nxt_editor/resources/fonts"
    click UserDocs "https://github.com/nxt-dev/nxt_editor/tree/release/docs/user_docs"
    click ApiDocs "https://github.com/nxt-dev/nxt_editor/tree/release/docs/api_docs"
    click MayaBuild "https://github.com/nxt-dev/nxt_editor/blob/release/build/make_maya_plugin.nxt"
    click BlenderBuild "https://github.com/nxt-dev/nxt_editor/blob/release/build/make_blender_plugin.nxt"
    click UnrealBuild "https://github.com/nxt-dev/nxt_editor/blob/release/build/make_unreal_plugin.nxt"
    click Release "https://github.com/nxt-dev/nxt_editor/blob/release/build/release.nxt"

    %% Style Applications
    class MainWindow,DockWidgets,NodeGraphics,ConnGraphics ui
    class StageModel,StageView,CommandSys,ActionSys core
    class Maya,Blender,Unreal integration
    class Icons,Styles,Fonts resource
    class UserDocs,ApiDocs docs
    class MayaBuild,BlenderBuild,UnrealBuild,Release build
```
