# mgunbatti/xsilkroad-blender-plugin architecture

> Architecture diagram of the GitHub repository mgunbatti/xsilkroad-blender-plugin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mgunbatti/xsilkroad-blender-plugin
- Repository: https://github.com/mgunbatti/xsilkroad-blender-plugin

## Overview

This is a Blender add-on for browsing Silkroad PK2 archives, importing game assets into Blender, exporting scenes, and transferring content to Unreal Engine. The main workflow is: open an archive, choose an asset, resolve its dependencies, import it into Blender, then optionally export it or transfer it to Unreal. The graph preserves the format-specific importers and the separate map and Unreal-project stages. Some links are documented in the README; unsampled implementation details are not inferred.

Main entry points: [`silkroad_pk2_bridge/import_runtime.py`](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/import_runtime.py) (Import validation), [`silkroad_pk2_bridge/__init__.py`](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/__init__.py) (Editor UI), [`silkroad_pk2_bridge/ue_blender.py`](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_blender.py) (Unreal project jobs), [`silkroad_pk2_bridge/pk2_core.py`](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/pk2_core.py) (PK2 archive access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_archive_import["Archive and import"]
  node_editor_ui["Editor UI<br/>[__init__.py]"]
  node_archive[("PK2 archive access<br/>[pk2_core.py]")]
  node_asset_prep["Asset preparation<br/>[pk2_core.py]"]
  node_validation["Import validation<br/>[import_runtime.py]"]
  node_bridge["Asset reference checks<br/>[bridge_core.py]"]
  node_localization["English and Turkish UI<br/>[i18n.py]"]
end

subgraph group_formats_maps["Formats and maps"]
  node_binary["Binary readers<br/>[asset_binary.py]"]
  node_bsr["BSR resources<br/>[JellyBSR.py]"]
  node_bms["BMS meshes<br/>[JellyBMS.py]"]
  node_bsk["BSK skeletons<br/>[JellyBSK.py]"]
  node_ban["BAN animation<br/>[JellyBAN.py]"]
  node_dof["DOF dungeons<br/>[JellyDOF.py]"]
  node_nvm["NVM terrain<br/>[JellyNVM.py]"]
  node_map_data["Map data parsing<br/>[map_data.py]"]
end

subgraph group_blender_export["Blender export"]
  node_fbx["FBX and PNG export"]
end

subgraph group_unreal_transfer["Unreal transfer"]
  node_ue_character["Character transfer<br/>[ue_character.py]"]
  node_ue_blender["Unreal project jobs<br/>[ue_blender.py]"]
  node_ue_project["Jangan project setup<br/>[ue_project.py]"]
end

node_user(("Blender user"))

node_user -->|"uses"| node_editor_ui
node_editor_ui -->|"opens and browses"| node_archive
node_archive -->|"reads entries"| node_asset_prep
node_asset_prep -->|"checks references"| node_bridge
node_editor_ui -->|"imports selection"| node_validation
node_validation -->|"validates assets"| node_bridge
node_editor_ui -->|"localizes interface"| node_localization
node_validation -->|"dispatches BSR"| node_bsr
node_validation -->|"dispatches BMS"| node_bms
node_validation -->|"dispatches BSK"| node_bsk
node_validation -->|"dispatches BAN"| node_ban
node_validation -->|"dispatches DOF"| node_dof
node_validation -->|"dispatches NVM"| node_nvm
node_dof -->|"parses map data"| node_map_data
node_nvm -->|"parses terrain data"| node_map_data
node_map_data -->|"reads binary data"| node_binary
node_editor_ui -->|"exports scene"| node_fbx
node_editor_ui -->|"transfers character"| node_ue_character
node_ue_character -->|"uses transfer jobs"| node_ue_blender
node_ue_blender -->|"exports assets"| node_fbx
node_editor_ui -->|"starts project export"| node_ue_blender
node_ue_blender -->|"initializes project"| node_ue_project
node_ue_blender -->|"imports selected entry"| node_archive

click node_editor_ui "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/__init__.py"
click node_archive "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/pk2_core.py"
click node_asset_prep "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/pk2_core.py"
click node_validation "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/import_runtime.py"
click node_bridge "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/bridge_core.py"
click node_binary "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/asset_binary.py"
click node_bsr "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBSR.py"
click node_bms "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBMS.py"
click node_bsk "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBSK.py"
click node_ban "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBAN.py"
click node_dof "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyDOF.py"
click node_nvm "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyNVM.py"
click node_map_data "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/map_data.py"
click node_fbx "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/fbx_texture_export.py"
click node_ue_character "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_character.py"
click node_ue_blender "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_blender.py"
click node_ue_project "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_project.py"
click node_localization "https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/i18n.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_editor_ui,node_archive,node_asset_prep,node_validation,node_bridge,node_localization,node_user toneBlue
class node_binary,node_bsr,node_bms,node_bsk,node_ban,node_dof,node_nvm,node_map_data toneAmber
class node_fbx toneMint
class node_ue_character,node_ue_blender,node_ue_project toneRose
```

## Components

### Archive and import

- [Editor UI](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/__init__.py): `silkroad_pk2_bridge/__init__.py`
- [PK2 archive access](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/pk2_core.py): `silkroad_pk2_bridge/pk2_core.py`
- [Asset preparation](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/pk2_core.py): `silkroad_pk2_bridge/pk2_core.py`
- [Import validation](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/import_runtime.py): `silkroad_pk2_bridge/import_runtime.py`
- [Asset reference checks](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/bridge_core.py): `silkroad_pk2_bridge/bridge_core.py`
- [English and Turkish UI](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/i18n.py): `silkroad_pk2_bridge/i18n.py`

### Formats and maps

- [Binary readers](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/asset_binary.py): `silkroad_pk2_bridge/asset_binary.py`
- [BSR resources](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBSR.py): `silkroad_pk2_bridge/JellyBSR.py`
- [BMS meshes](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBMS.py): `silkroad_pk2_bridge/JellyBMS.py`
- [BSK skeletons](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBSK.py): `silkroad_pk2_bridge/JellyBSK.py`
- [BAN animation](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyBAN.py): `silkroad_pk2_bridge/JellyBAN.py`
- [DOF dungeons](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyDOF.py): `silkroad_pk2_bridge/JellyDOF.py`
- [NVM terrain](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/JellyNVM.py): `silkroad_pk2_bridge/JellyNVM.py`
- [Map data parsing](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/map_data.py): `silkroad_pk2_bridge/map_data.py`

### Blender export

- [FBX and PNG export](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/fbx_texture_export.py): `silkroad_pk2_bridge/fbx_texture_export.py`

### Unreal transfer

- [Character transfer](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_character.py): `silkroad_pk2_bridge/ue_character.py`
- [Unreal project jobs](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_blender.py): `silkroad_pk2_bridge/ue_blender.py`
- [Jangan project setup](https://github.com/mgunbatti/xsilkroad-blender-plugin/blob/main/silkroad_pk2_bridge/ue_project.py): `silkroad_pk2_bridge/ue_project.py`

### Other components

- **Blender user**

## Connections

- Blender user → Editor UI: uses (evidence: `README.md`)
- Editor UI → PK2 archive access: opens and browses (evidence: `silkroad_pk2_bridge/__init__.py`)
- PK2 archive access → Asset preparation: reads entries (evidence: `silkroad_pk2_bridge/pk2_core.py`)
- Asset preparation → Asset reference checks: checks references (evidence: `silkroad_pk2_bridge/pk2_core.py`)
- Editor UI → Import validation: imports selection (evidence: `README.md`)
- Import validation → Asset reference checks: validates assets (evidence: `silkroad_pk2_bridge/import_runtime.py`)
- Editor UI → English and Turkish UI: localizes interface (evidence: `silkroad_pk2_bridge/__init__.py`)
- Import validation → BSR resources: dispatches BSR (evidence: `README.md`)
- Import validation → BMS meshes: dispatches BMS (evidence: `README.md`)
- Import validation → BSK skeletons: dispatches BSK (evidence: `README.md`)
- Import validation → BAN animation: dispatches BAN (evidence: `README.md`)
- Import validation → DOF dungeons: dispatches DOF (evidence: `README.md`)
- Import validation → NVM terrain: dispatches NVM (evidence: `README.md`)
- DOF dungeons → Map data parsing: parses map data (evidence: `silkroad_pk2_bridge/JellyDOF.py`)
- NVM terrain → Map data parsing: parses terrain data (evidence: `silkroad_pk2_bridge/JellyNVM.py`)
- Map data parsing → Binary readers: reads binary data (evidence: `silkroad_pk2_bridge/map_data.py`)
- Editor UI → FBX and PNG export: exports scene (evidence: `README.md`)
- Editor UI → Character transfer: transfers character (evidence: `README.md`)
- Character transfer → Unreal project jobs: uses transfer jobs (evidence: `silkroad_pk2_bridge/ue_character.py`)
- Unreal project jobs → FBX and PNG export: exports assets (evidence: `silkroad_pk2_bridge/ue_blender.py`)
- Editor UI → Unreal project jobs: starts project export (evidence: `README.md`)
- Unreal project jobs → Jangan project setup: initializes project (evidence: `silkroad_pk2_bridge/ue_blender.py`)
- Unreal project jobs → PK2 archive access: imports selected entry (evidence: `silkroad_pk2_bridge/ue_blender.py`)
